WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2007 21:45:56 +0000 (21:45 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2007 21:45:56 +0000 (21:45 +0000)
        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page

        Test: fast/dynamic/subtree-boundary-percent-height.html

        * rendering/RenderObject.cpp:
        (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
        percent heights because sometimes they compute to 'auto'.

LayoutTests:

        Reviewed by Dave Hyatt.

        - test for <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page

        * fast/dynamic/subtree-boundary-percent-height.html: Added.
        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.checksum: Added.
        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png: Added.
        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/dynamic/subtree-boundary-percent-height.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderObject.cpp

index 8f584e9ea3aa6c084095bfb20213ea35b8a884af..b9ef32e0a34fd4f28697ff2fb92534d39a4b976e 100644 (file)
@@ -1,3 +1,14 @@
+2007-12-19  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        - test for <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
+
+        * fast/dynamic/subtree-boundary-percent-height.html: Added.
+        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.checksum: Added.
+        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png: Added.
+        * platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.txt: Added.
+
 2007-12-18  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Oliver.
 2007-12-18  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Oliver.
diff --git a/LayoutTests/fast/dynamic/subtree-boundary-percent-height.html b/LayoutTests/fast/dynamic/subtree-boundary-percent-height.html
new file mode 100644 (file)
index 0000000..01dc5f0
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <script>
+        function test()
+        {
+            document.body.offsetTop;
+            document.getElementById("inner").style.height = "100px";
+        }
+    </script>
+</head>
+<body onload="test()">
+    <div style="height: 200px;">
+        <div style="height: auto;">
+            <div style="width: 100px; height: 1%; overflow: hidden; background-color: white;">
+                <div id="inner" style="height: 0;"></div>
+            </div>
+        </div>
+        <div style="width: 100px; height: 100px; background-color: green;"></div>
+    </div>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.checksum b/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.checksum
new file mode 100644 (file)
index 0000000..2fdd308
--- /dev/null
@@ -0,0 +1 @@
+3af7a2ccd24693b63772100b59774c87
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png b/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png
new file mode 100644 (file)
index 0000000..519669e
Binary files /dev/null and b/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.txt b/LayoutTests/platform/mac/fast/dynamic/subtree-boundary-percent-height-expected.txt
new file mode 100644 (file)
index 0000000..57279c7
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x216
+  RenderBlock {HTML} at (0,0) size 800x216
+    RenderBody {BODY} at (8,8) size 784x200
+      RenderBlock {DIV} at (0,0) size 784x200
+        RenderBlock {DIV} at (0,0) size 784x100
+        RenderBlock {DIV} at (0,100) size 100x100 [bgcolor=#008000]
+layer at (8,8) size 100x100
+  RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FFFFFF]
+    RenderBlock {DIV} at (0,0) size 100x100
index 2fba29532710ca737c1b9a4cdfe9e68a267b9bd4..8fd0dc31f6518dac95875b3b64959a316e1d3b9c 100644 (file)
@@ -1,3 +1,15 @@
+2007-12-19  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
+
+        Test: fast/dynamic/subtree-boundary-percent-height.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
+        percent heights because sometimes they compute to 'auto'.
+
 2007-12-19  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Maciej.
 2007-12-19  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Maciej.
index 07ba54ff6099d5c882e6e3ab66aa175dd3b85fae..dcd8c5ab6dee82d05cb9b7ecab82ac7394a3c44f 100644 (file)
@@ -711,7 +711,7 @@ static inline bool objectIsRelayoutBoundary(const RenderObject *obj)
 {
     // FIXME: In future it may be possible to broaden this condition in order to improve performance 
     return obj->isTextField() || obj->isTextArea()
 {
     // FIXME: In future it may be possible to broaden this condition in order to improve performance 
     return obj->isTextField() || obj->isTextArea()
-        || obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto()
+        || obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto() && !obj->style()->height().isPercent()
 #if ENABLE(SVG)
            || obj->isSVGRoot()
 #endif
 #if ENABLE(SVG)
            || obj->isSVGRoot()
 #endif