Title: [105471] trunk
- Revision
- 105471
- Author
- [email protected]
- Date
- 2012-01-19 18:41:06 -0800 (Thu, 19 Jan 2012)
Log Message
Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
https://bugs.webkit.org/show_bug.cgi?id=75682
Source/WebCore:
Reviewed by James Robinson.
RenderLayerBacking::isSimpleContainerCompositingLayer() gave incorret
results in the case where the layer itself was visibility:hidden, but
where it had visible, non-composited descendant layers.
Fix by breaking RenderLayerBacking::hasVisibleNonCompositingDescendants()
into two methods, one that tests for renderers in this layer which
render stuff (and are thus affected by visibility on this layer), and
another which walks descendant, non-composited layers looking for those
which are visible.
Removed an early return in the "renderObject->node()->isDocumentNode()"
clause, because we want to run the same code that we run for non-document
nodes.
Test: compositing/visibility/layer-visible-content.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsNonEmptyRenderers):
(WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
* rendering/RenderLayerBacking.h:
LayoutTests:
Reviewed by James Robinson.
Testcase with a combination of visibility:hidden, overflow, positioning and
transforms.
* compositing/visibility/layer-visible-content-expected.png: Added.
* compositing/visibility/layer-visible-content-expected.txt: Added.
* compositing/visibility/layer-visible-content.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (105470 => 105471)
--- trunk/LayoutTests/ChangeLog 2012-01-20 02:21:07 UTC (rev 105470)
+++ trunk/LayoutTests/ChangeLog 2012-01-20 02:41:06 UTC (rev 105471)
@@ -1,3 +1,17 @@
+2012-01-19 Simon Fraser <[email protected]>
+
+ Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
+ https://bugs.webkit.org/show_bug.cgi?id=75682
+
+ Reviewed by James Robinson.
+
+ Testcase with a combination of visibility:hidden, overflow, positioning and
+ transforms.
+
+ * compositing/visibility/layer-visible-content-expected.png: Added.
+ * compositing/visibility/layer-visible-content-expected.txt: Added.
+ * compositing/visibility/layer-visible-content.html: Added.
+
2012-01-19 Cary Clark <[email protected]>
[Skia Mac] Match style of platform error underline for misspellings
Added: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (0 => 105471)
--- trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-01-20 02:41:06 UTC (rev 105471)
@@ -0,0 +1,26 @@
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (contentsVisible 0)
+ (children 1
+ (GraphicsLayer
+ (bounds 200.00 200.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 10.00 10.00)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visibility/layer-visible-content.html (0 => 105471)
--- trunk/LayoutTests/compositing/visibility/layer-visible-content.html (rev 0)
+++ trunk/LayoutTests/compositing/visibility/layer-visible-content.html 2012-01-20 02:41:06 UTC (rev 105471)
@@ -0,0 +1,70 @@
+<html>
+<head>
+ <style type="text/css">
+ body {
+ margin: 0;
+ overflow: hidden;
+ }
+
+ .container {
+ visibility: hidden;
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ overflow: hidden;
+ z-index: 0;
+ }
+
+ .box {
+ height: 100px;
+ width: 100px;
+ }
+
+ .indicator {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color:red;
+ }
+
+ .visible-box {
+ background-color:green;
+ }
+ .composited {
+ -webkit-transform:translateZ(0);
+ height: 10px;
+ width: 10px;
+ }
+ pre {
+ opacity: 0; /* hide in pixel result */
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText(true);
+
+ function dumpLayers()
+ {
+ if (window.layoutTestController)
+ document.getElementById('layer-tree').innerText = layoutTestController.layerTreeAsText();
+ }
+ window.addEventListener('load', dumpLayers, false);
+ </script>
+</head>
+
+<body>
+ <!-- You should see a green box in the top left, and no red. -->
+ <div class="indicator box"></div>
+
+ <div class="container">
+ <div style="position: relative;">
+ <div style="visibility:visible;">
+ <div class="visible-box box">
+ <div class="composited box"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+<pre id="layer-tree">Layer tree goes here in DRT</pre>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/compositing/visibility/layer-visible-content.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (105470 => 105471)
--- trunk/Source/WebCore/ChangeLog 2012-01-20 02:21:07 UTC (rev 105470)
+++ trunk/Source/WebCore/ChangeLog 2012-01-20 02:41:06 UTC (rev 105471)
@@ -1,3 +1,32 @@
+2012-01-19 Simon Fraser <[email protected]>
+
+ Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
+ https://bugs.webkit.org/show_bug.cgi?id=75682
+
+ Reviewed by James Robinson.
+
+ RenderLayerBacking::isSimpleContainerCompositingLayer() gave incorret
+ results in the case where the layer itself was visibility:hidden, but
+ where it had visible, non-composited descendant layers.
+
+ Fix by breaking RenderLayerBacking::hasVisibleNonCompositingDescendants()
+ into two methods, one that tests for renderers in this layer which
+ render stuff (and are thus affected by visibility on this layer), and
+ another which walks descendant, non-composited layers looking for those
+ which are visible.
+
+ Removed an early return in the "renderObject->node()->isDocumentNode()"
+ clause, because we want to run the same code that we run for non-document
+ nodes.
+
+ Test: compositing/visibility/layer-visible-content.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+ (WebCore::RenderLayerBacking::containsNonEmptyRenderers):
+ (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
+ * rendering/RenderLayerBacking.h:
+
2012-01-19 Alexandre Elias <[email protected]>
[chromium] Draw gutter quads outside root content layer
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (105470 => 105471)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-01-20 02:21:07 UTC (rev 105470)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-01-20 02:41:06 UTC (rev 105471)
@@ -816,7 +816,7 @@
return true;
if (renderObject->node() && renderObject->node()->isDocumentNode()) {
- // Look to see if the root object has a non-simple backgound
+ // Look to see if the root object has a non-simple background
RenderObject* rootObject = renderObject->document()->documentElement()->renderer();
if (!rootObject)
return false;
@@ -838,23 +838,19 @@
if (hasBoxDecorationsOrBackgroundImage(style))
return false;
-
- // Check to see if all the body's children are compositing layers.
- if (hasVisibleNonCompositingDescendants())
- return false;
-
- return true;
}
// Check to see if all the renderer's children are compositing layers.
- if (isVisible && hasVisibleNonCompositingDescendants())
+ if (isVisible && containsNonEmptyRenderers())
return false;
+
+ if (hasVisibleNonCompositingDescendantLayers())
+ return false;
return true;
}
-// Conservative test for having no rendered children.
-bool RenderLayerBacking::hasVisibleNonCompositingDescendants() const
+bool RenderLayerBacking::containsNonEmptyRenderers() const
{
// Some HTML can cause whitespace text nodes to have renderers, like:
// <div>
@@ -870,7 +866,12 @@
return true;
}
}
+ return false;
+}
+// Conservative test for having no rendered children.
+bool RenderLayerBacking::hasVisibleNonCompositingDescendantLayers() const
+{
if (Vector<RenderLayer*>* normalFlowList = m_owningLayer->normalFlowList()) {
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (105470 => 105471)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.h 2012-01-20 02:21:07 UTC (rev 105470)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h 2012-01-20 02:41:06 UTC (rev 105471)
@@ -197,7 +197,8 @@
Color rendererBackgroundColor() const;
void updateBackgroundColor();
- bool hasVisibleNonCompositingDescendants() const;
+ bool containsNonEmptyRenderers() const;
+ bool hasVisibleNonCompositingDescendantLayers() const;
void paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase, RenderObject* paintingRoot);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes