[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
simon.fraser at apple.com
simon.fraser at apple.com
Thu Oct 29 20:31:27 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 42ea5ae1bbb8bca2eee370fd1db8e7d2564c79ea
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 21 21:27:24 2009 +0000
2009-09-21 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
Incorrect clipping with accelerated compositing content, and position:fixed
https://bugs.webkit.org/show_bug.cgi?id=29347
Fix the compositing clipping logic to behave correctly when position:fixed
elements clip, by using the new backgroundClipRect() method to determine
when we need to clip, and to compute the clipping layer position.
Test: compositing/overflow/fixed-position-ancestor-clip.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::clippedByAncestor):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3553d1f..e804864 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2009-09-21 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Incorrect clipping with accelerated compositing content, and position:fixed
+ https://bugs.webkit.org/show_bug.cgi?id=29347
+
+ New test with a position:fixed element that clips a composited child,
+ and a new pixel result.
+
+ * platform/mac/compositing/overflow/ancestor-overflow-expected.checksum:
+ * platform/mac/compositing/overflow/ancestor-overflow-expected.png:
+ Updating the pixel result to account for a progression in this test.
+
+ * compositing/overflow/fixed-position-ancestor-clip.html: Added.
+ * platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.checksum: Added.
+ * platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.png: Added.
+ * platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.txt: Added.
+
2009-09-21 Eric Carlson <eric.carlson at apple.com>
Reviewed by Brady Eidson.
diff --git a/LayoutTests/compositing/overflow/fixed-position-ancestor-clip.html b/LayoutTests/compositing/overflow/fixed-position-ancestor-clip.html
new file mode 100644
index 0000000..95b9077
--- /dev/null
+++ b/LayoutTests/compositing/overflow/fixed-position-ancestor-clip.html
@@ -0,0 +1,47 @@
+<!DOCTYPE>
+
+<html>
+<head>
+ <title>Position fixed with transform</title>
+ <style type="text/css" media="screen">
+ body {
+ height: 1000px;
+ width: 1000px;
+ }
+ #fixed {
+ position: fixed;
+ width: 100px;
+ height: 100px;
+ background-color: red;
+ overflow: hidden;
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ -webkit-transform: translateZ(0);
+ }
+
+ p {
+ position: absolute;
+ left: 50px;
+ top: 150px;
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+ window.addEventListener('load', function() {
+ window.scrollBy(50, 50);
+ }, false);
+ </script>
+</head>
+<body>
+
+ <p>You should see a single green square, with no red.</p>
+ <div id="fixed">
+ <div class="box">
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.checksum b/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.checksum
index 544814b..8a74061 100644
--- a/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.checksum
+++ b/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.checksum
@@ -1 +1 @@
-a5b922963bd90c788be70cd81b6d097e
\ No newline at end of file
+96a4db327e82efaedb81fbe38d4b12f3
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.png b/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.png
index 835cbab..98aa90d 100644
Binary files a/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.png and b/LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.checksum b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.checksum
new file mode 100644
index 0000000..ac95cb2
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.checksum
@@ -0,0 +1 @@
+74873fdad6c977c17c84b5cb5cc83f2c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.png b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.png
new file mode 100644
index 0000000..2a15400
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.txt b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.txt
new file mode 100644
index 0000000..897052a
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/fixed-position-ancestor-clip-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 1008x1016
+ RenderView at (0,0) size 785x585
+layer at (0,0) size 1008x1016
+ RenderBlock {HTML} at (0,0) size 785x1016
+ RenderBody {BODY} at (8,8) size 1000x1000
+layer at (50,166) size 318x18
+ RenderBlock (positioned) {P} at (50,166) size 318x18
+ RenderText {#text} at (0,0) size 318x18
+ text run at (0,0) width 318: "You should see a single green square, with no red."
+layer at (58,58) size 100x100
+ RenderBlock (positioned) {DIV} at (8,8) size 100x100 [bgcolor=#FF0000]
+layer at (58,58) size 100x100
+ RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+scrolled to 50,50
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66de958..03de0e5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-09-21 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Incorrect clipping with accelerated compositing content, and position:fixed
+ https://bugs.webkit.org/show_bug.cgi?id=29347
+
+ Fix the compositing clipping logic to behave correctly when position:fixed
+ elements clip, by using the new backgroundClipRect() method to determine
+ when we need to clip, and to compute the clipping layer position.
+
+ Test: compositing/overflow/fixed-position-ancestor-clip.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::clippedByAncestor):
+
2009-09-21 Nate Chapin <japhet at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index d99140e..941817c 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -257,10 +257,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
// Call calculateRects to get the backgroundRect which is what is used to clip the contents of this
// layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects
// for a compositing layer, rootLayer is the layer itself.
- ClipRects parentRects;
- m_owningLayer->parentClipRects(compAncestor, parentRects, true);
- IntRect parentClipRect = parentRects.overflowClipRect();
-
+ IntRect parentClipRect = m_owningLayer->backgroundClipRect(compAncestor, true);
m_ancestorClippingLayer->setPosition(FloatPoint() + (parentClipRect.location() - graphicsLayerParentLocation));
m_ancestorClippingLayer->setSize(parentClipRect.size());
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index f996971..bcd1f08 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -867,10 +867,8 @@ bool RenderLayerCompositor::clippedByAncestor(RenderLayer* layer) const
if (!computeClipRoot || computeClipRoot == layer)
return false;
- ClipRects parentRects;
- layer->parentClipRects(computeClipRoot, parentRects, true);
-
- return parentRects.overflowClipRect() != ClipRects::infiniteRect();
+ IntRect backgroundRect = layer->backgroundClipRect(computeClipRoot, true);
+ return backgroundRect != ClipRects::infiniteRect();
}
// Return true if the given layer is a stacking context and has compositing child
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list