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 "core/frame/VisualViewport.h" | 5 #include "core/frame/VisualViewport.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
8 #include "core/frame/BrowserControls.h" | 10 #include "core/frame/BrowserControls.h" |
9 #include "core/frame/FrameTestHelpers.h" | 11 #include "core/frame/FrameTestHelpers.h" |
10 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
11 #include "core/frame/LocalFrameView.h" | 13 #include "core/frame/LocalFrameView.h" |
12 #include "core/frame/WebLocalFrameBase.h" | 14 #include "core/frame/WebLocalFrameBase.h" |
13 #include "core/html/HTMLBodyElement.h" | 15 #include "core/html/HTMLBodyElement.h" |
14 #include "core/html/HTMLElement.h" | 16 #include "core/html/HTMLElement.h" |
15 #include "core/input/EventHandler.h" | 17 #include "core/input/EventHandler.h" |
16 #include "core/layout/LayoutObject.h" | 18 #include "core/layout/LayoutObject.h" |
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 | 1871 |
1870 TEST_P(VisualViewportTest, AccessibilityHitTestWhileZoomedIn) { | 1872 TEST_P(VisualViewportTest, AccessibilityHitTestWhileZoomedIn) { |
1871 InitializeWithDesktopSettings(accessibilitySettings); | 1873 InitializeWithDesktopSettings(accessibilitySettings); |
1872 | 1874 |
1873 RegisterMockedHttpURLLoad("hit-test.html"); | 1875 RegisterMockedHttpURLLoad("hit-test.html"); |
1874 NavigateTo(base_url_ + "hit-test.html"); | 1876 NavigateTo(base_url_ + "hit-test.html"); |
1875 | 1877 |
1876 WebViewImpl()->Resize(IntSize(500, 500)); | 1878 WebViewImpl()->Resize(IntSize(500, 500)); |
1877 WebViewImpl()->UpdateAllLifecyclePhases(); | 1879 WebViewImpl()->UpdateAllLifecyclePhases(); |
1878 | 1880 |
1879 WebDocument web_doc = WebViewImpl()->MainFrame()->GetDocument(); | 1881 WebDocument web_doc = WebViewImpl()->MainFrameImpl()->GetDocument(); |
1880 LocalFrameView& frame_view = *WebViewImpl()->MainFrameImpl()->GetFrameView(); | 1882 LocalFrameView& frame_view = *WebViewImpl()->MainFrameImpl()->GetFrameView(); |
1881 | 1883 |
1882 WebViewImpl()->SetPageScaleFactor(2); | 1884 WebViewImpl()->SetPageScaleFactor(2); |
1883 WebViewImpl()->SetVisualViewportOffset(WebFloatPoint(200, 230)); | 1885 WebViewImpl()->SetVisualViewportOffset(WebFloatPoint(200, 230)); |
1884 frame_view.LayoutViewportScrollableArea()->SetScrollOffset( | 1886 frame_view.LayoutViewportScrollableArea()->SetScrollOffset( |
1885 ScrollOffset(400, 1100), kProgrammaticScroll); | 1887 ScrollOffset(400, 1100), kProgrammaticScroll); |
1886 | 1888 |
1887 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state. | 1889 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state. |
1888 ForceFullCompositingUpdate(); | 1890 ForceFullCompositingUpdate(); |
1889 | 1891 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 " margin: 0px;" | 2422 " margin: 0px;" |
2421 " }" | 2423 " }" |
2422 " div { height:110vh; width: 110vw; }" | 2424 " div { height:110vh; width: 110vw; }" |
2423 "</style>" | 2425 "</style>" |
2424 "<div></div>", | 2426 "<div></div>", |
2425 base_url); | 2427 base_url); |
2426 } | 2428 } |
2427 | 2429 |
2428 } // namespace | 2430 } // namespace |
2429 } // namespace blink | 2431 } // namespace blink |
OLD | NEW |