[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hyatt at apple.com hyatt at apple.com
Wed Dec 22 15:11:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b400a68e812d26b87b830b751465cebe173f7467
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 22:12:29 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=48568
    
    Reviewed by James Robinson.
    
    WebCore:
    
    Backgrounds don't work right with vertical RenderInlines. Make background painting
    do the right thing for vertical strips.
    
    Added fast/blockflow/background-* tests
    
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::paintFillLayer):
    
    LayoutTests:
    
    Backgrounds don't work right with vertical RenderInlines. Make background painting
    do the right thing for vertical strips.
    
    * fast/blockflow/background-horizontal-bt.html: Added.
    * fast/blockflow/background-vertical-lr.html: Added.
    * fast/blockflow/background-vertical-rl.html: Added.
    * platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum: Added.
    * platform/mac/fast/blockflow/background-horizontal-bt-expected.png: Added.
    * platform/mac/fast/blockflow/background-horizontal-bt-expected.txt: Added.
    * platform/mac/fast/blockflow/background-vertical-lr-expected.checksum: Added.
    * platform/mac/fast/blockflow/background-vertical-lr-expected.png: Added.
    * platform/mac/fast/blockflow/background-vertical-lr-expected.txt: Added.
    * platform/mac/fast/blockflow/background-vertical-rl-expected.checksum: Added.
    * platform/mac/fast/blockflow/background-vertical-rl-expected.png: Added.
    * platform/mac/fast/blockflow/background-vertical-rl-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70816 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 91bd171..732f5aa 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-28  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by James Robinson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48568
+
+        Backgrounds don't work right with vertical RenderInlines. Make background painting
+        do the right thing for vertical strips.
+        
+        * fast/blockflow/background-horizontal-bt.html: Added.
+        * fast/blockflow/background-vertical-lr.html: Added.
+        * fast/blockflow/background-vertical-rl.html: Added.
+        * platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum: Added.
+        * platform/mac/fast/blockflow/background-horizontal-bt-expected.png: Added.
+        * platform/mac/fast/blockflow/background-horizontal-bt-expected.txt: Added.
+        * platform/mac/fast/blockflow/background-vertical-lr-expected.checksum: Added.
+        * platform/mac/fast/blockflow/background-vertical-lr-expected.png: Added.
+        * platform/mac/fast/blockflow/background-vertical-lr-expected.txt: Added.
+        * platform/mac/fast/blockflow/background-vertical-rl-expected.checksum: Added.
+        * platform/mac/fast/blockflow/background-vertical-rl-expected.png: Added.
+        * platform/mac/fast/blockflow/background-vertical-rl-expected.txt: Added.
+
 2010-10-28  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/LayoutTests/fast/blockflow/background-horizontal-bt.html b/LayoutTests/fast/blockflow/background-horizontal-bt.html
new file mode 100644
index 0000000..7fe77f7
--- /dev/null
+++ b/LayoutTests/fast/blockflow/background-horizontal-bt.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<head>
+<style>
+span {
+    font-size:85px;
+    background-image: url(../backgrounds/resources/map.jpg)
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: horizontal-bt">
+<span><div style="display:inline-block;width:50px"></div><br><div style="display:inline-block;width:50px"></div></span>
diff --git a/LayoutTests/fast/blockflow/background-vertical-lr.html b/LayoutTests/fast/blockflow/background-vertical-lr.html
new file mode 100644
index 0000000..9e3744a
--- /dev/null
+++ b/LayoutTests/fast/blockflow/background-vertical-lr.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<head>
+<style>
+span {
+    font-size:85px;
+    background-image: url(../backgrounds/resources/map.jpg)
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: vertical-lr">
+<span><div style="display:inline-block;height:50px"></div><br><div style="display:inline-block;height:50px"></div></span>
diff --git a/LayoutTests/fast/blockflow/background-vertical-rl.html b/LayoutTests/fast/blockflow/background-vertical-rl.html
new file mode 100644
index 0000000..cf77f60
--- /dev/null
+++ b/LayoutTests/fast/blockflow/background-vertical-rl.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<head>
+<style>
+span {
+    font-size:85px;
+    background-image: url(../backgrounds/resources/map.jpg)
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: vertical-rl">
+<span><div style="display:inline-block;height:50px"></div><br><div style="display:inline-block;height:50px"></div></span>
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum
new file mode 100644
index 0000000..273b9c9
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum
@@ -0,0 +1 @@
+39e3ac4603ba247bf6e72a72404d08f0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.png b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.png
new file mode 100644
index 0000000..54e2f25
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.txt b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.txt
new file mode 100644
index 0000000..4310f70
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-horizontal-bt-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,144) size 800x456
+  RenderBlock {HTML} at (0,0) size 800x456
+    RenderBody {BODY} at (8,8) size 784x440
+      RenderInline {SPAN} at (0,0) size 50x268
+        RenderBlock {DIV} at (50,71) size 50x0
+        RenderBR {BR} at (100,50) size 0x98
+        RenderBlock {DIV} at (50,241) size 50x0
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.checksum
new file mode 100644
index 0000000..5294b71
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.checksum
@@ -0,0 +1 @@
+78a4f443ea4ef70d341f310787b17c3c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.png b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.png
new file mode 100644
index 0000000..485776f
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.txt b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.txt
new file mode 100644
index 0000000..c4ac399
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-vertical-lr-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 456x600
+  RenderBlock {HTML} at (0,0) size 456x600
+    RenderBody {BODY} at (8,8) size 440x584
+      RenderInline {SPAN} at (0,0) size 220x98
+        RenderBlock {DIV} at (71,50) size 0x50
+        RenderBR {BR} at (50,100) size 0x98
+        RenderBlock {DIV} at (241,50) size 0x50
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.checksum
new file mode 100644
index 0000000..e01b78b
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.checksum
@@ -0,0 +1 @@
+b7748e48694e05204391adc01af7f82f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.png b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.png
new file mode 100644
index 0000000..44448ff
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.txt b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.txt
new file mode 100644
index 0000000..581a404
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/background-vertical-rl-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (344,0) size 456x600
+  RenderBlock {HTML} at (0,0) size 456x600
+    RenderBody {BODY} at (8,8) size 440x584
+      RenderInline {SPAN} at (0,0) size 220x98
+        RenderBlock {DIV} at (163,50) size 0x50
+        RenderBR {BR} at (86,100) size 0x98
+        RenderBlock {DIV} at (333,50) size 0x50
+      RenderText {#text} at (0,0) size 0x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e8aed54..aefeb60 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-28  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by James Robinson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48568
+
+        Backgrounds don't work right with vertical RenderInlines. Make background painting
+        do the right thing for vertical strips.
+
+        Added fast/blockflow/background-* tests
+
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::paintFillLayer):
+
 2010-10-28  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index 1c82b2c..2fec0ac 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -755,23 +755,26 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c
         boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, tx, ty, w, h, this, op);
     else {
         // We have a fill image that spans multiple lines.
-        // We need to adjust _tx and _ty by the width of all previous lines.
+        // We need to adjust tx and ty by the width of all previous lines.
         // Think of background painting on inlines as though you had one long line, a single continuous
         // strip.  Even though that strip has been broken up across multiple lines, you still paint it
         // as though you had one single line.  This means each line has to pick up the background where
         // the previous line left off.
         // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
         // but it isn't even clear how this should work at all.
-        int xOffsetOnLine = 0;
+        int logicalOffsetOnLine = 0;
         for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
-            xOffsetOnLine += curr->logicalWidth();
-        int startX = tx - xOffsetOnLine;
-        int totalWidth = xOffsetOnLine;
+            logicalOffsetOnLine += curr->logicalWidth();
+        int totalLogicalWidth = logicalOffsetOnLine;
         for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
-            totalWidth += curr->logicalWidth();
+            totalLogicalWidth += curr->logicalWidth();
+        int stripX = tx - (isVertical() ? 0 : logicalOffsetOnLine);
+        int stripY = ty - (isVertical() ? logicalOffsetOnLine : 0);
+        int stripWidth = isVertical() ? width() : totalLogicalWidth;
+        int stripHeight = isVertical() ? totalLogicalWidth : height();
         paintInfo.context->save();
-        paintInfo.context->clip(IntRect(tx, ty, logicalWidth(), logicalHeight()));
-        boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, startX, ty, totalWidth, h, this, op);
+        paintInfo.context->clip(IntRect(tx, ty, width(), height()));
+        boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, stripX, stripY, stripWidth, stripHeight, this, op);
         paintInfo.context->restore();
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list