OLD | NEW |
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/compositing/CompositedLayerMapping.h" | 14 #include "core/layout/compositing/CompositedLayerMapping.h" |
15 #include "core/layout/compositing/RenderLayerCompositor.h" | 15 #include "core/layout/compositing/LayerCompositor.h" |
16 #include "core/page/Page.h" | 16 #include "core/page/Page.h" |
17 #include "core/rendering/RenderObject.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" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 webViewImpl()->layout(); | 125 webViewImpl()->layout(); |
126 } | 126 } |
127 | 127 |
128 void registerMockedHttpURLLoad(const std::string& fileName) | 128 void registerMockedHttpURLLoad(const std::string& fileName) |
129 { | 129 { |
130 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); | 130 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); |
131 } | 131 } |
132 | 132 |
133 WebLayer* getRootScrollLayer() | 133 WebLayer* getRootScrollLayer() |
134 { | 134 { |
135 RenderLayerCompositor* compositor = frame()->contentRenderer()->composit
or(); | 135 LayerCompositor* compositor = frame()->contentRenderer()->compositor(); |
136 ASSERT(compositor); | 136 ASSERT(compositor); |
137 ASSERT(compositor->scrollLayer()); | 137 ASSERT(compositor->scrollLayer()); |
138 | 138 |
139 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer(); | 139 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer(); |
140 return webScrollLayer; | 140 return webScrollLayer; |
141 } | 141 } |
142 | 142 |
143 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } | 143 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } |
144 LocalFrame* frame() const { return m_helper.webViewImpl()->mainFrameImpl()->
frame(); } | 144 LocalFrame* frame() const { return m_helper.webViewImpl()->mainFrameImpl()->
frame(); } |
145 | 145 |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |