LayoutTests:
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2007 00:22:30 +0000 (00:22 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2007 00:22:30 +0000 (00:22 +0000)
        Reviewed by Hyatt.

        Test you don't crash when you have abs positioned elements inside rel inline.

        * fast/block/positioning/abs-inside-inline-rel-expected.checksum: Added.
        * fast/block/positioning/abs-inside-inline-rel-expected.png: Added.
        * fast/block/positioning/abs-inside-inline-rel-expected.txt: Added.
        * fast/block/positioning/abs-inside-inline-rel.html: Added.

WebCore:

        Reviewed by Hyatt.

        Fix asserts, these may also be called for rel positioned elements

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setStaticX):
        (WebCore::RenderBox::setStaticY):

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

LayoutTests/ChangeLog
LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.checksum [new file with mode: 0644]
LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.png [new file with mode: 0644]
LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/positioning/abs-inside-inline-rel.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBox.cpp

index 6f115909840683951e9bc0d8c22a8ef6931204e1..f8572f0c613c51ec355ce16b189de9b4b300f35f 100644 (file)
@@ -1,3 +1,14 @@
+2007-04-03  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Hyatt.
+        
+        Test you don't crash when you have abs positioned elements inside rel inline.
+
+        * fast/block/positioning/abs-inside-inline-rel-expected.checksum: Added.
+        * fast/block/positioning/abs-inside-inline-rel-expected.png: Added.
+        * fast/block/positioning/abs-inside-inline-rel-expected.txt: Added.
+        * fast/block/positioning/abs-inside-inline-rel.html: Added.
+
 2007-04-02  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by darin
diff --git a/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.checksum b/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.checksum
new file mode 100644 (file)
index 0000000..36b1394
--- /dev/null
@@ -0,0 +1 @@
+34d3e04829249d43f44c97892a499c59
\ No newline at end of file
diff --git a/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.png b/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.png
new file mode 100644 (file)
index 0000000..05df416
Binary files /dev/null and b/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.png differ
diff --git a/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.txt b/LayoutTests/fast/block/positioning/abs-inside-inline-rel-expected.txt
new file mode 100644 (file)
index 0000000..99ecf5a
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 106x72
+  RenderBlock (positioned) {SPAN} at (0,0) size 106x72
+    RenderText {#text} at (0,0) size 106x72
+      text run at (0,0) width 106: "position:absolute"
+      text run at (0,18) width 70: "span inside"
+      text run at (0,36) width 100: "position:relative"
+      text run at (0,54) width 29: "span"
diff --git a/LayoutTests/fast/block/positioning/abs-inside-inline-rel.html b/LayoutTests/fast/block/positioning/abs-inside-inline-rel.html
new file mode 100644 (file)
index 0000000..90e5ae2
--- /dev/null
@@ -0,0 +1 @@
+<span style="position: relative"><span style="position: absolute"> position:absolute span inside position:relative span </span> </span>
\ No newline at end of file
index cf382901875b41cfb3c71e1953cf2fb8ee8ae04b..b913fca8cc4787cc512439118033c3c83a1d7f5f 100644 (file)
@@ -1,3 +1,13 @@
+2007-04-03  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Hyatt.
+
+        Fix asserts, these may also be called for rel positioned elements
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::setStaticX):
+        (WebCore::RenderBox::setStaticY):
+
 2007-04-02  David Hyatt  <hyatt@apple.com>
 
         Throw in an assert to try to track down a problem where an image is being set to a smaller encoded
index 59d6ec7e748b6eec9586aa222c3ef044d8f8748d..38a87f40ca4bf4d71951d221593ffc365e9d8fce 100644 (file)
@@ -1479,13 +1479,13 @@ int RenderBox::staticY() const
 
 void RenderBox::setStaticX(int staticX)
 {
-    ASSERT(isPositioned());
+    ASSERT(isPositioned() || isRelPositioned());
     m_layer->setStaticX(staticX);
 }
 
 void RenderBox::setStaticY(int staticY)
 {
-    ASSERT(isPositioned());
+    ASSERT(isPositioned() || isRelPositioned());
     
     if (staticY == m_layer->staticY())
         return;