CSS 2.1 failure: inline-box-002.htm fails
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Feb 2012 15:24:50 +0000 (15:24 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Feb 2012 15:24:50 +0000 (15:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69210

Reviewed by David Hyatt.

Source/WebCore:

Tests: css2.1/20110323/dynamic-top-change-005.htm
       css2.1/20110323/dynamic-top-change-005a.htm
       css2.1/20110323/dynamic-top-change-005b.htm
       css2.1/20110323/inline-box-002.htm
       fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html
       fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html
       fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html
       fast/css/relative-positioned-block-nested-with-inline-parent.html
       fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html
       fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html
       fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html
       fast/css/relative-positioned-block-with-inline-ancestor.html
       fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html
       fast/css/relative-positioned-block-with-inline-parent-dynamic.html
       fast/css/relative-positioned-block-with-inline-parent-keeps-style.html
       fast/css/relative-positioned-block-with-inline-parent.html

A block within an inline is affected by relative positioning on the inline box. Give
the anonymous block containing the block a layer and make it relative positioned. Then
calculate the offset of the anonymous block's layer by accumulating the offsets from its
inline continuation and the inline continuation's inline parents.
If the position of an inline changes from or to relative positioned then ensure that any
descendant blocks update their position and layer accordingly.

* rendering/RenderBoxModelObject.cpp:
(): add an enum RelPosAxis
(WebCore::accumulateRelativePositionOffsets):
Total up the offsets of all relatively positioned inlines that are de-facto parents of the relatively
positioned anonymous block's child block.

(WebCore):
(WebCore::RenderBoxModelObject::relativePositionOffsetX):
Use accumulateRelativePositionOffsets when calculating the relative position offset of a relatively positioned anonymous block.

(WebCore::RenderBoxModelObject::relativePositionOffsetY): ditto

* rendering/RenderInline.cpp:
(WebCore::hasRelPositionedInlineAncestor):
Detects if the anonymous block contains a block that is the de-facto descendant of a relatively positioned inline.

(WebCore::updateStyleOfAnonymousBlockContinuations):
Update the style's positioning for each anonymous block containing a block that is descendant from the inline whose style has changed.

(WebCore::RenderInline::styleDidChange):
If an inline changes to or from relative positioning ensure that any descendant blocks change to or from relative positioning
as well, unless they still have a relatively positioned ancestor after the current ancestor loses its relative positioning.

(WebCore::RenderInline::addChildIgnoringContinuation):
If the anonymous block contains a block that is effectively descended from a relatively positioned inline, make it relatively
positioned so the block will respect its inline ancestor's relative positioning.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::propagateStyleToAnonymousChildren):
Preserve style position in anonymous block continuations when the parent block propagates a style change.

LayoutTests:

* css2.1/20110323/dynamic-top-change-005-expected.html: Added.
* css2.1/20110323/dynamic-top-change-005.htm: Added.
* css2.1/20110323/dynamic-top-change-005a-expected.html: Added.
* css2.1/20110323/dynamic-top-change-005a.htm: Added.
* css2.1/20110323/dynamic-top-change-005b-expected.html: Added.
* css2.1/20110323/dynamic-top-change-005b.htm: Added.
* css2.1/20110323/inline-box-002-expected.html: Added.
* css2.1/20110323/inline-box-002.htm: Added.
* fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html: Added.
* fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html: Added.
* fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html: Added.
* fast/css/relative-positioned-block-nested-with-inline-parent.html: Added.
* fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html: Added.
* fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html: Added.
* fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html: Added.
* fast/css/relative-positioned-block-with-inline-ancestor.html: Added.
* fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html: Added.
* fast/css/relative-positioned-block-with-inline-parent-dynamic.html: Added.
* fast/css/relative-positioned-block-with-inline-parent-expected.html: Added.
* fast/css/relative-positioned-block-with-inline-parent-keeps-style.html: Added.
* fast/css/relative-positioned-block-with-inline-parent.html: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png: Added.
* platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt: Added.
* platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png:
* platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png:
* platform/chromium-linux/fast/inline/continuation-outlines-with-layers-2-expected.txt:
* platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png:
* platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png:
* platform/chromium-win/fast/encoding/utf-16-big-endian-expected.txt:
* platform/chromium-win/fast/encoding/utf-16-little-endian-expected.txt:
* platform/chromium-win/fast/inline/continuation-outlines-with-layers-expected.txt:
* platform/chromium-win/fast/repaint/transform-absolute-in-positioned-container-expected.txt:
* platform/chromium/test_expectations.txt: Suppress existing tests until results rebaselined.
* platform/gtk/test_expectations.txt: ditto
* platform/mac/test_expectations.txt: ditto
* platform/qt/test_expectations.txt: ditto
* platform/win/Skipped: ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

62 files changed:
LayoutTests/ChangeLog
LayoutTests/css2.1/20110323/dynamic-top-change-005-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/dynamic-top-change-005.htm [new file with mode: 0644]
LayoutTests/css2.1/20110323/dynamic-top-change-005a-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/dynamic-top-change-005a.htm [new file with mode: 0644]
LayoutTests/css2.1/20110323/dynamic-top-change-005b-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/dynamic-top-change-005b.htm [new file with mode: 0644]
LayoutTests/css2.1/20110323/inline-box-002-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/inline-box-002.htm [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-parent-expected.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-parent-keeps-style.html [new file with mode: 0644]
LayoutTests/fast/css/relative-positioned-block-with-inline-parent.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png
LayoutTests/platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png
LayoutTests/platform/chromium-linux/fast/inline/continuation-outlines-with-layers-2-expected.txt
LayoutTests/platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png
LayoutTests/platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png
LayoutTests/platform/chromium-win/fast/encoding/utf-16-big-endian-expected.txt
LayoutTests/platform/chromium-win/fast/encoding/utf-16-little-endian-expected.txt
LayoutTests/platform/chromium-win/fast/inline/continuation-outlines-with-layers-expected.txt
LayoutTests/platform/chromium-win/fast/repaint/transform-absolute-in-positioned-container-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/test_expectations.txt
LayoutTests/platform/mac/test_expectations.txt
LayoutTests/platform/qt/test_expectations.txt
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderObject.cpp

index 25e8a15..b847e8f 100644 (file)
@@ -1,3 +1,68 @@
+2012-02-18  Robert Hogan  <robert@webkit.org>
+
+        CSS 2.1 failure: inline-box-002.htm fails
+        https://bugs.webkit.org/show_bug.cgi?id=69210
+
+        Reviewed by David Hyatt.
+
+        * css2.1/20110323/dynamic-top-change-005-expected.html: Added.
+        * css2.1/20110323/dynamic-top-change-005.htm: Added.
+        * css2.1/20110323/dynamic-top-change-005a-expected.html: Added.
+        * css2.1/20110323/dynamic-top-change-005a.htm: Added.
+        * css2.1/20110323/dynamic-top-change-005b-expected.html: Added.
+        * css2.1/20110323/dynamic-top-change-005b.htm: Added.
+        * css2.1/20110323/inline-box-002-expected.html: Added.
+        * css2.1/20110323/inline-box-002.htm: Added.
+        * fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html: Added.
+        * fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html: Added.
+        * fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html: Added.
+        * fast/css/relative-positioned-block-nested-with-inline-parent.html: Added.
+        * fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html: Added.
+        * fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html: Added.
+        * fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html: Added.
+        * fast/css/relative-positioned-block-with-inline-ancestor.html: Added.
+        * fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html: Added.
+        * fast/css/relative-positioned-block-with-inline-parent-dynamic.html: Added.
+        * fast/css/relative-positioned-block-with-inline-parent-expected.html: Added.
+        * fast/css/relative-positioned-block-with-inline-parent-keeps-style.html: Added.
+        * fast/css/relative-positioned-block-with-inline-parent.html: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png: Added.
+        * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt: Added.
+        * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png:
+        * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png:
+        * platform/chromium-linux/fast/inline/continuation-outlines-with-layers-2-expected.txt:
+        * platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png:
+        * platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png:
+        * platform/chromium-win/fast/encoding/utf-16-big-endian-expected.txt:
+        * platform/chromium-win/fast/encoding/utf-16-little-endian-expected.txt:
+        * platform/chromium-win/fast/inline/continuation-outlines-with-layers-expected.txt:
+        * platform/chromium-win/fast/repaint/transform-absolute-in-positioned-container-expected.txt:
+        * platform/chromium/test_expectations.txt: Suppress existing tests until results rebaselined.
+        * platform/gtk/test_expectations.txt: ditto
+        * platform/mac/test_expectations.txt: ditto
+        * platform/qt/test_expectations.txt: ditto
+        * platform/win/Skipped: ditto
+
 2012-02-18  Abhishek Arya  <inferno@chromium.org>
 
         Unreviewed, rolling out r107965.
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005-expected.html b/LayoutTests/css2.1/20110323/dynamic-top-change-005-expected.html
new file mode 100644 (file)
index 0000000..8363b94
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test Reference Result: Inheriting 'top' changes from abspos grandparent</title>
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    body > p { position: absolute; font-size: medium; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005.htm b/LayoutTests/css2.1/20110323/dynamic-top-change-005.htm
new file mode 100644 (file)
index 0000000..cdf6df7
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position">
+  <meta name="flags" content="dom combo">
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.">
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+  <script type="text/javascript">
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("parent").style.top = "50px";
+    }
+  </script>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="grandparent">
+     <span id="parent">
+       <span id="red" class="testDiv"></span>
+     </span>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005a-expected.html b/LayoutTests/css2.1/20110323/dynamic-top-change-005a-expected.html
new file mode 100644 (file)
index 0000000..263fa2a
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test Reference Result</title>
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    body > p { position: absolute; font-size: medium; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005a.htm b/LayoutTests/css2.1/20110323/dynamic-top-change-005a.htm
new file mode 100644 (file)
index 0000000..ecfa42f
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent (variant: block parent)</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/">
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position">
+  <meta name="flags" content="dom">
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.">
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+  <script type="text/javascript">
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("parent").style.top = "50px";
+    }
+  </script>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="grandparent">
+     <div id="parent">
+       <span id="red" class="testDiv"></span>
+     </div>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005b-expected.html b/LayoutTests/css2.1/20110323/dynamic-top-change-005b-expected.html
new file mode 100644 (file)
index 0000000..e0028e0
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test Reference Result: Inheriting 'top' changes from abspos grandparent (non-dynamic variant)</title>
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    body > p { position: absolute; font-size: medium; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/dynamic-top-change-005b.htm b/LayoutTests/css2.1/20110323/dynamic-top-change-005b.htm
new file mode 100644 (file)
index 0000000..0a65426
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent (non-dynamic variant)</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/">
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position">
+  <meta name="flags" content="dom">
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.">
+  <style type="text/css">
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; top: 50px; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  </style>
+ </head>
+ <body>
+   <p>There should be no red.</p>
+   <div id="grandparent">
+     <span id="parent">
+       <span id="red" class="testDiv"></span>
+     </span>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/inline-box-002-expected.html b/LayoutTests/css2.1/20110323/inline-box-002-expected.html
new file mode 100644 (file)
index 0000000..9a54aae
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">
+        <meta name="flags" content="">
+        <meta name="assert" content="Block boxes within inline boxes are also affected by relative positioning on the inline box.">
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                position: relative;
+                top: 2in;
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange box is between the two blue boxes and all three boxes are below the yellow box.</p>
+        <div id="div1">
+            <span id="div2">Filler Text</span>
+            <div id="div3">Filler Text</div>
+            <span id="div2">Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/inline-box-002.htm b/LayoutTests/css2.1/20110323/inline-box-002.htm
new file mode 100644 (file)
index 0000000..7e7b5dd
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">
+        <meta name="flags" content="">
+        <meta name="assert" content="Block boxes within inline boxes are also affected by relative positioning on the inline box.">
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange box is between the two blue boxes and all three boxes are below the yellow box.</p>
+        <div id="div1">
+            <div id="div2">
+                Filler Text
+                <div id="div3">Filler Text</div>
+                Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html b/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html
new file mode 100644 (file)
index 0000000..b921e52
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block inside nested inlines still respects the positioning of a parent when a relatively positioned ancestor
+         gets toggled to static. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+            #div4
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("div2").style.position = "static";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if each of the orange boxes is sandwiched between two blue boxes and two groups of blue and orange boxes are inside the big yellow box
+           and the remaining group is below it.</p>
+        <div id="div1">
+            <div id="div2"> 
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                <div id="div4">
+                    Filler Text
+                    <div id="div3">Filler Text</div>
+                    Filler Text
+                </div>
+                <div id="div3">Filler Text</div>
+                 Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html b/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html
new file mode 100644 (file)
index 0000000..fd1da27
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block inside nested inlines respects the positioning of a parent when it gets relatively positioned. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+            #div4
+            {
+                background: blue;
+                display: inline;
+                top: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("div4").style.position = "relative";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if each of the orange boxes is sandwiched between two blue boxes and all blue and orange boxes are below the big yellow box.</p>
+        <div id="div1">
+            <div id="div2"> 
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                <div id="div4">
+                    Filler Text
+                    <div id="div3">Filler Text</div>
+                    Filler Text
+                </div>
+                <div id="div3">Filler Text</div>
+                 Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html b/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html
new file mode 100644 (file)
index 0000000..074644f
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <!-- This tests that multiple sibling anonymous blocks with the same de-facto inline parent all respect its relative positioning. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+            #div4
+            {
+                background: blue;
+                display: inline;
+                top: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("div2").style.position = "relative";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if each of the orange boxes is sandwiched between two blue boxes and all blue and orange boxes are below the big yellow box.</p>
+        <div id="div1">
+            <div id="div2"> 
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                 Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent.html b/LayoutTests/fast/css/relative-positioned-block-nested-with-inline-parent.html
new file mode 100644 (file)
index 0000000..a7eba7b
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that blocks nested with multiple relative positioned inline ancestors are positioned correctly. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if each orange box is between two blue boxes and all orange and blue boxes are below the yellow box.</p>
+        <div id="div1">
+            <div id="div2"> 
+                 Filler Text
+                <div id="div3">Filler Text</div>
+                <div id="div2">
+                    Filler Text
+                    <div id="div3">Filler Text</div>
+                    Filler Text
+                </div>
+                <div id="div3">Filler Text</div>
+                 Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html
new file mode 100644 (file)
index 0000000..7c337f2
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <!--This tests that the positioning of a block that has a relatively positioned parent and grandparent remains relative when
+        the positioning of the parent is toggled to static. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                display: inline;
+                position: relative;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #span2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("span2").style.position = "static";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
+        <span id="span1">
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+        </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html
new file mode 100644 (file)
index 0000000..0344635
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block respects the positioning of a relative positioned inline parent when a relative
+         positioned inline ancestor gets toggled to static. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+                position: relative;
+            }
+            #span2
+            {
+                left: 2in;
+                top: 2in;
+                background: blue;
+                display: inline;
+                position: relative;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("span1").style.position = "static";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
+        <span id="span1">
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+        </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html
new file mode 100644 (file)
index 0000000..52df46d
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block descended from an inline respects the positioning of an inline ancestor when it gets relatively positioned. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #span2
+            {
+                background: blue;
+                display: inline;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("span1").style.position = "relative";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
+        <span id="span1">
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+        </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-ancestor.html
new file mode 100644 (file)
index 0000000..b747c60
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block with an inline ancestor respects its relative positioning. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #span2
+            {
+                background: blue;
+                display: inline;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
+        <span id="span1">
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+        </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html
new file mode 100644 (file)
index 0000000..6ede05c
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that toggling an inline's position from relative to static updates the position of any child blocks. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #span2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("span2").style.position = "static";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the orange box sits atop the blue box and both are in the top left of the view.</p>
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic.html
new file mode 100644 (file)
index 0000000..a4c3649
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that toggling an inline's position to relative updates the position of any child blocks. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span1
+            {
+                background: yellow;
+                height: 2in;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #span2
+            {
+                background: blue;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("span2").style.position = "relative";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
+            <span id="span2">
+                <i>
+                <div id="div3">Filler Text</div>
+                Filler Text
+                </i>
+            </span>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-expected.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-expected.html
new file mode 100644 (file)
index 0000000..d20c26d
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                position: relative;
+                top: 2in;
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange box is between the two blue boxes and all three boxes are below the yellow box.</p>
+        <div id="div1">
+            <div id="div3">Filler Text</div>
+            <span id="div2">Filler Text</span>
+            <div id="div3">Filler Text</div>
+            <span id="div2">Filler Text</span>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-keeps-style.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-keeps-style.html
new file mode 100644 (file)
index 0000000..ba15732
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that changing the style of a parent block does not clobber the positioning of any anonymous block
+         children that hold the descendants of a relative positioned inline. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #span2
+            {
+                background: blue;
+                display: inline;
+                width: 2in;
+                left: 2in;
+                top: 2in;
+                position: relative;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+            #div4
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+        <script type="text/javascript">
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+            }
+
+            function run() {
+                document.getElementById("div3").style.background = "red";
+                document.body.offsetTop;
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+           }
+        </script>
+    </head>
+    <body onload="setTimeout('run()', 10);">
+        <p>Test passes if the blue box sits atop the orange box and both are in the center of the view.</p>
+         <div id="div3">
+            <span id="span2">
+                Filler Text1
+                <div id="div4">Filler Text</div>
+            </span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/relative-positioned-block-with-inline-parent.html b/LayoutTests/fast/css/relative-positioned-block-with-inline-parent.html
new file mode 100644 (file)
index 0000000..da0d773
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<!--     This tests that a block respects the relative positioning of an inline parent. -->
+    <head>
+        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
+        <style type="text/css">
+            #div1
+            {
+                background: yellow;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            #div2
+            {
+                background: blue;
+                display: inline;
+                position: relative;
+                top: 2in;
+            }
+            #div3
+            {
+                background: orange;
+                width: 2in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange box is between the two blue boxes and all three boxes are below the yellow box.</p>
+        <div id="div1">
+            <div id="div2">
+                <div id="div3">Filler Text</div>
+                Filler Text
+                <div id="div3">Filler Text</div>
+                Filler Text
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png
new file mode 100644 (file)
index 0000000..323cf8a
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt
new file mode 100644 (file)
index 0000000..ae0f0d2
--- /dev/null
@@ -0,0 +1,52 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x272
+  RenderBlock {HTML} at (0,0) size 800x272
+    RenderBody {BODY} at (8,16) size 784x248
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 766x39
+          text run at (0,0) width 766: "Test passes if each of the orange boxes is sandwiched between two blue boxes and all blue and orange boxes are below the big"
+          text run at (0,20) width 70: "yellow box."
+layer at (8,72) size 192x192
+  RenderBlock (relative positioned) {DIV} at (0,56) size 192x192 [bgcolor=#FFFF00]
+    RenderBlock (anonymous) at (0,0) size 192x20
+    RenderBlock (anonymous) at (0,40) size 192x20
+    RenderBlock (anonymous) at (0,80) size 192x20
+    RenderBlock (anonymous) at (0,120) size 192x20
+      RenderText {#text} at (0,0) size 0x0
+layer at (8,264) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,284) size 192x20
+  RenderBlock (anonymous) at (0,20) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,304) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+layer at (8,496) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,516) size 192x20
+  RenderBlock (anonymous) at (0,60) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,344) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 0x0
+layer at (8,536) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,364) size 192x20
+  RenderBlock (anonymous) at (0,100) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,384) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png
new file mode 100644 (file)
index 0000000..e0e894b
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt
new file mode 100644 (file)
index 0000000..e1b9c19
--- /dev/null
@@ -0,0 +1,47 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x272
+  RenderBlock {HTML} at (0,0) size 800x272
+    RenderBody {BODY} at (8,16) size 784x248
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 752x39
+          text run at (0,0) width 752: "Test passes if each of the orange boxes is sandwiched between two blue boxes and two groups of blue and orange boxes are"
+          text run at (0,20) width 152: "inside the big yellow box "
+          text run at (152,20) width 213: "and the remaining group is below it."
+layer at (8,72) size 192x192
+  RenderBlock (relative positioned) {DIV} at (0,56) size 192x192 [bgcolor=#FFFF00]
+    RenderBlock (anonymous) at (0,0) size 192x20
+      RenderInline {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+        RenderText {#text} at (0,0) size 61x19
+          text run at (0,0) width 61: "Filler Text"
+    RenderBlock (anonymous) at (0,20) size 192x20
+      RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+        RenderText {#text} at (0,0) size 61x19
+          text run at (0,0) width 61: "Filler Text"
+    RenderBlock (anonymous) at (0,40) size 192x20
+      RenderInline {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderBlock (anonymous) at (0,80) size 192x20
+      RenderInline {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+        RenderText {#text} at (0,0) size 0x0
+    RenderBlock (anonymous) at (0,100) size 192x20
+      RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+        RenderText {#text} at (0,0) size 61x19
+          text run at (0,0) width 61: "Filler Text"
+    RenderBlock (anonymous) at (0,120) size 192x20
+      RenderInline {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+        RenderText {#text} at (0,0) size 61x19
+          text run at (0,0) width 61: "Filler Text"
+      RenderText {#text} at (0,0) size 0x0
+layer at (8,304) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,324) size 192x20
+  RenderBlock (anonymous) at (0,60) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,344) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png
new file mode 100644 (file)
index 0000000..e1681f6
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt
new file mode 100644 (file)
index 0000000..0b5f7ed
--- /dev/null
@@ -0,0 +1,51 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x252
+  RenderBlock {HTML} at (0,0) size 800x252
+    RenderBody {BODY} at (8,16) size 784x228
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 692x19
+          text run at (0,0) width 692: "Test passes if each orange box is between two blue boxes and all orange and blue boxes are below the yellow box."
+layer at (8,52) size 192x192
+  RenderBlock (relative positioned) {DIV} at (0,36) size 192x192 [bgcolor=#FFFF00]
+    RenderBlock (anonymous) at (0,0) size 192x20
+    RenderBlock (anonymous) at (0,40) size 192x20
+    RenderBlock (anonymous) at (0,80) size 192x20
+    RenderBlock (anonymous) at (0,120) size 192x20
+      RenderText {#text} at (0,0) size 0x0
+layer at (8,244) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,264) size 192x20
+  RenderBlock (anonymous) at (0,20) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,284) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+layer at (8,476) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,496) size 192x20
+  RenderBlock (anonymous) at (0,60) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,324) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 0x0
+layer at (8,516) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,344) size 192x20
+  RenderBlock (anonymous) at (0,100) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,364) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png
new file mode 100644 (file)
index 0000000..263bf40
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt
new file mode 100644 (file)
index 0000000..d2fa762
--- /dev/null
@@ -0,0 +1,47 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x272
+  RenderBlock {HTML} at (0,0) size 800x272
+    RenderBody {BODY} at (8,16) size 784x248
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 766x39
+          text run at (0,0) width 766: "Test passes if each of the orange boxes is sandwiched between two blue boxes and all blue and orange boxes are below the big"
+          text run at (0,20) width 70: "yellow box."
+layer at (8,72) size 192x192
+  RenderBlock (relative positioned) {DIV} at (0,56) size 192x192 [bgcolor=#FFFF00]
+    RenderBlock (anonymous) at (0,0) size 192x20
+    RenderBlock (anonymous) at (0,40) size 192x20
+    RenderBlock (anonymous) at (0,80) size 192x20
+    RenderBlock (anonymous) at (0,120) size 192x20
+      RenderText {#text} at (0,0) size 0x0
+layer at (8,264) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,284) size 192x20
+  RenderBlock (anonymous) at (0,20) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,304) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,324) size 192x20
+  RenderBlock (anonymous) at (0,60) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,344) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
+layer at (8,364) size 192x20
+  RenderBlock (anonymous) at (0,100) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
+layer at (8,384) size 61x19
+  RenderInline (relative positioned) {DIV} at (0,0) size 61x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 61x19
+      text run at (0,0) width 61: "Filler Text"
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png
new file mode 100644 (file)
index 0000000..d66cb1d
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt
new file mode 100644 (file)
index 0000000..d115163
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 984x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the orange box sits atop the blue box and both are in the center of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 784x20
+  RenderBlock (anonymous) at (0,36) size 784x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+layer at (200,264) size 68x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 68x19 [bgcolor=#FFFF00]
+    RenderInline {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+      RenderInline {I} at (0,0) size 68x19
+        RenderText {#text} at (0,0) size 68x19
+          text run at (0,0) width 68: "Filler Text"
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png
new file mode 100644 (file)
index 0000000..d66cb1d
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt
new file mode 100644 (file)
index 0000000..d115163
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 984x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the orange box sits atop the blue box and both are in the center of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 784x20
+  RenderBlock (anonymous) at (0,36) size 784x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+layer at (200,264) size 68x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 68x19 [bgcolor=#FFFF00]
+    RenderInline {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+      RenderInline {I} at (0,0) size 68x19
+        RenderText {#text} at (0,0) size 68x19
+          text run at (0,0) width 68: "Filler Text"
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png
new file mode 100644 (file)
index 0000000..d2f2e9f
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt
new file mode 100644 (file)
index 0000000..c62cc9f
--- /dev/null
@@ -0,0 +1,26 @@
+layer at (0,0) size 984x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the orange box sits atop the blue box and both are in the center of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0 [bgcolor=#FFFF00]
+          RenderText {#text} at (0,0) size 0x0
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderInline {SPAN} at (0,0) size 68x19 [bgcolor=#FFFF00]
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 784x20
+  RenderBlock (anonymous) at (0,36) size 784x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+layer at (200,264) size 68x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+    RenderInline {I} at (0,0) size 68x19
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png
new file mode 100644 (file)
index 0000000..d66cb1d
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt
new file mode 100644 (file)
index 0000000..d115163
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 984x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the orange box sits atop the blue box and both are in the center of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 784x20
+  RenderBlock (anonymous) at (0,36) size 784x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+layer at (200,264) size 68x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 68x19 [bgcolor=#FFFF00]
+    RenderInline {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+      RenderInline {I} at (0,0) size 68x19
+        RenderText {#text} at (0,0) size 68x19
+          text run at (0,0) width 68: "Filler Text"
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png
new file mode 100644 (file)
index 0000000..d66cb1d
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt
new file mode 100644 (file)
index 0000000..5b94a83
--- /dev/null
@@ -0,0 +1,22 @@
+layer at (0,0) size 984x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the orange box sits atop the blue box and both are in the center of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 784x20
+  RenderBlock (anonymous) at (0,36) size 784x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+layer at (200,264) size 68x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+    RenderInline {I} at (0,0) size 68x19
+      RenderText {#text} at (0,0) size 68x19
+        text run at (0,0) width 68: "Filler Text"
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png
new file mode 100644 (file)
index 0000000..33a414b
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt
new file mode 100644 (file)
index 0000000..e3a581c
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 543x19
+          text run at (0,0) width 543: "Test passes if the orange box sits atop the blue box and both are in the top left of the view."
+      RenderBlock (anonymous) at (0,36) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0 [bgcolor=#0000FF]
+          RenderText {#text} at (0,0) size 0x0
+          RenderInline {I} at (0,0) size 0x0
+            RenderText {#text} at (0,0) size 0x0
+      RenderBlock (anonymous) at (0,36) size 784x20
+        RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+          RenderText {#text} at (0,0) size 68x19
+            text run at (0,0) width 68: "Filler Text"
+      RenderBlock (anonymous) at (0,56) size 784x20
+        RenderInline {SPAN} at (0,0) size 68x19 [bgcolor=#0000FF]
+          RenderInline {I} at (0,0) size 68x19
+            RenderText {#text} at (0,0) size 68x19
+              text run at (0,0) width 68: "Filler Text"
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png
new file mode 100644 (file)
index 0000000..f20106d
Binary files /dev/null and b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt b/LayoutTests/platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt
new file mode 100644 (file)
index 0000000..8fdf230
--- /dev/null
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x100
+  RenderBlock {HTML} at (0,0) size 800x100
+    RenderBody {BODY} at (8,16) size 784x76
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 538x19
+          text run at (0,0) width 538: "Test passes if the blue box sits atop the orange box and both are in the center of the view."
+      RenderBlock {DIV} at (0,36) size 192x40 [bgcolor=#FF0000]
+        RenderBlock (anonymous) at (0,0) size 192x20
+        RenderBlock (anonymous) at (0,40) size 192x0
+          RenderText {#text} at (0,0) size 0x0
+layer at (200,244) size 69x19
+  RenderInline (relative positioned) {SPAN} at (0,0) size 69x19 [bgcolor=#0000FF]
+    RenderText {#text} at (0,0) size 69x19
+      text run at (0,0) width 69: "Filler Text1"
+layer at (200,264) size 192x20
+  RenderBlock (anonymous) at (0,20) size 192x20
+    RenderBlock {DIV} at (0,0) size 192x20 [bgcolor=#FFA500]
+      RenderText {#text} at (0,0) size 61x19
+        text run at (0,0) width 61: "Filler Text"
index 12a422e..f1e7575 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png and b/LayoutTests/platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png differ
index 12a422e..f1e7575 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png and b/LayoutTests/platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png differ
index 0dcca52..a74b940 100644 (file)
@@ -8,8 +8,6 @@ layer at (0,0) size 800x320
           text run at (0,0) width 305: "This should be an unobscured fuzzy green polygon:"
       RenderBlock {DIV} at (0,36) size 784x100
         RenderBlock (anonymous) at (0,0) size 784x50
-        RenderBlock (anonymous) at (0,50) size 784x0
-          RenderBlock {DIV} at (0,0) size 784x0
         RenderBlock (anonymous) at (0,50) size 784x50
           RenderText {#text} at (0,0) size 0x0
       RenderBlock {P} at (0,152) size 784x20
@@ -41,6 +39,9 @@ layer at (8,52) size 160x50
       RenderText {#text} at (60,0) size 100x50
         text run at (60,0) width 50: " "
         text run at (110,0) width 50: " "
+layer at (8,102) size 784x0
+  RenderBlock (anonymous) at (0,50) size 784x0
+    RenderBlock {DIV} at (0,0) size 784x0
 layer at (8,102) size 60x50
   RenderInline (relative positioned) {SPAN} at (0,0) size 60x50 [bgcolor=#FFFFFF]
     RenderInline {SPAN} at (0,0) size 60x50
index 218e2f7..6c8021e 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png and b/LayoutTests/platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png differ
index 7f2f27b..a34afdc 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png and b/LayoutTests/platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png differ
index 0b6c31b..1508ec1 100644 (file)
@@ -1,5 +1,5 @@
-layer at (0,0) size 785x1146
-  RenderView at (0,0) size 785x600
+layer at (0,0) size 792x1146
+  RenderView at (0,0) size 785x585
 layer at (0,0) size 785x1146
   RenderBlock {HTML} at (0,0) size 785x1146
     RenderBody {BODY} at (8,8) size 769x1125 [bgcolor=#EEEEEE]
@@ -70,7 +70,6 @@ layer at (0,0) size 785x1146
                 text run at (63,0) width 63: "Phones "
               RenderBR {BR} at (126,15) size 0x0
             RenderText {#text} at (0,0) size 0x0
-      RenderBlock (anonymous) at (0,217) size 769x62
       RenderBlock (anonymous) at (0,279) size 769x0
         RenderInline {SPAN} at (0,0) size 0x0
           RenderInline {SPAN} at (0,0) size 0x0
@@ -468,7 +467,9 @@ layer at (23,184) size 20x16
     RenderText {#text} at (0,0) size 0x0
     RenderImage {IMG} at (0,21) size 20x20
     RenderText {#text} at (0,0) size 0x0
-layer at (28,210) size 520x62
+layer at (23,225) size 769x62
+  RenderBlock (anonymous) at (0,217) size 769x62
+layer at (43,210) size 520x62
   RenderTable {TABLE} at (0,0) size 520x62 [border: (1px outset #808080)]
     RenderTableSection {TBODY} at (1,1) size 518x60
       RenderTableRow {TR} at (0,2) size 518x23 [bgcolor=#E0E0E0]
index 0b6c31b..1508ec1 100644 (file)
@@ -1,5 +1,5 @@
-layer at (0,0) size 785x1146
-  RenderView at (0,0) size 785x600
+layer at (0,0) size 792x1146
+  RenderView at (0,0) size 785x585
 layer at (0,0) size 785x1146
   RenderBlock {HTML} at (0,0) size 785x1146
     RenderBody {BODY} at (8,8) size 769x1125 [bgcolor=#EEEEEE]
@@ -70,7 +70,6 @@ layer at (0,0) size 785x1146
                 text run at (63,0) width 63: "Phones "
               RenderBR {BR} at (126,15) size 0x0
             RenderText {#text} at (0,0) size 0x0
-      RenderBlock (anonymous) at (0,217) size 769x62
       RenderBlock (anonymous) at (0,279) size 769x0
         RenderInline {SPAN} at (0,0) size 0x0
           RenderInline {SPAN} at (0,0) size 0x0
@@ -468,7 +467,9 @@ layer at (23,184) size 20x16
     RenderText {#text} at (0,0) size 0x0
     RenderImage {IMG} at (0,21) size 20x20
     RenderText {#text} at (0,0) size 0x0
-layer at (28,210) size 520x62
+layer at (23,225) size 769x62
+  RenderBlock (anonymous) at (0,217) size 769x62
+layer at (43,210) size 520x62
   RenderTable {TABLE} at (0,0) size 520x62 [border: (1px outset #808080)]
     RenderTableSection {TBODY} at (1,1) size 518x60
       RenderTableRow {TR} at (0,2) size 518x23 [bgcolor=#E0E0E0]
index 4c211f0..c7a66d9 100644 (file)
@@ -8,42 +8,36 @@ layer at (0,0) size 800x600
           text run at (0,0) width 148: "Outline ring painting test."
       RenderBlock {DIV} at (0,36) size 784x99
         RenderBlock (anonymous) at (0,0) size 784x20
-        RenderBlock (anonymous) at (0,38) size 784x23
-          RenderBlock {H3} at (0,0) size 784x23
-            RenderText {#text} at (0,0) size 146x22
-              text run at (0,0) width 146: "Bold with margin."
         RenderBlock (anonymous) at (0,79) size 784x20
       RenderBlock {DIV} at (0,153) size 784x61
         RenderBlock (anonymous) at (0,0) size 784x0
-        RenderBlock (anonymous) at (0,0) size 784x23
-          RenderBlock {H3} at (0,0) size 784x23
-            RenderText {#text} at (0,0) size 151x22
-              text run at (0,0) width 151: "No content before."
         RenderBlock (anonymous) at (0,41) size 784x20
       RenderBlock {DIV} at (0,230) size 784x61
         RenderBlock (anonymous) at (0,0) size 784x20
-        RenderBlock (anonymous) at (0,38) size 784x23
-          RenderBlock {H3} at (0,0) size 784x23
-            RenderText {#text} at (0,0) size 175x22
-              text run at (0,0) width 175: "But No Content After"
         RenderBlock (anonymous) at (0,79) size 784x0
       RenderBlock {DIV} at (0,309) size 784x23
         RenderBlock (anonymous) at (0,0) size 784x0
-        RenderBlock (anonymous) at (0,0) size 784x23
-          RenderBlock {H3} at (0,0) size 784x23
-            RenderText {#text} at (0,0) size 218x22
-              text run at (0,0) width 218: "No content before or after."
         RenderBlock (anonymous) at (0,41) size 784x0
 layer at (8,52) size 95x19
   RenderInline (relative positioned) {SPAN} at (0,0) size 95x19
     RenderText {#text} at (0,0) size 95x19
       text run at (0,0) width 95: "Content before."
+layer at (8,90) size 784x23
+  RenderBlock (anonymous) at (0,38) size 784x23
+    RenderBlock {H3} at (0,0) size 784x23
+      RenderText {#text} at (0,0) size 146x22
+        text run at (0,0) width 146: "Bold with margin."
 layer at (8,131) size 79x19
   RenderInline (relative positioned) {SPAN} at (0,0) size 79x19
     RenderText {#text} at (0,0) size 79x19
       text run at (0,0) width 79: "Content after"
 layer at (8,169) size 0x0
   RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
+layer at (8,169) size 784x23
+  RenderBlock (anonymous) at (0,0) size 784x23
+    RenderBlock {H3} at (0,0) size 784x23
+      RenderText {#text} at (0,0) size 151x22
+        text run at (0,0) width 151: "No content before."
 layer at (8,210) size 83x19
   RenderInline (relative positioned) {SPAN} at (0,0) size 83x19
     RenderText {#text} at (0,0) size 83x19
@@ -52,9 +46,19 @@ layer at (8,246) size 91x19
   RenderInline (relative positioned) {SPAN} at (0,0) size 91x19
     RenderText {#text} at (0,0) size 91x19
       text run at (0,0) width 91: "Content before"
+layer at (8,284) size 784x23
+  RenderBlock (anonymous) at (0,38) size 784x23
+    RenderBlock {H3} at (0,0) size 784x23
+      RenderText {#text} at (0,0) size 175x22
+        text run at (0,0) width 175: "But No Content After"
 layer at (8,325) size 0x0
   RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
 layer at (8,325) size 0x0
   RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
+layer at (8,325) size 784x23
+  RenderBlock (anonymous) at (0,0) size 784x23
+    RenderBlock {H3} at (0,0) size 784x23
+      RenderText {#text} at (0,0) size 218x22
+        text run at (0,0) width 218: "No content before or after."
 layer at (8,366) size 0x0
   RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
index c6e1dc7..7ee5077 100644 (file)
@@ -1,5 +1,5 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
+layer at (0,0) size 802x585
+  RenderView at (0,0) size 800x585
 layer at (0,0) size 800x302
   RenderBlock {HTML} at (0,0) size 800x302
     RenderBody {BODY} at (8,16) size 784x278
@@ -12,14 +12,15 @@ layer at (0,0) size 800x302
         RenderText {#text} at (342,0) size 282x19
           text run at (342,0) width 282: ". The rotated box should be correctly redrawn."
       RenderBlock (anonymous) at (0,36) size 784x20
-      RenderBlock (anonymous) at (0,56) size 784x202
       RenderBlock (anonymous) at (0,258) size 784x20
         RenderText {#text} at (0,0) size 0x0
 layer at (18,112) size 79x59
   RenderInline (relative positioned) {SPAN} at (0,0) size 79x59 [bgcolor=#DDDDDD]
     RenderText {#text} at (20,0) size 59x19
       text run at (20,0) width 59: "Container"
-layer at (108,172) size 202x202
+layer at (18,132) size 784x202
+  RenderBlock (anonymous) at (0,56) size 784x202
+layer at (118,232) size 202x202
   RenderBlock (relative positioned) {DIV} at (0,0) size 202x202 [bgcolor=#CCCCCC] [border: (1px solid #000000)]
 layer at (18,334) size 20x59
   RenderInline (relative positioned) {SPAN} at (0,0) size 20x59 [bgcolor=#DDDDDD]
index 15b0d9f..02d326f 100644 (file)
@@ -4181,3 +4181,9 @@ BUGWK65072 : svg/text/ems-display-none.svg = IMAGE IMAGE+TEXT
 
 // Needs baselines for MAC and WIN.
 BUGWK76465 MAC WIN : fast/css/non-empty-span.html = IMAGE+TEXT
+
+// Need rebaselining.
+BUGWK69210 MAC : fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
+BUGWK69210 MAC : fast/encoding/utf-16-little-endian.html = IMAGE+TEXT
+BUGWK69210 MAC : fast/inline/continuation-outlines-with-layers-2.html = TEXT
+BUGWK69210 MAC : fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT
index b860ae0..fe3db0e 100644 (file)
@@ -100,3 +100,10 @@ BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL
 BUGWK74270 : fast/forms/basic-selects.html = FAIL
 
 BUGWK76639 : fast/table/multiple-captions-crash3.html = IMAGE FAIL
+
+// Need rebaselining.
+BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
+BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT
+BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT
index 53c158a..faac623 100644 (file)
@@ -207,3 +207,10 @@ BUGWK74874 : fast/table/027-vertical.html = TEXT
 // Need rebaselining.
 BUGWK37244: tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT
 BUGWK37244: tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT
+
+// Need rebaselining.
+BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
+BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT
+BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT
index 14047bf..2aa4172 100644 (file)
@@ -28,3 +28,10 @@ BUGWK68859 DEBUG : fast/dynamic/crash-paint-no-documentElement-renderer.html = C
 
 // Needs baseline
 BUGWK76118 : fast/css/text-overflow-input.html = MISSING
+
+// Need rebaselining.
+BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT
+BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT
+BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT
+BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT
index fee7a1a..c9c917f 100644 (file)
@@ -1645,3 +1645,10 @@ fast/repaint/table-section-repaint.html
 // Need rebaselining after bug 37244.
 tables/mozilla/bugs/bug27038-1.html
 tables/mozilla/bugs/bug27038-2.html
+
+// Need rebaselining after bug 69210.
+fast/encoding/utf-16-big-endian.html
+fast/encoding/utf-16-little-endian.html
+fast/inline/continuation-outlines-with-layers-2.html
+fast/inline/continuation-outlines-with-layers.html
+fast/repaint/transform-absolute-in-positioned-container.html
index f497a88..da2cd8e 100644 (file)
@@ -1,3 +1,65 @@
+2012-02-18  Robert Hogan  <robert@webkit.org>
+
+        CSS 2.1 failure: inline-box-002.htm fails
+        https://bugs.webkit.org/show_bug.cgi?id=69210
+
+        Reviewed by David Hyatt.
+
+        Tests: css2.1/20110323/dynamic-top-change-005.htm
+               css2.1/20110323/dynamic-top-change-005a.htm
+               css2.1/20110323/dynamic-top-change-005b.htm
+               css2.1/20110323/inline-box-002.htm
+               fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html
+               fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html
+               fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html
+               fast/css/relative-positioned-block-nested-with-inline-parent.html
+               fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html
+               fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html
+               fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html
+               fast/css/relative-positioned-block-with-inline-ancestor.html
+               fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html
+               fast/css/relative-positioned-block-with-inline-parent-dynamic.html
+               fast/css/relative-positioned-block-with-inline-parent-keeps-style.html
+               fast/css/relative-positioned-block-with-inline-parent.html
+
+        A block within an inline is affected by relative positioning on the inline box. Give
+        the anonymous block containing the block a layer and make it relative positioned. Then
+        calculate the offset of the anonymous block's layer by accumulating the offsets from its
+        inline continuation and the inline continuation's inline parents.
+        If the position of an inline changes from or to relative positioned then ensure that any
+        descendant blocks update their position and layer accordingly.
+
+        * rendering/RenderBoxModelObject.cpp:
+        (): add an enum RelPosAxis
+        (WebCore::accumulateRelativePositionOffsets): 
+        Total up the offsets of all relatively positioned inlines that are de-facto parents of the relatively 
+        positioned anonymous block's child block.
+
+        (WebCore):
+        (WebCore::RenderBoxModelObject::relativePositionOffsetX): 
+        Use accumulateRelativePositionOffsets when calculating the relative position offset of a relatively positioned anonymous block.
+
+        (WebCore::RenderBoxModelObject::relativePositionOffsetY): ditto
+
+        * rendering/RenderInline.cpp:
+        (WebCore::hasRelPositionedInlineAncestor): 
+        Detects if the anonymous block contains a block that is the de-facto descendant of a relatively positioned inline.
+
+        (WebCore::updateStyleOfAnonymousBlockContinuations): 
+        Update the style's positioning for each anonymous block containing a block that is descendant from the inline whose style has changed.
+
+        (WebCore::RenderInline::styleDidChange): 
+        If an inline changes to or from relative positioning ensure that any descendant blocks change to or from relative positioning
+        as well, unless they still have a relatively positioned ancestor after the current ancestor loses its relative positioning.
+
+        (WebCore::RenderInline::addChildIgnoringContinuation): 
+        If the anonymous block contains a block that is effectively descended from a relatively positioned inline, make it relatively
+        positioned so the block will respect its inline ancestor's relative positioning.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::propagateStyleToAnonymousChildren): 
+        Preserve style position in anonymous block continuations when the parent block propagates a style change. 
+
 2012-02-18  raman Tenneti  <rtenneti@chromium.org>
 
         Track the NPN protocol version negotiated with the server
index 367c857..8f753cd 100644 (file)
@@ -401,8 +401,26 @@ void RenderBoxModelObject::updateBoxModelInfoFromStyle()
     setHorizontalWritingMode(styleToUse->isHorizontalWritingMode());
 }
 
+enum RelPosAxis { RelPosX, RelPosY };
+
+static LayoutUnit accumulateRelativePositionOffsets(const RenderObject* child, RelPosAxis axis)
+{
+    if (!child->isAnonymousBlock() || !child->isRelPositioned())
+        return 0;
+    LayoutUnit offset = 0;
+    RenderObject* p = toRenderBlock(child)->inlineElementContinuation();
+    while (p && p->isRenderInline()) {
+        if (p->isRelPositioned())
+            offset += (axis == RelPosX) ? toRenderInline(p)->relativePositionOffsetX() : toRenderInline(p)->relativePositionOffsetY();
+        p = p->parent();
+    }
+    return offset;
+}
+
 LayoutUnit RenderBoxModelObject::relativePositionOffsetX() const
 {
+    LayoutUnit offset = accumulateRelativePositionOffsets(this, RelPosX);
+
     // Objects that shrink to avoid floats normally use available line width when computing containing block width.  However
     // in the case of relative positioning using percentages, we can't do this.  The offset should always be resolved using the
     // available width of the containing block.  Therefore we don't use containingBlockLogicalWidthForContent() here, but instead explicitly
@@ -411,19 +429,20 @@ LayoutUnit RenderBoxModelObject::relativePositionOffsetX() const
         RenderBlock* cb = containingBlock();
         if (!style()->right().isAuto() && !cb->style()->isLeftToRightDirection())
             return -style()->right().calcValue(cb->availableWidth());
-        return style()->left().calcValue(cb->availableWidth());
+        return offset + style()->left().calcValue(cb->availableWidth());
     }
     if (!style()->right().isAuto()) {
         RenderBlock* cb = containingBlock();
-        return -style()->right().calcValue(cb->availableWidth());
+        return offset + -style()->right().calcValue(cb->availableWidth());
     }
-    return 0;
+    return offset;
 }
 
 LayoutUnit RenderBoxModelObject::relativePositionOffsetY() const
 {
+    LayoutUnit offset = accumulateRelativePositionOffsets(this, RelPosY);
+    
     RenderBlock* containingBlock = this->containingBlock();
-
     // If the containing block of a relatively positioned element does not
     // specify a height, a percentage top or bottom offset should be resolved as
     // auto. An exception to this is if the containing block has the WinIE quirk
@@ -434,15 +453,15 @@ LayoutUnit RenderBoxModelObject::relativePositionOffsetY() const
         && (!containingBlock->style()->height().isAuto()
             || !style()->top().isPercent()
             || containingBlock->stretchesToViewport()))
-        return style()->top().calcValue(containingBlock->availableHeight());
+        return offset + style()->top().calcValue(containingBlock->availableHeight());
 
     if (!style()->bottom().isAuto()
         && (!containingBlock->style()->height().isAuto()
             || !style()->bottom().isPercent()
             || containingBlock->stretchesToViewport()))
-        return -style()->bottom().calcValue(containingBlock->availableHeight());
+        return offset + -style()->bottom().calcValue(containingBlock->availableHeight());
 
-    return 0;
+    return offset;
 }
 
 LayoutUnit RenderBoxModelObject::offsetLeft() const
index 1175f31..f09681a 100644 (file)
@@ -126,6 +126,33 @@ void RenderInline::updateBoxModelInfoFromStyle()
     setHasReflection(false);    
 }
 
+static bool hasRelPositionedInlineAncestor(RenderObject* p)
+{
+    while (p && p->isRenderInline()) {
+        if (p->isRelPositioned())
+            return true;
+        p = p->parent();
+    }
+    return false;
+}
+
+static void updateStyleOfAnonymousBlockContinuations(RenderObject* block, const RenderStyle* newStyle, const RenderStyle* oldStyle)
+{
+    for (;block && block->isAnonymousBlock(); block = block->nextSibling()) {
+        if (!toRenderBlock(block)->isAnonymousBlockContinuation() || block->style()->position() == newStyle->position())
+            continue;
+        // If we are no longer relatively positioned but our descendant block(s) still have a relatively positioned ancestor then 
+        // their containing anonymous block should keep its relative positioning. 
+        RenderInline* cont = toRenderBlock(block)->inlineElementContinuation();
+        if (oldStyle->position() == RelativePosition && hasRelPositionedInlineAncestor(cont))
+            continue;
+        RefPtr<RenderStyle> blockStyle = RenderStyle::createAnonymousStyle(block->style());
+        blockStyle->setPosition(newStyle->position());
+        blockStyle->setDisplay(BLOCK);
+        block->setStyle(blockStyle);
+    }
+}
+
 void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
 {
     RenderBoxModelObject::styleDidChange(diff, oldStyle);
@@ -137,13 +164,24 @@ void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
     // and after the block share the same style, but the block doesn't
     // need to pass its style on to anyone else.
     RenderStyle* newStyle = style();
-    for (RenderInline* currCont = inlineElementContinuation(); currCont; currCont = currCont->inlineElementContinuation()) {
+    RenderInline* continuation = inlineElementContinuation();
+    for (RenderInline* currCont = continuation; currCont; currCont = currCont->inlineElementContinuation()) {
         RenderBoxModelObject* nextCont = currCont->continuation();
         currCont->setContinuation(0);
         currCont->setStyle(newStyle);
         currCont->setContinuation(nextCont);
     }
 
+    // If an inline's relative positioning has changed then any descendant blocks will need to change their relative positioning accordingly.
+    // Do this by updating the position of the descendant blocks' containing anonymous blocks - there may be more than one.
+    if (continuation && oldStyle && newStyle->position() != oldStyle->position() 
+        && (newStyle->position() == RelativePosition || (oldStyle->position() == RelativePosition))) {
+        // If any descendant blocks exist then they will be in the next anonymous block and its siblings.
+        RenderObject* block = containingBlock()->nextSibling();
+        ASSERT(block && block->isAnonymousBlock());
+        updateStyleOfAnonymousBlockContinuations(block, newStyle, oldStyle);
+    }
+
     if (!m_alwaysCreateLineBoxes) {
         bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations() || newStyle->hasPadding() || newStyle->hasMargin() || hasOutline();
         if (oldStyle && alwaysCreateLineBoxes) {
@@ -245,6 +283,11 @@ void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
         // the children after |beforeChild| and put them in a clone of this object.
         RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
         newStyle->setDisplay(BLOCK);
+        
+        // If inside an inline affected by relative positioning the block needs to be affected by it too.
+        // Giving the block a layer like this allows it to collect the x/y offsets from inline parents later.
+        if (hasRelPositionedInlineAncestor(this))
+            newStyle->setPosition(RelativePosition);
 
         RenderBlock* newBox = new (renderArena()) RenderBlock(document() /* anonymous box */);
         newBox->setStyle(newStyle.release());
index 865c9dc..7ff4343 100755 (executable)
@@ -1937,6 +1937,12 @@ void RenderObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly)
             if (child->style()->columnSpan())
                 newStyle->setColumnSpan(ColumnSpanAll);
         }
+
+        // Preserve the position style of anonymous block continuations as they can have relative position when
+        // they contain block descendants of relative positioned inlines.
+        if (child->isRelPositioned() && toRenderBlock(child)->isAnonymousBlockContinuation())
+            newStyle->setPosition(child->style()->position());
+
         newStyle->setDisplay(child->style()->display());
         child->setStyle(newStyle.release());
     }