Title: [153003] trunk
Revision
153003
Author
[email protected]
Date
2013-07-22 15:10:07 -0700 (Mon, 22 Jul 2013)

Log Message

segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
https://bugs.webkit.org/show_bug.cgi?id=118965

Patch by Zalan Bujtas <[email protected]> on 2013-07-22
Reviewed by Simon Fraser.

Do not change the composition state unless we can reliably figure out the iframe's size.
If the renderer is not yet attached, its size is not computable.

Source/WebCore:

Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):

LayoutTests:

* compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt: Added.
* compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html: Added.
* compositing/iframes/resources/embed-tag-with-composition.html: Added.
* platform/efl/TestExpectations: skip
* platform/efl-wk2/TestExpectations: skip
* platform/qt-5.0-wk1/TestExpectations: skip
* platform/qt-5.0-wk2/TestExpectations: skip

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (153002 => 153003)


--- trunk/LayoutTests/ChangeLog	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/LayoutTests/ChangeLog	2013-07-22 22:10:07 UTC (rev 153003)
@@ -1,3 +1,21 @@
+2013-07-22  Zalan Bujtas  <[email protected]>
+
+        segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
+        https://bugs.webkit.org/show_bug.cgi?id=118965
+
+        Reviewed by Simon Fraser.
+
+        Do not change the composition state unless we can reliably figure out the iframe's size.
+        If the renderer is not yet attached, its size is not computable.
+
+        * compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt: Added.
+        * compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html: Added.
+        * compositing/iframes/resources/embed-tag-with-composition.html: Added.
+        * platform/efl/TestExpectations: skip
+        * platform/efl-wk2/TestExpectations: skip
+        * platform/qt-5.0-wk1/TestExpectations: skip
+        * platform/qt-5.0-wk2/TestExpectations: skip
+
 2013-07-22  Chris Fleizach  <[email protected]>
 
         AX: VoiceOver only read the first column in a safari table

Added: trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt (0 => 153003)


--- trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt	2013-07-22 22:10:07 UTC (rev 153003)
@@ -0,0 +1,3 @@
+PASS, if changing the iFrame's position attribute, while its content mandates layer composition, does not crash the browser.
+
+

Added: trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html (0 => 153003)


--- trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html	2013-07-22 22:10:07 UTC (rev 153003)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+        
+    function runTest() {
+          window.setTimeout(function() {
+          var testFrame = document.getElementById('pluginFrame');
+  
+          testFrame.style.position = 'absolute';
+          testFrame.style.padding = '10%';
+            // Need to wait for compositing layers to be updated.
+            window.setTimeout(function() {
+                if (window.testRunner) {
+                    testRunner.notifyDone();
+                }
+            }, 0);
+        }, 0);
+    }
+</script>
+</head>
+<body>
+<p>PASS, if changing the iFrame's position attribute, while its content mandates layer composition, does not crash the browser.</p>
+<iframe _onload_='runTest();' id='pluginFrame' src=""
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/compositing/iframes/resources/embed-tag-with-composition.html (0 => 153003)


--- trunk/LayoutTests/compositing/iframes/resources/embed-tag-with-composition.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/resources/embed-tag-with-composition.html	2013-07-22 22:10:07 UTC (rev 153003)
@@ -0,0 +1 @@
+<embed type="application/x-webkit-test-netscape" drawingmodel="coreanimation">

Modified: trunk/LayoutTests/platform/efl/TestExpectations (153002 => 153003)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-07-22 22:10:07 UTC (rev 153003)
@@ -1089,6 +1089,7 @@
 webkit.org/b/79766 compositing/iframes/iframe-size-to-zero.html [ Failure ]
 webkit.org/b/79766 compositing/iframes/iframe-src-change.html [ Failure ]
 webkit.org/b/79766 compositing/iframes/resizer.html [ Missing ]
+webkit.org/b/79766 compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html [ Failure ]
 webkit.org/b/79766 compositing/layer-creation/spanOverlapsCanvas.html [ Failure ]
 webkit.org/b/79766 compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html [ Skip ]
 webkit.org/b/79766 compositing/overflow/nested-scrolling.html [ Skip ]

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (153002 => 153003)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-07-22 22:10:07 UTC (rev 153003)
@@ -508,6 +508,7 @@
 compositing/iframes/overlapped-nested-iframes.html [ Failure ]
 compositing/iframes/page-cache-layer-tree.html [ Failure ]
 compositing/iframes/scrolling-iframe.html [ Failure ]
+compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html [ Failure ]
 compositing/images/clip-on-directly-composited-image.html [ Failure ]
 compositing/layer-creation/animation-overlap-with-children.html [ Failure ]
 compositing/layer-creation/fixed-position-and-transform.html [ Failure ]

Modified: trunk/LayoutTests/platform/qt-5.0-wk1/TestExpectations (153002 => 153003)


--- trunk/LayoutTests/platform/qt-5.0-wk1/TestExpectations	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/LayoutTests/platform/qt-5.0-wk1/TestExpectations	2013-07-22 22:10:07 UTC (rev 153003)
@@ -25,6 +25,7 @@
 compositing/geometry/video-opacity-overlay.html
 compositing/iframes/iframe-in-composited-layer.html
 compositing/iframes/resizer.html
+compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
 compositing/layer-creation/fixed-position-scroll.html
 compositing/layers-inside-overflow-scroll.html
 compositing/plugins/composited-plugin.html

Modified: trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations (153002 => 153003)


--- trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations	2013-07-22 22:10:07 UTC (rev 153003)
@@ -172,6 +172,7 @@
 compositing/plugins
 compositing/video
 compositing/layers-inside-overflow-scroll.html
+compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
 
 # [Qt][WK2] New compositing test are failing since added in r126663.
 # webkit.org/b/95076 

Modified: trunk/Source/WebCore/ChangeLog (153002 => 153003)


--- trunk/Source/WebCore/ChangeLog	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/Source/WebCore/ChangeLog	2013-07-22 22:10:07 UTC (rev 153003)
@@ -1,3 +1,18 @@
+2013-07-22  Zalan Bujtas  <[email protected]>
+
+        segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
+        https://bugs.webkit.org/show_bug.cgi?id=118965
+
+        Reviewed by Simon Fraser.
+
+        Do not change the composition state unless we can reliably figure out the iframe's size.
+        If the renderer is not yet attached, its size is not computable.
+
+        Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
+
 2013-07-22  Chris Fleizach  <[email protected]>
 
         AX: VoiceOver only read the first column in a safari table

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (153002 => 153003)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-07-22 22:04:23 UTC (rev 153002)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-07-22 22:10:07 UTC (rev 153003)
@@ -2158,7 +2158,7 @@
         return false;
 
     // If we can't reliably know the size of the iframe yet, don't change compositing state.
-    if (renderer->needsLayout())
+    if (!renderer->parent() || renderer->needsLayout())
         return frameRenderer->hasLayer() && frameRenderer->layer()->isComposited();
     
     // Don't go into compositing mode if height or width are zero.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to