Modified: trunk/Source/WebCore/ChangeLog (120126 => 120127)
--- trunk/Source/WebCore/ChangeLog 2012-06-12 21:55:26 UTC (rev 120126)
+++ trunk/Source/WebCore/ChangeLog 2012-06-12 21:57:05 UTC (rev 120127)
@@ -1,3 +1,21 @@
+2012-06-12 Dana Jansens <dan...@chromium.org>
+
+ [chromium] Return empty visibleLayerRect for layers with empty content bounds
+ https://bugs.webkit.org/show_bug.cgi?id=88901
+
+ Reviewed by Adrienne Walker.
+
+ This change should only affect tests. Currently if you set up a
+ CCLayerImpl with some bounds, but don't set the contentBounds, then
+ they are empty by default. In this case the visibleLayerRect gets
+ set inappropriately to the layer's target surface contentRect which
+ in a completely different coordinate space.
+
+ Fixed up tests that were passing bogusly and failed after this change.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
+ (WebCore::calculateVisibleLayerRect):
+
2012-06-12 Adrienne Walker <e...@google.com>
[chromium] ScrollingCoordinator::setScrollLayer should update scroll layer ids
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (120126 => 120127)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-12 21:55:26 UTC (rev 120126)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-12 21:57:05 UTC (rev 120127)
@@ -165,7 +165,7 @@
targetSurfaceRect.intersect(layer->clipRect());
if (targetSurfaceRect.isEmpty() || layer->contentBounds().isEmpty())
- return targetSurfaceRect;
+ return IntRect();
// Note carefully these are aliases
const IntSize& bounds = layer->bounds();
Modified: trunk/Source/WebKit/chromium/ChangeLog (120126 => 120127)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-12 21:55:26 UTC (rev 120126)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-12 21:57:05 UTC (rev 120127)
@@ -1,3 +1,12 @@
+2012-06-12 Dana Jansens <dan...@chromium.org>
+
+ [chromium] Return empty visibleLayerRect for layers with empty content bounds
+ https://bugs.webkit.org/show_bug.cgi?id=88901
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+
2012-06-12 Mark Mentovai <m...@chromium.org>
[chromium mac] Don't #include things in subframeworks of
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (120126 => 120127)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-06-12 21:55:26 UTC (rev 120126)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-06-12 21:57:05 UTC (rev 120127)
@@ -95,6 +95,7 @@
root->setAnchorPoint(FloatPoint(0, 0));
root->setPosition(FloatPoint(0, 0));
root->setBounds(IntSize(10, 10));
+ root->setContentBounds(IntSize(10, 10));
root->setVisibleLayerRect(IntRect(0, 0, 10, 10));
root->setDrawsContent(true);
myHostImpl->setRootLayer(root.release());
@@ -722,6 +723,7 @@
{
setAnchorPoint(FloatPoint(0, 0));
setBounds(IntSize(10, 10));
+ setContentBounds(IntSize(10, 10));
setDrawsContent(true);
}
@@ -742,6 +744,7 @@
OwnPtr<CCLayerImpl> root = CCLayerImpl::create(0);
root->setAnchorPoint(FloatPoint(0, 0));
root->setBounds(IntSize(10, 10));
+ root->setContentBounds(root->bounds());
root->setDrawsContent(false);
m_hostImpl->setRootLayer(root.release());
}
@@ -1393,6 +1396,7 @@
root->setAnchorPoint(FloatPoint(0, 0));
root->setPosition(FloatPoint(rootRect.x(), rootRect.y()));
root->setBounds(IntSize(rootRect.width(), rootRect.height()));
+ root->setContentBounds(root->bounds());
root->setVisibleLayerRect(rootRect);
root->setDrawsContent(false);
root->renderSurface()->setContentRect(IntRect(IntPoint(), IntSize(rootRect.width(), rootRect.height())));
@@ -1401,12 +1405,14 @@
child->setPosition(FloatPoint(childRect.x(), childRect.y()));
child->setOpacity(0.5f);
child->setBounds(IntSize(childRect.width(), childRect.height()));
+ child->setContentBounds(child->bounds());
child->setVisibleLayerRect(childRect);
child->setDrawsContent(false);
grandChild->setAnchorPoint(FloatPoint(0, 0));
grandChild->setPosition(IntPoint(grandChildRect.x(), grandChildRect.y()));
grandChild->setBounds(IntSize(grandChildRect.width(), grandChildRect.height()));
+ grandChild->setContentBounds(grandChild->bounds());
grandChild->setVisibleLayerRect(grandChildRect);
grandChild->setDrawsContent(true);