[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
simon.fraser at apple.com
simon.fraser at apple.com
Wed Mar 17 18:23:01 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit b6b28fffa1581f6a03b9e79e6097dff150e3124b
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 22:43:59 2010 +0000
2010-03-05 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
MobileMe movie page is missing playback controls
https://bugs.webkit.org/show_bug.cgi?id=35805
<rdar://problem/7653169>
On pages with video or plug-ins, we run overlap tests to determine which layers
need to be composited. There was an ordering dependency bug in
RenderLayerCompositor::computeCompositingRequirements() that caused us to fail
to detect that a layer needed to be composited, resulting in page content
not being visible.
Specifically, layer->setHasCompositingDescendant() can change the answer
to needsToBeComposited(), when a layer has to clip compositing descendants.
So if we change setHasCompositingDescendant(), then we need to re-test
clipsCompositingDescendants() and add the layer to the overlap map if so.
Test: compositing/overflow/overflow-compositing-descendant.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 65a698a..2aac886 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-05 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ MobileMe movie page is missing playback controls
+ https://bugs.webkit.org/show_bug.cgi?id=35805
+ <rdar://problem/7653169>
+
+ Testcase with a layer that becomes composited as a result of clipping a
+ video element, with a later sibling that should get composited.
+
+ * compositing/overflow/overflow-compositing-descendant.html: Added.
+ * platform/mac/compositing/overflow/overflow-compositing-descendant-expected.checksum: Added.
+ * platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png: Added.
+ * platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt: Added.
+
2010-03-04 Dumitru Daniliuc <dumi at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/compositing/overflow/overflow-compositing-descendant.html b/LayoutTests/compositing/overflow/overflow-compositing-descendant.html
new file mode 100644
index 0000000..9995637
--- /dev/null
+++ b/LayoutTests/compositing/overflow/overflow-compositing-descendant.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css" media="screen">
+
+ .movie {
+ position: absolute;
+ overflow: hidden;
+ height: 200px;
+ width: 110px;
+ padding: 10px;
+ background-color: white;
+ border: 1px solid black;
+ }
+
+ video {
+ background-color: black;
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ }
+
+ .test {
+ position: relative;
+ margin-top: -100px;
+ background-color: green;
+ }
+
+ .indicator {
+ background-color: red;
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+ </script>
+</head>
+<body>
+
+ <p>You should see a green box under the video. If you see red, the test failed.</p>
+ <div class="movie content">
+ <video src="../resources/video.mp4" height="100" width="100"></video>
+ <div class="indicator box"></div>
+ <div class="test box"></div>
+ </div>
+
+ <script type="text/javascript" charset="utf-8">
+ var video = document.getElementsByTagName('video')[0];
+ video.addEventListener('canplaythrough', function() {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }, false);
+ </script>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.checksum b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.checksum
new file mode 100644
index 0000000..75e8dfb
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.checksum
@@ -0,0 +1 @@
+168bc4c793be43ac7373532e72b428a2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png
new file mode 100644
index 0000000..5c9f08d
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt
new file mode 100644
index 0000000..ec043bb
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x50
+ RenderBlock {HTML} at (0,0) size 800x50
+ RenderBody {BODY} at (8,16) size 784x18
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 467x18
+ text run at (0,0) width 467: "You should see a green box under the video. If you see red, the test failed."
+layer at (8,50) size 132x222 clip at (9,51) size 130x220 scrollHeight 224
+ RenderBlock (positioned) {DIV} at (8,50) size 132x222 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+ RenderBlock (anonymous) at (11,11) size 110x104
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (11,115) size 100x100 [bgcolor=#FF0000]
+layer at (19,61) size 100x100
+ RenderVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000]
+layer at (19,165) size 100x100
+ RenderBlock (relative positioned) {DIV} at (11,115) size 100x100 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 982b674..8c59218 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-03-05 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ MobileMe movie page is missing playback controls
+ https://bugs.webkit.org/show_bug.cgi?id=35805
+ <rdar://problem/7653169>
+
+ On pages with video or plug-ins, we run overlap tests to determine which layers
+ need to be composited. There was an ordering dependency bug in
+ RenderLayerCompositor::computeCompositingRequirements() that caused us to fail
+ to detect that a layer needed to be composited, resulting in page content
+ not being visible.
+
+ Specifically, layer->setHasCompositingDescendant() can change the answer
+ to needsToBeComposited(), when a layer has to clip compositing descendants.
+ So if we change setHasCompositingDescendant(), then we need to re-test
+ clipsCompositingDescendants() and add the layer to the overlap map if so.
+
+ Test: compositing/overflow/overflow-compositing-descendant.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
2010-03-04 Dumitru Daniliuc <dumi at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index 8f7b9d6..854be0d 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -495,7 +495,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
++childState.m_depth;
#endif
- const bool willBeComposited = needsToBeComposited(layer);
+ bool willBeComposited = needsToBeComposited(layer);
if (willBeComposited) {
// Tell the parent it has compositing descendants.
compositingState.m_subtreeIsCompositing = true;
@@ -560,6 +560,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
layer->setMustOverlapCompositedLayers(true);
if (overlapMap)
addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
+ willBeComposited = true;
}
if (layer->reflectionLayer())
@@ -569,15 +570,21 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
if (childState.m_subtreeIsCompositing)
compositingState.m_subtreeIsCompositing = true;
+ // Set the flag to say that this SC has compositing children.
+ layer->setHasCompositingDescendant(childState.m_subtreeIsCompositing);
+
+ // setHasCompositingDescendant() may have changed the answer to needsToBeComposited() when clipping,
+ // so test that again.
+ if (!willBeComposited && clipsCompositingDescendants(layer)) {
+ if (overlapMap)
+ addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
+ willBeComposited = true;
+ }
+
// If the layer is going into compositing mode, repaint its old location.
if (!layer->isComposited() && needsToBeComposited(layer))
repaintOnCompositingChange(layer);
- // Set the flag to say that this SC has compositing children.
- // this can affect the answer to needsToBeComposited() when clipping,
- // but that's ok here.
- layer->setHasCompositingDescendant(childState.m_subtreeIsCompositing);
-
// Update backing now, so that we can use isComposited() reliably during tree traversal in rebuildCompositingLayerTree().
if (updateBacking(layer, CompositingChangeRepaintNow))
layersChanged = true;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list