diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 17:52:59 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 17:52:59 +0000 |
commit | 66ff1ca030d044d7d16b0db32c8e33d673b1c534 (patch) | |
tree | fff6898af21c0043daa910bf89617f1e36094951 | |
parent | fc60f22835abe2bb65b23c27fc7a15b39e948f8d (diff) | |
download | chromium_src-66ff1ca030d044d7d16b0db32c8e33d673b1c534.zip chromium_src-66ff1ca030d044d7d16b0db32c8e33d673b1c534.tar.gz chromium_src-66ff1ca030d044d7d16b0db32c8e33d673b1c534.tar.bz2 |
Add support for transformed, stoked, shadowed, filled text. We do this by drawing the text using Skia after getting the outlines from Windows. A cache of these outlines is maintained because the outlines are very slow to retrieve. This new functionality is in SkiaFontWin.*, and is called when the context detects text attributes that are not supported by Windows.
Review URL: http://codereview.chromium.org/8615
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7223 0039d316-1c4b-4281-b951-d872f2087c98
53 files changed, 734 insertions, 305 deletions
diff --git a/webkit/build/port/port.vcproj b/webkit/build/port/port.vcproj index 676663e..9b1eb3c 100644 --- a/webkit/build/port/port.vcproj +++ b/webkit/build/port/port.vcproj @@ -1072,6 +1072,14 @@ > </File> <File + RelativePath="..\..\port\platform\graphics\skia\SkiaFontWin.cpp" + > + </File> + <File + RelativePath="..\..\port\platform\graphics\skia\SkiaFontWin.h" + > + </File> + <File RelativePath="..\..\port\platform\graphics\skia\SkiaUtils.cpp" > </File> diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum index a89c5cb..b767bc6 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum @@ -1 +1 @@ -216e443e806e87efd28c71c1f263c1e2
\ No newline at end of file +630ab17dfc1e103fc054cb8dc41ed045
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png Binary files differindex 7d88c2b..7a47e0f 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.checksum index 600a546..7f96cce 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.checksum @@ -1 +1 @@ -95b74d04502fcf6469bbf2e1af4e24e9
\ No newline at end of file +cf424145f8ffce6a216da9367a2138fb
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.png Binary files differindex ca6d08d..53a930f 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/box-shadow/basic-shadows-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum index d2477ad..ed26478 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.checksum @@ -1 +1 @@ -f3db54e8a0de8f7d888fd115c4041097
\ No newline at end of file +788d5f8948ad4805e4650517c3d647ea
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png Binary files differindex 4ba60eb..90fbfcb 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.txt index adee5c2..d68580e 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.txt +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-h-expected.txt @@ -1,139 +1,139 @@ -layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x521
- RenderBlock {HTML} at (0,0) size 800x8
- RenderBody {BODY} at (8,8) size 784x0
- RenderBlock (floating) {DIV} at (0,0) size 115x513
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock {P} at (0,457) size 115x40
- RenderText {#text} at (0,0) size 79x19
- text run at (0,0) width 79: "Lorem ipsum"
- RenderBR {BR} at (79,0) size 0x19
- RenderText {#text} at (0,20) size 82x19
- text run at (0,20) width 82: "dolor sit amet"
- RenderBlock (floating) {DIV} at (125,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (250,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (375,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (500,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
-layer at (18,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (143,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (268,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (393,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (518,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (8,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (18,78) size 40x40
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (8,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (18,138) size 40x40 backgroundClip at (13,133) size 5x5 clip at (13,133) size 5x5 outlineClip at (13,133) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (18,198) size 40x40
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (133,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (143,78) size 40x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (133,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (143,138) size 40x45 backgroundClip at (138,178) size 5x5 clip at (138,178) size 5x5 outlineClip at (138,178) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (143,198) size 40x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (258,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (268,78) size 45x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (258,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (268,138) size 45x45 backgroundClip at (308,178) size 5x5 clip at (308,178) size 5x5 outlineClip at (308,178) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (268,198) size 45x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (383,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (393,78) size 45x40
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (383,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (393,138) size 45x40 backgroundClip at (433,133) size 5x5 clip at (433,133) size 5x5 outlineClip at (433,133) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (393,198) size 45x40
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (508,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (518,78) size 45x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (508,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (518,198) size 45x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
+layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x521 + RenderBlock {HTML} at (0,0) size 800x8 + RenderBody {BODY} at (8,8) size 784x0 + RenderBlock (floating) {DIV} at (0,0) size 115x513 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock {P} at (0,457) size 115x40 + RenderText {#text} at (0,0) size 79x19 + text run at (0,0) width 79: "Lorem ipsum" + RenderBR {BR} at (79,0) size 0x19 + RenderText {#text} at (0,20) size 82x19 + text run at (0,20) width 82: "dolor sit amet" + RenderBlock (floating) {DIV} at (125,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (250,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (375,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (500,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" +layer at (18,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (143,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (268,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (393,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (518,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (8,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (18,78) size 40x40 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (8,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (18,138) size 40x40 backgroundClip at (13,133) size 5x5 clip at (13,133) size 5x5 outlineClip at (13,133) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (18,198) size 40x40 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (133,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (143,78) size 40x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (133,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (143,138) size 40x45 backgroundClip at (138,178) size 5x5 clip at (138,178) size 5x5 outlineClip at (138,178) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (143,198) size 40x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (258,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (268,78) size 45x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (258,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (268,138) size 45x45 backgroundClip at (308,178) size 5x5 clip at (308,178) size 5x5 outlineClip at (308,178) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (268,198) size 45x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (383,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (393,78) size 45x40 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (383,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (393,138) size 45x40 backgroundClip at (433,133) size 5x5 clip at (433,133) size 5x5 outlineClip at (433,133) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (393,198) size 45x40 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (508,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (518,78) size 45x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (508,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (518,198) size 45x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum index d2477ad..ed26478 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.checksum @@ -1 +1 @@ -f3db54e8a0de8f7d888fd115c4041097
\ No newline at end of file +788d5f8948ad4805e4650517c3d647ea
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png Binary files differindex 4ba60eb..90fbfcb 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.txt index adee5c2..d68580e 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.txt +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/box-shadow-v-expected.txt @@ -1,139 +1,139 @@ -layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x521
- RenderBlock {HTML} at (0,0) size 800x8
- RenderBody {BODY} at (8,8) size 784x0
- RenderBlock (floating) {DIV} at (0,0) size 115x513
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock {P} at (0,457) size 115x40
- RenderText {#text} at (0,0) size 79x19
- text run at (0,0) width 79: "Lorem ipsum"
- RenderBR {BR} at (79,0) size 0x19
- RenderText {#text} at (0,20) size 82x19
- text run at (0,20) width 82: "dolor sit amet"
- RenderBlock (floating) {DIV} at (125,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (250,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (375,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
- RenderBlock (floating) {DIV} at (500,0) size 115x457
- RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77]
- RenderBlock (anonymous) at (0,340) size 115x65
- RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77]
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,421) size 115x20
- RenderText {#text} at (0,0) size 44x19
- text run at (0,0) width 44: "Lorem "
- RenderInline {SPAN} at (0,0) size 35x19
- RenderText {#text} at (44,0) size 35x19
- text run at (44,0) width 35: "ipsum"
- RenderText {#text} at (79,0) size 36x19
- text run at (79,0) width 36: " dolor"
-layer at (18,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (143,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (268,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (393,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (518,248) size 40x40
- RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77]
-layer at (8,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (18,78) size 40x40
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (8,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (18,138) size 40x40 backgroundClip at (13,133) size 5x5 clip at (13,133) size 5x5 outlineClip at (13,133) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (18,198) size 40x40
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (133,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (143,78) size 40x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (133,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (143,138) size 40x45 backgroundClip at (138,178) size 5x5 clip at (138,178) size 5x5 outlineClip at (138,178) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (143,198) size 40x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (258,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (268,78) size 45x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (258,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (268,138) size 45x45 backgroundClip at (308,178) size 5x5 clip at (308,178) size 5x5 outlineClip at (308,178) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (268,198) size 45x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (383,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (393,78) size 45x40
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (383,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (393,138) size 45x40 backgroundClip at (433,133) size 5x5 clip at (433,133) size 5x5 outlineClip at (433,133) size 5x5
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (393,198) size 45x40
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
-layer at (508,68) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,60) size 60x60
-layer at (518,78) size 45x45
- RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77]
-layer at (508,128) size 60x60
- RenderBlock (relative positioned) {DIV} at (0,120) size 60x60
-layer at (518,198) size 45x45
- RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77]
+layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x521 + RenderBlock {HTML} at (0,0) size 800x8 + RenderBody {BODY} at (8,8) size 784x0 + RenderBlock (floating) {DIV} at (0,0) size 115x513 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock {P} at (0,457) size 115x40 + RenderText {#text} at (0,0) size 79x19 + text run at (0,0) width 79: "Lorem ipsum" + RenderBR {BR} at (79,0) size 0x19 + RenderText {#text} at (0,20) size 82x19 + text run at (0,20) width 82: "dolor sit amet" + RenderBlock (floating) {DIV} at (125,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (250,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (375,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" + RenderBlock (floating) {DIV} at (500,0) size 115x457 + RenderBlock {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderTable {TABLE} at (10,290) size 40x40 [bgcolor=#FFFF77] + RenderBlock (anonymous) at (0,340) size 115x65 + RenderHTMLCanvas {CANVAS} at (10,10) size 40x40 [bgcolor=#FFFF77] + RenderText {#text} at (0,0) size 0x0 + RenderBlock {P} at (0,421) size 115x20 + RenderText {#text} at (0,0) size 44x19 + text run at (0,0) width 44: "Lorem " + RenderInline {SPAN} at (0,0) size 35x19 + RenderText {#text} at (44,0) size 35x19 + text run at (44,0) width 35: "ipsum" + RenderText {#text} at (79,0) size 36x19 + text run at (79,0) width 36: " dolor" +layer at (18,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (143,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (268,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (393,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (518,248) size 40x40 + RenderBlock {DIV} at (10,240) size 40x40 [bgcolor=#FFFF77] +layer at (8,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (18,78) size 40x40 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (8,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (18,138) size 40x40 backgroundClip at (13,133) size 5x5 clip at (13,133) size 5x5 outlineClip at (13,133) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (18,198) size 40x40 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (133,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (143,78) size 40x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (133,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (143,138) size 40x45 backgroundClip at (138,178) size 5x5 clip at (138,178) size 5x5 outlineClip at (138,178) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (143,198) size 40x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (258,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (268,78) size 45x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (258,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (268,138) size 45x45 backgroundClip at (308,178) size 5x5 clip at (308,178) size 5x5 outlineClip at (308,178) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (268,198) size 45x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (383,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (393,78) size 45x40 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (383,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (393,138) size 45x40 backgroundClip at (433,133) size 5x5 clip at (433,133) size 5x5 outlineClip at (433,133) size 5x5 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (393,198) size 45x40 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] +layer at (508,68) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,60) size 60x60 +layer at (518,78) size 45x45 + RenderBlock (positioned) {DIV} at (10,10) size 40x40 [bgcolor=#FFFF77] +layer at (508,128) size 60x60 + RenderBlock (relative positioned) {DIV} at (0,120) size 60x60 +layer at (518,198) size 45x45 + RenderBlock {DIV} at (10,190) size 40x40 [bgcolor=#FFFF77] diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.checksum index ff7a397..a625799 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.checksum @@ -1 +1 @@ -cd8b337ba8aaae50b676dd3f62d2c557
\ No newline at end of file +e5e35048441d741fa5d45d07cc721fd9
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.png Binary files differindex 38c7f99..d326b3e 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.checksum index ff7a397..a625799 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.checksum @@ -1 +1 @@ -cd8b337ba8aaae50b676dd3f62d2c557
\ No newline at end of file +e5e35048441d741fa5d45d07cc721fd9
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.png Binary files differindex 38c7f99..d326b3e 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/repaint/text-shadow-horizontal-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.checksum index 5d23797..2ce2628 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.checksum @@ -1 +1 @@ -752f8df961f5f77c30d03fc3398d9292
\ No newline at end of file +4a25c65b4cf78a10bdaa7d66405574e7
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.png Binary files differindex b03a32c..e49f688 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/text/shadow-no-blur-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.checksum index 1fb7ff5..bd18dbd 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.checksum @@ -1 +1 @@ -f3124ccebda05f8af23766193c5981ad
\ No newline at end of file +c77de9162a0b0f3a396fb2e8eaf3efe9
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.png Binary files differindex 53967b6..4715fc5a 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/transforms/transformed-caret-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum index e9204a6..71166c1 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum @@ -1 +1 @@ -5c625a2c0b5219e4caed8733bb645590
\ No newline at end of file +edd2cf3575e175b09887fa4d80a5b992
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png Binary files differindex adfa679..a612e16 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum index a72f944..492359c 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.checksum @@ -1 +1 @@ -39945d7b491606899ab82822bf34b5fc
\ No newline at end of file +17094bf9dc2591e62aa4b504fdd90b96
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png Binary files differindex cba7d62..f4e3e57 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/text-text-08-b-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum index c38e27d..e1ad03c 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum @@ -1 +1 @@ -ccbc1514ea8813eaf0d6f4b6b973c326
\ No newline at end of file +b8efe1e34a298b037a8241c19fe5ae74
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png Binary files differindex 0d54254..41785efe 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.checksum index ddce672..2eaa52f 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.checksum @@ -1 +1 @@ -000d6cefe1df575c8ea29bad30e8e539
\ No newline at end of file +0113658fa79beafa257858666da0e773
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.png Binary files differindex c81f31f..b28ba30 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/carto.net/window-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.checksum index ad7c71e..f364f7c 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.checksum @@ -1 +1 @@ -97e375e4b57a07f9546ce4c1337852cb
\ No newline at end of file +c17f39edf44e00f211765a0565efce4e
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.png Binary files differindex 3737848..7c0adeb 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/js-late-pattern-and-object-creation-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.checksum index c4ded4d..f928307 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.checksum @@ -1 +1 @@ -b67449f830dbdca329ed006706234fb2
\ No newline at end of file +46bb232994fffe8dce0af7f2e9f60942
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.png Binary files differindex 3c18f79..3ace34c 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/pointer-events-text-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.checksum index 9a69646..86e78a0 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.checksum @@ -1 +1 @@ -193af2e14690575f9abe543fa9ba187f
\ No newline at end of file +15101e5aaf18688a6b1ebb016234ea5a
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.png Binary files differindex 4eb8411..8fbf664 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/struct-use-09-b-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.checksum index 364d4fa..76b21b4 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.checksum @@ -1 +1 @@ -986502048eae1264ce30d54ca873bc4c
\ No newline at end of file +1069c189e2cd5b9495a944878062782f
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.png Binary files differindex 53a0753..b5b9611 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/text-repaint-including-stroke-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.checksum index aa402b8..2f88a44 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.checksum @@ -1 +1 @@ -9be91b4bfdd7cc2af7479dc7b986fe61
\ No newline at end of file +8d16b32b4ed98d29739c8d105ff2ce65
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.png Binary files differindex 5a20bfa..cc4fe2c 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-detach-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.checksum index d69a371..8b8f6cb 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.checksum @@ -1 +1 @@ -853de00567d121bea0b7bece66a5d61c
\ No newline at end of file +db7c1998c494cb393c5653770692baf0
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.png Binary files differindex d8c9f68..684349b 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-disallowed-foreign-object-4-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.checksum index e1f2ac7..e44f4d2 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.checksum @@ -1 +1 @@ -e5aa7944fe5af22783eb50373dcbbf07
\ No newline at end of file +3167f6abf6ba5fae8a87dac9d01ac9b0
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.png Binary files differindex d228076..d74f95e 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/custom/use-on-text-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.checksum index 68bf45b..5e6f645 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.checksum @@ -1 +1 @@ -611407ea718f4a54e0744cedcebb2b36
\ No newline at end of file +26af839567901b4a666ead0e4061871d
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.png Binary files differindex 7fe54cd..287a6af 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/svg/hixie/error/017-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.checksum index 9adcbb7..12ad7c2 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.checksum @@ -1 +1 @@ -d40a15213dfeca893223c64dea5ee61b
\ No newline at end of file +93c6ba99c3bc109e31bc948eddd1e9cf
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.png Binary files differindex 5bb132c..7142414 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/compound-transforms-vs-containers-expected.png diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.checksum index 6eebcc5..0c8e1df 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.checksum @@ -1 +1 @@ -ed9ea020b185699f68d87a717c84bc23
\ No newline at end of file +888d248d2517c03a34c627969b8ef0b4
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.png Binary files differindex d2d6d60f..0a502a8 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/transforms/2d/transform-origin-borderbox-expected.png diff --git a/webkit/port/platform/graphics/chromium/FontChromiumWin.cpp b/webkit/port/platform/graphics/chromium/FontChromiumWin.cpp index 3dde8d3..8f94bad 100644 --- a/webkit/port/platform/graphics/chromium/FontChromiumWin.cpp +++ b/webkit/port/platform/graphics/chromium/FontChromiumWin.cpp @@ -26,12 +26,14 @@ #include "config.h" #include <windows.h> +#include "AffineTransform.h" #include "ChromiumBridge.h" #include "Font.h" #include "FontFallbackList.h" #include "GlyphBuffer.h" #include "PlatformContextSkia.h" #include "SimpleFontData.h" +#include "SkiaFontWin.h" #include "SkiaUtils.h" #include "UniscribeHelperTextRun.h" @@ -40,6 +42,78 @@ namespace WebCore { +static bool windowsCanHandleTextDrawing(GraphicsContext* context) +{ + // Check for non-translation transforms. Sometimes zooms will look better in + // Skia, and sometimes better in Windows. The main problem is that zooming + // in using Skia will show you the hinted outlines for the smaller size, + // which look weird. All else being equal, it's better to use Windows' text + // drawing, so we don't check for zooms. + const AffineTransform& xform = context->getCTM(); + if (xform.b() != 0 || // Y skew + xform.c() != 0) // X skew + return false; + + // Check for stroke effects. + if (context->platformContext()->getTextDrawingMode() != cTextFill) + return false; + + // Check for shadow effects. + if (context->platformContext()->getDrawLooper()) + return false; + + return true; +} + +static bool PaintSkiaText(PlatformContextSkia* platformContext, + HFONT hfont, + int numGlyphs, + const WORD* glyphs, + const int* advances, + const SkPoint& origin) +{ + int textMode = platformContext->getTextDrawingMode(); + + // Filling (if necessary). This is the common case. + SkPaint paint; + platformContext->setupPaintForFilling(&paint); + paint.setFlags(SkPaint::kAntiAlias_Flag); + bool didFill = false; + if ((textMode & cTextFill) && SkColorGetA(paint.getColor())) { + if (!SkiaDrawText(hfont, platformContext->canvas(), origin, &paint, + &glyphs[0], &advances[0], numGlyphs)) + return false; + didFill = true; + } + + // Stroking on top (if necessary). + if ((textMode & WebCore::cTextStroke) && + platformContext->getStrokeStyle() != NoStroke && + platformContext->getStrokeThickness() > 0) { + + paint.reset(); + platformContext->setupPaintForStroking(&paint, NULL, 0); + paint.setFlags(SkPaint::kAntiAlias_Flag); + if (didFill) { + // If there is a shadow and we filled above, there will already be + // a shadow. We don't want to draw it again or it will be too dark + // and it will go on top of the fill. + // + // Note that this isn't strictly correct, since the stroke could be + // very thick and the shadow wouldn't account for this. The "right" + // thing would be to draw to a new layer and then draw that layer + // with a shadow. But this is a lot of extra work for something + // that isn't normally an issue. + paint.setLooper(NULL)->safeUnref(); + } + + if (!SkiaDrawText(hfont, platformContext->canvas(), origin, + &paint, &glyphs[0], &advances[0], numGlyphs)) + return false; + } + return true; +} + void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, const GlyphBuffer& glyphBuffer, @@ -57,7 +131,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, SkColor color = context->fillColor(); unsigned char alpha = SkColorGetA(color); // Skip 100% transparent text; no need to draw anything. - if (!alpha) + if (!alpha && context->getStrokeStyle() == NoStroke) return; // Set up our graphics context. @@ -82,6 +156,8 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, int x = static_cast<int>(point.x()); int lineTop = static_cast<int>(point.y()) - font->ascent(); + bool canUseGDI = windowsCanHandleTextDrawing(graphicsContext); + // We draw the glyphs in chunks to avoid having to do a heap allocation for // the arrays of characters and advances. Since ExtTextOut is the // lowest-level text output function on Windows, there should be little @@ -105,10 +181,19 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, bool success = false; for (int executions = 0; executions < 2; ++executions) { - success = !!ExtTextOut(hdc, x, lineTop, ETO_GLYPH_INDEX, NULL, - reinterpret_cast<const wchar_t*>(&glyphs[0]), - curLen, - &advances[0]); + if (canUseGDI) { + success = !!ExtTextOut(hdc, x, lineTop, ETO_GLYPH_INDEX, NULL, + reinterpret_cast<const wchar_t*>(&glyphs[0]), + curLen, &advances[0]); + } else { + // Skia's text draing origin is the baseline, like WebKit, not + // the top, like Windows. + SkPoint origin = { x, point.y() }; + success = PaintSkiaText(context, + font->platformData().hfont(), numGlyphs, + reinterpret_cast<const WORD*>(&glyphs[0]), + &advances[0], origin); + } if (!success && executions == 0) { // Ask the browser to load the font for us and retry. diff --git a/webkit/port/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp b/webkit/port/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp index e1afaa2..3a11c1c 100644 --- a/webkit/port/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp +++ b/webkit/port/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp @@ -29,6 +29,7 @@ #include <mlang.h> #include "ChromiumBridge.h" +#include "SkiaFontWin.h" namespace WebCore { @@ -103,6 +104,7 @@ FontPlatformData::~FontPlatformData() FontPlatformData::RefCountedHFONT::~RefCountedHFONT() { if (m_hfont != reinterpret_cast<HFONT>(-1)) { + RemoveFontFromSkiaFontWinCache(m_hfont); DeleteObject(m_hfont); } } diff --git a/webkit/port/platform/graphics/skia/PlatformContextSkia.cpp b/webkit/port/platform/graphics/skia/PlatformContextSkia.cpp index 6cc1c0f..7822bd6 100644 --- a/webkit/port/platform/graphics/skia/PlatformContextSkia.cpp +++ b/webkit/port/platform/graphics/skia/PlatformContextSkia.cpp @@ -319,6 +319,11 @@ void PlatformContextSkia::setFillColor(SkColor color) m_state->m_fillColor = color; } +SkDrawLooper* PlatformContextSkia::getDrawLooper() const +{ + return m_state->m_looper; +} + WebCore::StrokeStyle PlatformContextSkia::getStrokeStyle() const { return m_state->m_strokeStyle; diff --git a/webkit/port/platform/graphics/skia/PlatformContextSkia.h b/webkit/port/platform/graphics/skia/PlatformContextSkia.h index b8dc43f..b9755b4 100644 --- a/webkit/port/platform/graphics/skia/PlatformContextSkia.h +++ b/webkit/port/platform/graphics/skia/PlatformContextSkia.h @@ -106,6 +106,7 @@ public: void setPattern(SkShader*); void setDashPathEffect(SkDashPathEffect*); + SkDrawLooper* getDrawLooper() const; WebCore::StrokeStyle getStrokeStyle() const; float getStrokeThickness() const; int getTextDrawingMode() const; diff --git a/webkit/port/platform/graphics/skia/SkiaFontWin.cpp b/webkit/port/platform/graphics/skia/SkiaFontWin.cpp new file mode 100644 index 0000000..744494f --- /dev/null +++ b/webkit/port/platform/graphics/skia/SkiaFontWin.cpp @@ -0,0 +1,265 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <windows.h> + +#include "base/basictypes.h" + +#include "WTF/ListHashSet.h" +#include "WTF/Vector.h" + +#include "SkiaFontWin.h" + +#include "SkCanvas.h" +#include "SkPaint.h" + +namespace WebCore { + +namespace { + +struct CachedOutlineKey { + CachedOutlineKey() : font(NULL), glyph(0), path(NULL) {} + CachedOutlineKey(HFONT f, WORD g) : font(f), glyph(g), path(NULL) {} + + HFONT font; + WORD glyph; + + // The lifetime of this pointer is managed externally to this class. Be sure + // to call DeleteOutline to remove items. + SkPath* path; +}; + +const bool operator==(const CachedOutlineKey& a, const CachedOutlineKey& b) +{ + return a.font == b.font && a.glyph == b.glyph; +} + +struct CachedOutlineKeyHash { + static unsigned hash(const CachedOutlineKey& key) + { + return bit_cast<unsigned>(key.font) + key.glyph; + } + + static unsigned equal(const CachedOutlineKey& a, + const CachedOutlineKey& b) + { + return a.font == b.font && a.glyph == b.glyph; + } + + static const bool safeToCompareToEmptyOrDeleted = true; +}; + +typedef ListHashSet<CachedOutlineKey, CachedOutlineKeyHash> OutlineCache; +OutlineCache outlineCache; + +// The global number of glyph outlines we'll cache. +const int outlineCacheSize = 256; + +inline FIXED SkScalarToFIXED(SkScalar x) +{ + return bit_cast<FIXED>(SkScalarToFixed(x)); +} + +inline SkScalar FIXEDToSkScalar(FIXED fixed) +{ + return SkFixedToScalar(bit_cast<SkFixed>(fixed)); +} + +// Removes the given key from the cached outlines, also deleting the path. +void DeleteOutline(OutlineCache::iterator deleteMe) +{ + delete deleteMe->path; + outlineCache.remove(deleteMe); +} + +void AddPolyCurveToPath(const TTPOLYCURVE* polyCurve, SkPath* path) +{ + switch (polyCurve->wType) { + case TT_PRIM_LINE: + for (WORD i = 0; i < polyCurve->cpfx; i++) { + path->lineTo(FIXEDToSkScalar(polyCurve->apfx[i].x), + -FIXEDToSkScalar(polyCurve->apfx[i].y)); + } + break; + + case TT_PRIM_QSPLINE: + // FIXME(brettw) doesn't this duplicate points if we do the loop > once? + for (WORD i = 0; i < polyCurve->cpfx - 1; i++) { + SkScalar bx = FIXEDToSkScalar(polyCurve->apfx[i].x); + SkScalar by = FIXEDToSkScalar(polyCurve->apfx[i].y); + + SkScalar cx = FIXEDToSkScalar(polyCurve->apfx[i + 1].x); + SkScalar cy = FIXEDToSkScalar(polyCurve->apfx[i + 1].y); + if (i < polyCurve->cpfx - 2) { + // We're not the last point, compute C. + cx = SkScalarAve(bx, cx); + cy = SkScalarAve(by, cy); + } + + // Need to flip the y coordinates since the font's coordinate system is + // flipped from ours vertically. + path->quadTo(bx, -by, cx, -cy); + } + break; + + case TT_PRIM_CSPLINE: + // FIXME + break; + } +} + +// Fills the given SkPath with the outline for the given glyph index. The font +// currently selected into the given DC is used. Returns true on success. +bool GetPathForGlyph(HDC dc, WORD glyph, SkPath* path) +{ + char buffer[4096]; + GLYPHMETRICS gm; + MAT2 mat = {{0, 1}, {0, 0}, {0, 0}, {0, 1}}; // Each one is (fract,value). + + DWORD totalSize = GetGlyphOutlineW(dc, glyph, GGO_GLYPH_INDEX | GGO_NATIVE, + &gm, arraysize(buffer), buffer, &mat); + if (totalSize == GDI_ERROR) + return false; + + const char* curGlyph = buffer; + const char* endGlyph = &buffer[totalSize]; + while (curGlyph < endGlyph) { + const TTPOLYGONHEADER* polyHeader = + reinterpret_cast<const TTPOLYGONHEADER*>(curGlyph); + path->moveTo(FIXEDToSkScalar(polyHeader->pfxStart.x), + -FIXEDToSkScalar(polyHeader->pfxStart.y)); + + const char* curPoly = curGlyph + sizeof(TTPOLYGONHEADER); + const char* endPoly = curGlyph + polyHeader->cb; + while (curPoly < endPoly) { + const TTPOLYCURVE* polyCurve = + reinterpret_cast<const TTPOLYCURVE*>(curPoly); + AddPolyCurveToPath(polyCurve, path); + curPoly += sizeof(WORD) * 2 + sizeof(POINTFX) * polyCurve->cpfx; + } + curGlyph += polyHeader->cb; + } + + path->close(); + return true; +} + +// Returns a SkPath corresponding to the give glyph in the given font. The font +// should be selected into the given DC. The returned path is owned by the +// hashtable. Returns NULL on error. +const SkPath* GetCachedPathForGlyph(HDC hdc, HFONT font, WORD glyph) +{ + CachedOutlineKey key(font, glyph); + OutlineCache::iterator found = outlineCache.find(key); + if (found != outlineCache.end()) { + // Keep in MRU order by removing & reinserting the value. + key = *found; + outlineCache.remove(found); + outlineCache.add(key); + return key.path; + } + + key.path = new SkPath; + if (!GetPathForGlyph(hdc, glyph, key.path)) + return NULL; + + if (outlineCache.size() > outlineCacheSize) { + // The cache is too big, find the oldest value (first in the list). + DeleteOutline(outlineCache.begin()); + } + + outlineCache.add(key); + return key.path; +} + +} // namespace + +bool SkiaDrawText(HFONT hfont, + SkCanvas* canvas, + const SkPoint& point, + SkPaint* paint, + const WORD* glyphs, + const int* advances, + int num_glyphs) +{ + HDC dc = GetDC(0); + HGDIOBJ old_font = SelectObject(dc, hfont); + + canvas->save(); + canvas->translate(point.fX, point.fY); + + for (int i = 0; i < num_glyphs; i++) { + const SkPath* path = GetCachedPathForGlyph(dc, hfont, glyphs[i]); + if (!path) + return false; + canvas->drawPath(*path, *paint); + canvas->translate(advances[i], 0); + } + + canvas->restore(); + + SelectObject(dc, old_font); + ReleaseDC(0, dc); + return true; +} + +/* TODO(brettw) finish this implementation +bool SkiaDrawComplexText(HFONT font, + SkCanvas* canvas, + const SkPoint& point, + SkPaint* paint + UINT fuOptions, + const SCRIPT_ANALYSIS* psa, + const WORD* pwGlyphs, + int cGlyphs, + const int* advances, + const int* justifies, + const GOFFSET* glyph_offsets) +{ + HDC dc = GetDC(0); + HGDIOBJ old_font = SelectObject(dc, hfont); + + canvas->save(); + canvas->translate(point.fX, point.fY); + + for (int i = 0; i < cGlyphs; i++) { + canvas->translate(glyph_offsets[i].du, glyph_offsets[i].dv); + + + + + // Undo the offset for this glyph. + canvas->translate(-glyph_offsets[i].du, -glyph_offsets[i].dv); + + // And advance to where we're drawing the next one. We use the justifies + // run since that is the justified advances for each character, rather than + // the adnvaces one. + canvas->translate(justifies[i], 0); + } + + canvas->restore(); + + SelectObject(dc, old_font); + ReleaseDC(0, dc); +}*/ + +void RemoveFontFromSkiaFontWinCache(HFONT hfont) +{ + // ListHashSet isn't the greatest structure for deleting stuff out of, but + // removing entries will be relatively rare (we don't remove fonts much, nor + // do we draw out own glyphs using these routines much either). + // + // We keep a list of all glyphs we're removing which we do in a separate + // pass. + Vector<CachedOutlineKey> outlinesToDelete; + for (OutlineCache::iterator i = outlineCache.begin(); + i != outlineCache.end(); ++i) + outlinesToDelete.append(*i); + + for (Vector<CachedOutlineKey>::iterator i = outlinesToDelete.begin(); + i != outlinesToDelete.end(); ++i) + DeleteOutline(outlineCache.find(*i)); +} + +} // namespace WebCore diff --git a/webkit/port/platform/graphics/skia/SkiaFontWin.h b/webkit/port/platform/graphics/skia/SkiaFontWin.h new file mode 100644 index 0000000..9e950bd0 --- /dev/null +++ b/webkit/port/platform/graphics/skia/SkiaFontWin.h @@ -0,0 +1,63 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SkiaFont_Win_h +#define SkiaFont_Win_h + +#include <windows.h> +#include <usp10.h> + +class SkCanvas; +class SkPaint; +struct SkPoint; + +// This file provices Skia equivalents to Windows text drawing functions. They +// will get the outlines from Windows and draw then using Skia using the given +// parameters in the paint arguments. This allows more complex effects and +// transforms to be drawn than Windows allows. +// +// These functions will be significantly slower than Windows GDI, and the text +// will look different (no ClearType), so use only when necessary. +// +// When you call a Skia* text drawing function, various glyph outlines will be +// cached. As a result, you should call RemoveFontFromSkiaFontWinCache when +// the font is destroyed so that the cache does not outlive the font (since the +// HFONTs are recycled). +namespace WebCore { + +// Analog of the Windows GDI function DrawText, except using the given SkPaint +// attributes for the text. See above for more. +// +// Returns true of the text was drawn successfully. False indicates an error +// from Windows. +bool SkiaDrawText(HFONT hfont, + SkCanvas* canvas, + const SkPoint& point, + SkPaint* paint, + const WORD* glyphs, + const int* advances, + int num_glyphs); + +// This mirrors the features of ScriptTextOut. +/* TODO(brettw) finish this implementation. +bool SkiaDrawComplexText(HFONT font, + SkCanvas* canvas, + const SkPoint& point, + SkPaint* paint, + UINT fuOptions, + const SCRIPT_ANALYSIS* psa, + const WORD* pwGlyphs, + int cGlyphs, + const int* advances, + const int* justifies, + const GOFFSET* glyph_offsets); +*/ + +// Removes any cached glyphs from the outline cache corresponding to the given +// font handle. +void RemoveFontFromSkiaFontWinCache(HFONT hfont); + +} // namespace WebCore + +#endif // SkiaFont_Win_h |