OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "core/layout/compositing/CompositedSelection.h" | 71 #include "core/layout/compositing/CompositedSelection.h" |
72 #include "core/layout/compositing/PaintLayerCompositor.h" | 72 #include "core/layout/compositing/PaintLayerCompositor.h" |
73 #include "core/layout/svg/LayoutSVGRoot.h" | 73 #include "core/layout/svg/LayoutSVGRoot.h" |
74 #include "core/loader/FrameLoader.h" | 74 #include "core/loader/FrameLoader.h" |
75 #include "core/loader/FrameLoaderClient.h" | 75 #include "core/loader/FrameLoaderClient.h" |
76 #include "core/page/AutoscrollController.h" | 76 #include "core/page/AutoscrollController.h" |
77 #include "core/page/ChromeClient.h" | 77 #include "core/page/ChromeClient.h" |
78 #include "core/page/FocusController.h" | 78 #include "core/page/FocusController.h" |
79 #include "core/page/FrameTree.h" | 79 #include "core/page/FrameTree.h" |
80 #include "core/page/Page.h" | 80 #include "core/page/Page.h" |
| 81 #include "core/page/scrolling/ChildViewportScrollCallback.h" |
| 82 #include "core/page/scrolling/RootViewportScrollCallback.h" |
81 #include "core/page/scrolling/ScrollingCoordinator.h" | 83 #include "core/page/scrolling/ScrollingCoordinator.h" |
82 #include "core/paint/FramePainter.h" | 84 #include "core/paint/FramePainter.h" |
83 #include "core/paint/PaintLayer.h" | 85 #include "core/paint/PaintLayer.h" |
84 #include "core/paint/PrePaintTreeWalk.h" | 86 #include "core/paint/PrePaintTreeWalk.h" |
85 #include "core/plugins/PluginView.h" | 87 #include "core/plugins/PluginView.h" |
86 #include "core/style/ComputedStyle.h" | 88 #include "core/style/ComputedStyle.h" |
87 #include "core/svg/SVGDocumentExtensions.h" | 89 #include "core/svg/SVGDocumentExtensions.h" |
88 #include "core/svg/SVGSVGElement.h" | 90 #include "core/svg/SVGSVGElement.h" |
89 #include "platform/Histogram.h" | 91 #include "platform/Histogram.h" |
90 #include "platform/HostWindow.h" | 92 #include "platform/HostWindow.h" |
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 collectAnnotatedRegions(*(document->layoutBox()), newRegions); | 2387 collectAnnotatedRegions(*(document->layoutBox()), newRegions); |
2386 if (newRegions == document->annotatedRegions()) | 2388 if (newRegions == document->annotatedRegions()) |
2387 return; | 2389 return; |
2388 document->setAnnotatedRegions(newRegions); | 2390 document->setAnnotatedRegions(newRegions); |
2389 if (Page* page = m_frame->page()) | 2391 if (Page* page = m_frame->page()) |
2390 page->chromeClient().annotatedRegionsChanged(); | 2392 page->chromeClient().annotatedRegionsChanged(); |
2391 } | 2393 } |
2392 | 2394 |
2393 void FrameView::didAttachDocument() | 2395 void FrameView::didAttachDocument() |
2394 { | 2396 { |
| 2397 FrameHost* frameHost = m_frame->host(); |
| 2398 DCHECK(frameHost); |
| 2399 |
| 2400 DCHECK(m_frame->document()); |
| 2401 |
| 2402 ViewportScrollCallback* viewportScrollCallback = nullptr; |
| 2403 |
2395 if (m_frame->isMainFrame()) { | 2404 if (m_frame->isMainFrame()) { |
2396 DCHECK(m_frame->host()); | 2405 ScrollableArea& visualViewport = frameHost->visualViewport(); |
2397 ScrollableArea& visualViewport = m_frame->host()->visualViewport(); | |
2398 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); | 2406 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); |
2399 DCHECK(layoutViewport); | 2407 DCHECK(layoutViewport); |
2400 m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *la
youtViewport); | 2408 |
| 2409 RootFrameViewport* rootFrameViewport = |
| 2410 RootFrameViewport::create(visualViewport, *layoutViewport); |
| 2411 m_viewportScrollableArea = rootFrameViewport; |
| 2412 |
| 2413 viewportScrollCallback = RootViewportScrollCallback::create( |
| 2414 &frameHost->topControls(), |
| 2415 &frameHost->overscrollController(), |
| 2416 *rootFrameViewport); |
| 2417 } else { |
| 2418 viewportScrollCallback = ChildViewportScrollCallback::create(); |
2401 } | 2419 } |
| 2420 |
| 2421 m_frame->document()->initializeRootScroller(viewportScrollCallback); |
2402 } | 2422 } |
2403 | 2423 |
2404 void FrameView::updateScrollCorner() | 2424 void FrameView::updateScrollCorner() |
2405 { | 2425 { |
2406 RefPtr<ComputedStyle> cornerStyle; | 2426 RefPtr<ComputedStyle> cornerStyle; |
2407 IntRect cornerRect = scrollCornerRect(); | 2427 IntRect cornerRect = scrollCornerRect(); |
2408 Document* doc = m_frame->document(); | 2428 Document* doc = m_frame->document(); |
2409 | 2429 |
2410 if (doc && !cornerRect.isEmpty()) { | 2430 if (doc && !cornerRect.isEmpty()) { |
2411 // Try the <body> element first as a scroll corner source. | 2431 // Try the <body> element first as a scroll corner source. |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4247 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4267 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
4248 } | 4268 } |
4249 | 4269 |
4250 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4270 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
4251 { | 4271 { |
4252 ASSERT(!layoutViewItem().isNull()); | 4272 ASSERT(!layoutViewItem().isNull()); |
4253 return *layoutView(); | 4273 return *layoutView(); |
4254 } | 4274 } |
4255 | 4275 |
4256 } // namespace blink | 4276 } // namespace blink |
OLD | NEW |