Modified: trunk/Source/WebKit/chromium/ChangeLog (108938 => 108939)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-02-27 01:11:20 UTC (rev 108938)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-02-27 01:12:27 UTC (rev 108939)
@@ -1,5 +1,12 @@
2012-02-26 James Robinson <jam...@chromium.org>
+ Compile fix for CCLayerTreeHostImpl test.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+
+2012-02-26 James Robinson <jam...@chromium.org>
+
[chromium] Wire up shouldUpdateScrollPositionOnMainThread and nonFastScrollableRegion to compositor
https://bugs.webkit.org/show_bug.cgi?id=79155
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (108938 => 108939)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-02-27 01:11:20 UTC (rev 108938)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-02-27 01:12:27 UTC (rev 108939)
@@ -207,24 +207,24 @@
TEST_F(CCLayerTreeHostImplTest, shouldScrollOnMainThread)
{
- RefPtr<CCLayerImpl> root = CCLayerImpl::create(0);
+ OwnPtr<CCLayerImpl> root = CCLayerImpl::create(0);
root->setScrollable(true);
root->setScrollPosition(IntPoint(0, 0));
root->setMaxScrollPosition(IntSize(100, 100));
- m_hostImpl->setRootLayer(root);
root->setShouldScrollOnMainThread(true);
+ m_hostImpl->setRootLayer(root.release());
EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(0, 0), CCInputHandlerClient::Wheel), CCInputHandlerClient::ScrollFailed);
EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(0, 0), CCInputHandlerClient::Gesture), CCInputHandlerClient::ScrollFailed);
}
TEST_F(CCLayerTreeHostImplTest, nonFastScrollableRegionBasic)
{
- RefPtr<CCLayerImpl> root = CCLayerImpl::create(0);
+ OwnPtr<CCLayerImpl> root = CCLayerImpl::create(0);
root->setScrollable(true);
root->setScrollPosition(IntPoint(0, 0));
root->setMaxScrollPosition(IntSize(100, 100));
- m_hostImpl->setRootLayer(root);
root->setNonFastScrollableRegion(IntRect(0, 0, 50, 50));
+ m_hostImpl->setRootLayer(root.release());
// All scroll types inside the non-fast scrollable region should fail.
EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(25, 25), CCInputHandlerClient::Wheel), CCInputHandlerClient::ScrollFailed);
EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(25, 25), CCInputHandlerClient::Gesture), CCInputHandlerClient::ScrollFailed);
@@ -244,13 +244,13 @@
RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FakeWebGraphicsContext3D()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread);
m_hostImpl->initializeLayerRenderer(context);
- RefPtr<CCLayerImpl> root = CCLayerImpl::create(0);
+ OwnPtr<CCLayerImpl> root = CCLayerImpl::create(0);
root->setScrollable(true);
root->setScrollPosition(IntPoint(0, 0));
root->setMaxScrollPosition(IntSize(100, 100));
- m_hostImpl->setRootLayer(root);
root->setNonFastScrollableRegion(IntRect(0, 0, 50, 50));
root->setPosition(FloatPoint(-25, 0));
+ m_hostImpl->setRootLayer(root.release());
m_hostImpl->drawLayers(); // Update draw transforms so we can correctly map points into layer space.
// This point would fall into the non-fast scrollable region except that we've moved the layer down by 25 pixels.