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

Side by Side Diff: Source/web/tests/PinchViewportTest.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/mac/WebSubstringUtil.mm ('k') | Source/web/tests/ScrollingCoordinatorTest.cpp » ('j') | 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 "config.h" 5 #include "config.h"
6 6
7 #include "core/frame/PinchViewport.h" 7 #include "core/frame/PinchViewport.h"
8 8
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
11 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
12 #include "core/html/HTMLBodyElement.h" 12 #include "core/html/HTMLBodyElement.h"
13 #include "core/html/HTMLElement.h" 13 #include "core/html/HTMLElement.h"
14 #include "core/layout/LayoutObject.h"
14 #include "core/layout/compositing/CompositedLayerMapping.h" 15 #include "core/layout/compositing/CompositedLayerMapping.h"
15 #include "core/layout/compositing/LayerCompositor.h" 16 #include "core/layout/compositing/LayerCompositor.h"
16 #include "core/page/Page.h" 17 #include "core/page/Page.h"
17 #include "core/rendering/RenderObject.h"
18 #include "core/rendering/RenderView.h" 18 #include "core/rendering/RenderView.h"
19 #include "core/testing/URLTestHelpers.h" 19 #include "core/testing/URLTestHelpers.h"
20 #include "public/platform/Platform.h" 20 #include "public/platform/Platform.h"
21 #include "public/platform/WebLayerTreeView.h" 21 #include "public/platform/WebLayerTreeView.h"
22 #include "public/platform/WebUnitTestSupport.h" 22 #include "public/platform/WebUnitTestSupport.h"
23 #include "public/web/WebContextMenuData.h" 23 #include "public/web/WebContextMenuData.h"
24 #include "public/web/WebFrameClient.h" 24 #include "public/web/WebFrameClient.h"
25 #include "public/web/WebInputEvent.h" 25 #include "public/web/WebInputEvent.h"
26 #include "public/web/WebScriptSource.h" 26 #include "public/web/WebScriptSource.h"
27 #include "public/web/WebSettings.h" 27 #include "public/web/WebSettings.h"
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 895
896 // Test that resizing the WebView causes ViewportConstrained objects to relayout . 896 // Test that resizing the WebView causes ViewportConstrained objects to relayout .
897 TEST_F(PinchViewportTest, TestWebViewResizeCausesViewportConstrainedLayout) 897 TEST_F(PinchViewportTest, TestWebViewResizeCausesViewportConstrainedLayout)
898 { 898 {
899 initializeWithDesktopSettings(); 899 initializeWithDesktopSettings();
900 webViewImpl()->resize(IntSize(500, 300)); 900 webViewImpl()->resize(IntSize(500, 300));
901 901
902 registerMockedHttpURLLoad("pinch-viewport-fixed-pos.html"); 902 registerMockedHttpURLLoad("pinch-viewport-fixed-pos.html");
903 navigateTo(m_baseURL + "pinch-viewport-fixed-pos.html"); 903 navigateTo(m_baseURL + "pinch-viewport-fixed-pos.html");
904 904
905 RenderObject* navbar = frame()->document()->getElementById("navbar")->render er(); 905 LayoutObject* navbar = frame()->document()->getElementById("navbar")->render er();
906 906
907 EXPECT_FALSE(navbar->needsLayout()); 907 EXPECT_FALSE(navbar->needsLayout());
908 908
909 frame()->view()->resize(IntSize(500, 200)); 909 frame()->view()->resize(IntSize(500, 200));
910 910
911 EXPECT_TRUE(navbar->needsLayout()); 911 EXPECT_TRUE(navbar->needsLayout());
912 } 912 }
913 913
914 class MockWebFrameClient : public WebFrameClient { 914 class MockWebFrameClient : public WebFrameClient {
915 public: 915 public:
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 navigateTo(m_baseURL + "content-width-1000-min-scale.html"); 1436 navigateTo(m_baseURL + "content-width-1000-min-scale.html");
1437 1437
1438 WebLocalFrameImpl* localFrame = webViewImpl()->mainFrameImpl(); 1438 WebLocalFrameImpl* localFrame = webViewImpl()->mainFrameImpl();
1439 localFrame->createFrameView(); 1439 localFrame->createFrameView();
1440 1440
1441 FrameView& frameView = *localFrame->frameView(); 1441 FrameView& frameView = *localFrame->frameView();
1442 EXPECT_SIZE_EQ(IntSize(200, 400), frameView.frameRect().size()); 1442 EXPECT_SIZE_EQ(IntSize(200, 400), frameView.frameRect().size());
1443 } 1443 }
1444 1444
1445 } // namespace 1445 } // namespace
OLDNEW
« no previous file with comments | « Source/web/mac/WebSubstringUtil.mm ('k') | Source/web/tests/ScrollingCoordinatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698