Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2603)

Unified Diff: Source/web/tests/GraphicsLayerTest.cpp

Issue 138453004: Pinch/Zoom Infrastructure & Plumbing CL (Prequel) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use setContentsRect() instead of directly accessing contentLayer bounds. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/PinchViewports.cpp ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/GraphicsLayerTest.cpp
diff --git a/Source/web/tests/GraphicsLayerTest.cpp b/Source/web/tests/GraphicsLayerTest.cpp
index 4b00655268b82910b869ed1e5e3c7cba976eb102..926676c9c7890fb0ae3f2b6742f86d58e738680d 100644
--- a/Source/web/tests/GraphicsLayerTest.cpp
+++ b/Source/web/tests/GraphicsLayerTest.cpp
@@ -65,11 +65,17 @@ class GraphicsLayerTest : public testing::Test {
public:
GraphicsLayerTest()
{
+ m_clipLayer = adoptPtr(new GraphicsLayerForTesting(&m_client));
m_graphicsLayer = adoptPtr(new GraphicsLayerForTesting(&m_client));
+ m_clipLayer->addChild(m_graphicsLayer.get());
+ m_graphicsLayer->platformLayer()->setScrollClipLayer(
+ m_clipLayer->platformLayer());
m_platformLayer = m_graphicsLayer->platformLayer();
m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting(WebUnitTestSupport::TestViewTypeUnitTest));
ASSERT(m_layerTreeView);
- m_layerTreeView->setRootLayer(*m_platformLayer);
+ m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer());
+ m_layerTreeView->registerViewportLayers(
+ m_clipLayer->platformLayer(), m_graphicsLayer->platformLayer(), 0);
m_layerTreeView->setViewportSize(WebSize(1, 1), WebSize(1, 1));
}
@@ -82,6 +88,7 @@ public:
protected:
WebLayer* m_platformLayer;
OwnPtr<GraphicsLayerForTesting> m_graphicsLayer;
+ OwnPtr<GraphicsLayerForTesting> m_clipLayer;
private:
OwnPtr<WebLayerTreeView> m_layerTreeView;
« no previous file with comments | « Source/web/PinchViewports.cpp ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698