Transforms create a containing block, so
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2008 19:05:10 +0000 (19:05 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2008 19:05:10 +0000 (19:05 +0000)
RenderLayer::shouldBeOverflowOnly() needs to look for transforms.
<https://bugs.webkit.org/show_bug.cgi?id=18886>

Reviewed by Dave Hyatt

Test: fast/transforms/transform-overflow.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeOverflowOnly):

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

LayoutTests/ChangeLog
LayoutTests/fast/transforms/transform-overflow.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/transform-overflow-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayer.cpp

index 1efa0e93d5bb83e624f296c04882224429a7caab..984bb52be410cfea08a2437bf8d4e1d4212edc90 100644 (file)
@@ -1,3 +1,13 @@
+2008-07-10  Simon Fraser  <simon.fraser@apple.com>
+
+        Reviewed by Dave Hyatt
+        
+        Test for <https://bugs.webkit.org/show_bug.cgi?id=18886>
+        RenderLayer::shouldBeOverflowOnly() should look for transforms
+
+        * fast/transforms/transform-overflow.html: Added.
+        * platform/mac/fast/transforms/transform-overflow-expected.txt: Added.
+
 2008-07-09  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Darin
diff --git a/LayoutTests/fast/transforms/transform-overflow.html b/LayoutTests/fast/transforms/transform-overflow.html
new file mode 100644 (file)
index 0000000..3bade09
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+<head>
+  <style type="text/css" media="screen">
+    body {
+      margin: 0;
+    }
+    
+    #one {
+      position:absolute;
+      left: 50px;
+      top:50px;
+      width:100px;
+      height:100px;
+      background-color:red;
+      z-index:0;
+    }
+    
+    #two {
+      width:200px;
+      height:200px;
+      overflow: auto;
+      -webkit-transform: scale(0.5);
+      background-color:green;
+      z-index:0;
+    }
+  </style>
+</head>
+<body>
+  <div id="one"></div>
+  <div id="two"></div>
+  <p>You should see one green square above</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/transforms/transform-overflow-expected.txt b/LayoutTests/platform/mac/fast/transforms/transform-overflow-expected.txt
new file mode 100644 (file)
index 0000000..906b9c3
--- /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 (0,0) size 800x584
+      RenderBlock {P} at (0,216) size 800x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: "You should see one green square above"
+layer at (50,50) size 100x100
+  RenderBlock (positioned) {DIV} at (50,50) size 100x100 [bgcolor=#FF0000]
+layer at (0,0) size 200x200
+  RenderBlock {DIV} at (0,0) size 200x200 [bgcolor=#008000]
index eefd8eade55356dcf7b45037c12924edb2d8dd68..de3c890f39d4a6fc1b92eb564bdaec96d6602be3 100644 (file)
@@ -1,3 +1,16 @@
+2008-07-10  Simon Fraser  <simon.fraser@apple.com>
+
+        Transforms create a containing block, so
+        RenderLayer::shouldBeOverflowOnly() needs to look for transforms.
+        <https://bugs.webkit.org/show_bug.cgi?id=18886>
+        
+        Reviewed by Dave Hyatt
+
+        Test: fast/transforms/transform-overflow.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::shouldBeOverflowOnly):
+
 2008-07-09  Alex Mathews  <possessedpenguinbob@gmail.com>
 
         Reviewed by Oliver Hunt.
index 589d1c1a24d8cef0364f8d27c8be9adf53f9a59f..437754f55edfeba83faddf43aaf395571a97eaab 100644 (file)
@@ -2333,6 +2333,7 @@ bool RenderLayer::shouldBeOverflowOnly() const
     return (renderer()->hasOverflowClip() || renderer()->hasReflection()) && 
            !renderer()->isPositioned() &&
            !renderer()->isRelPositioned() &&
+           !renderer()->hasTransform() &&
            !isTransparent();
 }