https://bugs.webkit.org/show_bug.cgi?id=145630
Reviewed by Zalan Bujtas.
Source/WebCore:
r184968 changed the initial value of m_intersectsCoverageRect to false. However,
this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
updated.
Fix by copying the value of m_intersectsCoverageRect from the main layer to its
mask layer, just as we do for m_visibleRect and m_coverageRect.
Test: compositing/visible-rect/mask-layer-coverage.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
LayoutTests:
Test that dumps coverage info for a layer with a mask.
* compositing/visible-rect/mask-layer-coverage-expected.txt: Added.
* compositing/visible-rect/mask-layer-coverage.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185187
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2015-06-03 Simon Fraser <simon.fraser@apple.com>
+ REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
+ https://bugs.webkit.org/show_bug.cgi?id=145630
+
+ Reviewed by Zalan Bujtas.
+
+ Test that dumps coverage info for a layer with a mask.
+
+ * compositing/visible-rect/mask-layer-coverage-expected.txt: Added.
+ * compositing/visible-rect/mask-layer-coverage.html: Added.
+
+2015-06-03 Simon Fraser <simon.fraser@apple.com>
+
Layer tree dumps should include mask layers
https://bugs.webkit.org/show_bug.cgi?id=145629
--- /dev/null
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (coverage rect 0.00, 0.00 800.00 x 600.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (coverage rect 0.00, 0.00 800.00 x 600.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 44.00 42.00)
+ (contentsOpaque 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 44.00 42.00)
+ (drawsContent 1)
+ (visible rect 0.00, 0.00 44.00 x 42.00)
+ (coverage rect -8.00, -8.00 800.00 x 600.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ )
+ (visible rect 0.00, 0.00 44.00 x 42.00)
+ (coverage rect -8.00, -8.00 800.00 x 600.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ (contents layer 0.00, 0.00 44.00 x 42.00)
+ )
+ )
+ )
+ )
+)
+
--- /dev/null
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ height: 42px;
+ width: 44px;
+ background-color: blue;
+ -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAsCAYAAAATmipGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUZJREFUeNrU2S8sRWEYgPFzD7PZbDYbQSAoBBKFwgQTmKRpJE3SaBKFRKJJJphiCslNt1AERRBsNpvN/DmeL7ybGfLzne3Xn517d873vqcsimIOtSKDq0Id0zmEhktM5hAazjGWQ2g4xUgOocknjjFkDw0fOMSAPfR78AH67KHhDXvotYeGV+yg2x4aXrCFLntoeMYGOuyh4QnraLeHhkesos0eGh6wglZ7aLjHMlrsoeEOi2i2h4ZbLKC0h4ZrzP8XXMk0MPvbeFRJXf0cjyq5NB5NlIX/qsX/1non6/afvvHXrsESeGN/PMUDv8n8Cl0yv0L1hxL9MU9/cE6jyJp5FNEPd2lc3kSneQGxbV5ApJXOLnqsK5137JuXZLF27Dcvco8waF7knmDYvBo/w6j5Y8MFxs2fb9LEN2UfnmaKDD4xfgkwANpCXZrruKGvAAAAAElFTkSuQmCC);
+ }
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function doTest()
+ {
+ if (window.internals)
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_CONTENT_LAYERS)
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+<div class="composited box"></div>
+<pre id="layers">Layer tree goes here when testing</pre>
+</body>
+</html>
2015-06-03 Simon Fraser <simon.fraser@apple.com>
+ REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
+ https://bugs.webkit.org/show_bug.cgi?id=145630
+
+ Reviewed by Zalan Bujtas.
+
+ r184968 changed the initial value of m_intersectsCoverageRect to false. However,
+ this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
+ updated.
+
+ Fix by copying the value of m_intersectsCoverageRect from the main layer to its
+ mask layer, just as we do for m_visibleRect and m_coverageRect.
+
+ Test: compositing/visible-rect/mask-layer-coverage.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
+
+2015-06-03 Simon Fraser <simon.fraser@apple.com>
+
Layer tree dumps should include mask layers
https://bugs.webkit.org/show_bug.cgi?id=145629
if (intersectsCoverageRect != m_intersectsCoverageRect) {
m_uncommittedChanges |= CoverageRectChanged;
m_intersectsCoverageRect = intersectsCoverageRect;
+
+ if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) {
+ maskLayer->m_uncommittedChanges |= CoverageRectChanged;
+ maskLayer->m_intersectsCoverageRect = intersectsCoverageRect;
+ }
}
if (visibleRectChanged) {