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

Side by Side Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2659183002: [RootLayerScrolls] Fix frame scrolling layer in ScrollingCoordinator (Closed)
Patch Set: nit scratched Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/VisualViewport.h" 5 #include "core/frame/VisualViewport.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/BrowserControls.h" 8 #include "core/frame/BrowserControls.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 // Tests that the layout viewport's scroll layer bounds are updated in a 1639 // Tests that the layout viewport's scroll layer bounds are updated in a
1640 // compositing change update. crbug.com/423188. 1640 // compositing change update. crbug.com/423188.
1641 TEST_P(VisualViewportTest, TestChangingContentSizeAffectsScrollBounds) { 1641 TEST_P(VisualViewportTest, TestChangingContentSizeAffectsScrollBounds) {
1642 initializeWithAndroidSettings(); 1642 initializeWithAndroidSettings();
1643 webViewImpl()->resize(IntSize(100, 150)); 1643 webViewImpl()->resize(IntSize(100, 150));
1644 1644
1645 registerMockedHttpURLLoad("content-width-1000.html"); 1645 registerMockedHttpURLLoad("content-width-1000.html");
1646 navigateTo(m_baseURL + "content-width-1000.html"); 1646 navigateTo(m_baseURL + "content-width-1000.html");
1647 1647
1648 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView(); 1648 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
1649 WebLayer* scrollLayer = frameView.layerForScrolling()->platformLayer();
1650 1649
1651 webViewImpl()->mainFrame()->executeScript( 1650 webViewImpl()->mainFrame()->executeScript(
1652 WebScriptSource("var content = document.getElementById(\"content\");" 1651 WebScriptSource("var content = document.getElementById(\"content\");"
1653 "content.style.width = \"1500px\";" 1652 "content.style.width = \"1500px\";"
1654 "content.style.height = \"2400px\";")); 1653 "content.style.height = \"2400px\";"));
1655 frameView.updateAllLifecyclePhases(); 1654 frameView.updateAllLifecyclePhases();
1655 WebLayer* scrollLayer = frameView.layoutViewportScrollableArea()
1656 ->layerForScrolling()
1657 ->platformLayer();
1656 1658
1657 EXPECT_SIZE_EQ(IntSize(1500, 2400), IntSize(scrollLayer->bounds())); 1659 EXPECT_SIZE_EQ(IntSize(1500, 2400), IntSize(scrollLayer->bounds()));
1658 } 1660 }
1659 1661
1660 // Tests that resizing the visual viepwort keeps its bounds within the outer 1662 // Tests that resizing the visual viepwort keeps its bounds within the outer
1661 // viewport. 1663 // viewport.
1662 TEST_P(VisualViewportTest, ResizeVisualViewportStaysWithinOuterViewport) { 1664 TEST_P(VisualViewportTest, ResizeVisualViewportStaysWithinOuterViewport) {
1663 initializeWithDesktopSettings(); 1665 initializeWithDesktopSettings();
1664 webViewImpl()->resize(IntSize(100, 200)); 1666 webViewImpl()->resize(IntSize(100, 200));
1665 1667
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 " body {" 2467 " body {"
2466 " margin: 0px;" 2468 " margin: 0px;"
2467 " }" 2469 " }"
2468 " div { height:110vh; width: 110vw; }" 2470 " div { height:110vh; width: 110vw; }"
2469 "</style>" 2471 "</style>"
2470 "<div></div>", 2472 "<div></div>",
2471 baseURL); 2473 baseURL);
2472 } 2474 }
2473 2475
2474 } // namespace 2476 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698