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

hyatt at apple.com hyatt at apple.com
Wed Dec 22 18:11:54 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 945782ffec617f94e6e08c211ab2ef3e474f18af
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 8 18:31:33 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=50576
    
    Reviewed by Anders Carlsson.
    
    REGRESSION in position of autocomplete popup on RTL page.
    
    RTL static position computation did not subtract out the width of the enclosing box if the
    immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
    to be RTL when the document was RTL.
    
    Added three new tests in fast/block/positioning.
    
    WebCore:
    
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::computePositionedLogicalWidth):
    
    LayoutTests:
    
    * fast/block/positioning/rtl-static-positioning-inline-block.html: Added.
    * fast/block/positioning/rtl-static-positioning.html: Added.
    * fast/block/positioning/table-cell-static-position.html: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-expected.checksum: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-expected.png: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-expected.txt: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.checksum: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.png: Added.
    * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.txt: Added.
    * platform/mac/fast/block/positioning/table-cell-static-position-expected.checksum: Added.
    * platform/mac/fast/block/positioning/table-cell-static-position-expected.png: Added.
    * platform/mac/fast/block/positioning/table-cell-static-position-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73531 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f62d098..9a47067 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,30 @@
+2010-12-08  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50576
+
+        REGRESSION in position of autocomplete popup on RTL page.
+
+        RTL static position computation did not subtract out the width of the enclosing box if the
+        immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
+        to be RTL when the document was RTL.
+
+        Added three new tests in fast/block/positioning.
+
+        * fast/block/positioning/rtl-static-positioning-inline-block.html: Added.
+        * fast/block/positioning/rtl-static-positioning.html: Added.
+        * fast/block/positioning/table-cell-static-position.html: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-expected.checksum: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-expected.png: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-expected.txt: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.checksum: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.png: Added.
+        * platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.txt: Added.
+        * platform/mac/fast/block/positioning/table-cell-static-position-expected.checksum: Added.
+        * platform/mac/fast/block/positioning/table-cell-static-position-expected.png: Added.
+        * platform/mac/fast/block/positioning/table-cell-static-position-expected.txt: Added.
+
 2010-12-08  Xiaomei Ji  <xji at chromium.org>
 
         Reviewed by David Hyatt.
diff --git a/LayoutTests/fast/block/positioning/rtl-static-positioning-inline-block.html b/LayoutTests/fast/block/positioning/rtl-static-positioning-inline-block.html
new file mode 100644
index 0000000..97a50ed
--- /dev/null
+++ b/LayoutTests/fast/block/positioning/rtl-static-positioning-inline-block.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html>
+
+<body>
+
+There should be a green 100x100 square below.  If you see any red, then the test has failed.
+
+<div style="position:relative; direction:rtl; border:20px solid transparent; padding:20px; width:300px; height:300px;">
+  <div style="position:absolute;width:100px;height:100px;background-color:red; left:200px; top: 30px"></div>
+
+  <span>
+    <div style="display:inline-block; border:10px solid transparent; padding-left:20px; padding-right:10px; width:200px; height:200px">
+        <div style="position:absolute;width:100px;height:100px;background-color:green"></div>
+    </div>
+  </span>
+</div>
diff --git a/LayoutTests/fast/block/positioning/rtl-static-positioning.html b/LayoutTests/fast/block/positioning/rtl-static-positioning.html
new file mode 100644
index 0000000..f7c20e5
--- /dev/null
+++ b/LayoutTests/fast/block/positioning/rtl-static-positioning.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+
+<body>
+
+There should be a green 100x100 square below.  If you see any red, then the test has failed.
+
+<div style="position:relative; direction:rtl; border:20px solid transparent; padding:20px; width:300px; height:300px">
+  <div style="position:absolute;width:100px;height:100px;background-color:red; left:200px; top: 30px"></div>
+
+  <div style="border:10px solid transparent; padding-left:20px; padding-right:10px; width:200px; height:200px">
+     <span><div style="position:absolute;width:100px;height:100px;background-color:green"></div>
+  </div>
+</div>
diff --git a/LayoutTests/fast/block/positioning/table-cell-static-position.html b/LayoutTests/fast/block/positioning/table-cell-static-position.html
new file mode 100644
index 0000000..11b1adc
--- /dev/null
+++ b/LayoutTests/fast/block/positioning/table-cell-static-position.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html>
+<head>
+<style>
+td { vertical-align:top; padding: 0; width:70px; height:70px; background-color:green; border:1px solid black }
+table { border-spacing:10px; border:1px solid black; position:relative }
+div { position:absolute; width:70px; height:70px; background-color:green; }
+</style>
+</head>
+<body>
+
+All cells should be green.
+
+<table>
+<tr><td><td><td><td style="background-color:red"><span><div></div></td>
+<tr><td><td><td style="background-color:red"><div></div><td style="background-color:red"><span style="display:inline-block; vertical-align:top"><div></span></td>
+</table>
+
+<table style="direction:rtl">
+<tr><td><td><td><td style="background-color:red"><span><div></div></td>
+<tr><td><td><td style="background-color:red"><div></div><td style="background-color:red"><span style="display:inline-block; vertical-align:top"><div></span></td>
+</table>
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.checksum b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.checksum
new file mode 100644
index 0000000..59ab7ec
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.checksum
@@ -0,0 +1 @@
+1d3df17b236e63c3641a050da99f755c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.png b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.png
new file mode 100644
index 0000000..3130b94
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.txt b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.txt
new file mode 100644
index 0000000..93850e7
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x414
+  RenderBlock {HTML} at (0,0) size 800x414
+    RenderBody {BODY} at (8,8) size 784x398
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 572x18
+          text run at (0,0) width 308: "There should be a green 100x100 square below. "
+          text run at (308,0) width 264: "If you see any red, then the test has failed."
+layer at (8,26) size 380x380
+  RenderBlock (relative positioned) {DIV} at (0,18) size 380x380 [border: (20px solid #00000000)]
+    RenderBlock {DIV} at (90,40) size 250x220 [border: (10px solid #00000000)]
+      RenderInline {SPAN} at (0,0) size 0x0
+layer at (228,76) size 100x100
+  RenderBlock (positioned) {DIV} at (220,50) size 100x100 [bgcolor=#FF0000]
+layer at (228,76) size 100x100
+  RenderBlock (positioned) {DIV} at (220,50) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.checksum b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.checksum
new file mode 100644
index 0000000..59ab7ec
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.checksum
@@ -0,0 +1 @@
+1d3df17b236e63c3641a050da99f755c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.png b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.png
new file mode 100644
index 0000000..3130b94
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.txt b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.txt
new file mode 100644
index 0000000..247e3f7
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/rtl-static-positioning-inline-block-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x414
+  RenderBlock {HTML} at (0,0) size 800x414
+    RenderBody {BODY} at (8,8) size 784x398
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 572x18
+          text run at (0,0) width 308: "There should be a green 100x100 square below. "
+          text run at (308,0) width 264: "If you see any red, then the test has failed."
+layer at (8,26) size 380x380
+  RenderBlock (relative positioned) {DIV} at (0,18) size 380x380 [border: (20px solid #00000000)]
+    RenderInline {SPAN} at (0,0) size 250x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (90,40) size 250x220 [border: (10px solid #00000000)]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
+layer at (228,76) size 100x100
+  RenderBlock (positioned) {DIV} at (220,50) size 100x100 [bgcolor=#FF0000]
+layer at (228,76) size 100x100
+  RenderBlock (positioned) {DIV} at (220,50) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.checksum b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.checksum
new file mode 100644
index 0000000..b091584
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.checksum
@@ -0,0 +1 @@
+0cd3902d3833b5aa65a75b3e3a224d08
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.png b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.png
new file mode 100644
index 0000000..78a7887
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.txt b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.txt
new file mode 100644
index 0000000..62ac958
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/positioning/table-cell-static-position-expected.txt
@@ -0,0 +1,50 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x386
+  RenderBlock {HTML} at (0,0) size 800x386
+    RenderBody {BODY} at (8,8) size 784x370
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 160x18
+          text run at (0,0) width 160: "All cells should be green."
+layer at (8,26) size 340x176
+  RenderTable {TABLE} at (0,18) size 340x176 [border: (1px solid #000000)]
+    RenderTableSection {TBODY} at (1,1) size 338x174
+      RenderTableRow {TR} at (0,10) size 338x72
+        RenderTableCell {TD} at (10,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
+        RenderTableCell {TD} at (92,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+        RenderTableCell {TD} at (174,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
+        RenderTableCell {TD} at (256,10) size 72x2 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
+          RenderInline {SPAN} at (0,0) size 0x0
+      RenderTableRow {TR} at (0,92) size 338x72
+        RenderTableCell {TD} at (10,92) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=1 c=0 rs=1 cs=1]
+        RenderTableCell {TD} at (92,92) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
+        RenderTableCell {TD} at (174,92) size 72x2 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
+        RenderTableCell {TD} at (256,92) size 72x20 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
+          RenderBlock {SPAN} at (1,1) size 0x0
+layer at (266,38) size 70x70
+  RenderBlock (positioned) {DIV} at (258,12) size 70x70 [bgcolor=#008000]
+layer at (184,120) size 70x70
+  RenderBlock (positioned) {DIV} at (176,94) size 70x70 [bgcolor=#008000]
+layer at (266,120) size 70x70
+  RenderBlock (positioned) {DIV} at (258,94) size 70x70 [bgcolor=#008000]
+layer at (8,202) size 340x176
+  RenderTable {TABLE} at (0,194) size 340x176 [border: (1px solid #000000)]
+    RenderTableSection {TBODY} at (1,1) size 338x174
+      RenderTableRow {TR} at (0,10) size 338x72
+        RenderTableCell {TD} at (256,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
+        RenderTableCell {TD} at (174,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+        RenderTableCell {TD} at (92,10) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
+        RenderTableCell {TD} at (10,10) size 72x2 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
+          RenderInline {SPAN} at (0,0) size 0x0
+      RenderTableRow {TR} at (0,92) size 338x72
+        RenderTableCell {TD} at (256,92) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=1 c=0 rs=1 cs=1]
+        RenderTableCell {TD} at (174,92) size 72x2 [bgcolor=#008000] [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
+        RenderTableCell {TD} at (92,92) size 72x2 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
+        RenderTableCell {TD} at (10,92) size 72x20 [bgcolor=#FF0000] [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
+          RenderBlock {SPAN} at (71,1) size 0x0
+layer at (20,214) size 70x70
+  RenderBlock (positioned) {DIV} at (12,12) size 70x70 [bgcolor=#008000]
+layer at (102,296) size 70x70
+  RenderBlock (positioned) {DIV} at (94,94) size 70x70 [bgcolor=#008000]
+layer at (20,296) size 70x70
+  RenderBlock (positioned) {DIV} at (12,94) size 70x70 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 41a3a74..ffb18a0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-08  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50576
+
+        REGRESSION in position of autocomplete popup on RTL page.
+
+        RTL static position computation did not subtract out the width of the enclosing box if the
+        immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
+        to be RTL when the document was RTL.
+
+        Added three new tests in fast/block/positioning.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+
 2010-12-08  Xiaomei Ji  <xji at chromium.org>
 
         Reviewed by David Hyatt.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 59c96f8..aa845d5 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -2096,20 +2096,19 @@ void RenderBox::computePositionedLogicalWidth()
         if (containerDirection == LTR) {
             // 'staticX' should already have been set through layout of the parent.
             int staticPosition = layer()->staticX() - containerBlock->borderLeft();
-            for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) {
-                if (po->isBox())
-                    staticPosition += toRenderBox(po)->x();
+            for (RenderObject* curr = parent(); curr && curr != containerBlock; curr = curr->parent()) {
+                if (curr->isBox())
+                    staticPosition += toRenderBox(curr)->x();
             }
             left.setValue(Fixed, staticPosition);
         } else {
-            RenderObject* po = parent();
+            RenderBox* enclosingBox = parent()->enclosingBox();
             // 'staticX' should already have been set through layout of the parent.
             int staticPosition = layer()->staticX() + containerWidth + containerBlock->borderRight();
-            if (po->isBox())
-                staticPosition -= toRenderBox(po)->width();
-            for (; po && po != containerBlock; po = po->parent()) {
-                if (po->isBox())
-                    staticPosition -= toRenderBox(po)->x();
+            staticPosition -= enclosingBox->width();
+            for (RenderObject* curr = enclosingBox; curr && curr != containerBlock; curr = curr->parent()) {
+                if (curr->isBox())
+                    staticPosition -= toRenderBox(curr)->x();
             }
             right.setValue(Fixed, staticPosition);
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list