| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "core/layout/svg/LayoutSVGRoot.h" | 75 #include "core/layout/svg/LayoutSVGRoot.h" |
| 76 #include "core/loader/DocumentLoader.h" | 76 #include "core/loader/DocumentLoader.h" |
| 77 #include "core/loader/FrameLoader.h" | 77 #include "core/loader/FrameLoader.h" |
| 78 #include "core/loader/FrameLoaderClient.h" | 78 #include "core/loader/FrameLoaderClient.h" |
| 79 #include "core/observer/ResizeObserverController.h" | 79 #include "core/observer/ResizeObserverController.h" |
| 80 #include "core/page/AutoscrollController.h" | 80 #include "core/page/AutoscrollController.h" |
| 81 #include "core/page/ChromeClient.h" | 81 #include "core/page/ChromeClient.h" |
| 82 #include "core/page/FocusController.h" | 82 #include "core/page/FocusController.h" |
| 83 #include "core/page/FrameTree.h" | 83 #include "core/page/FrameTree.h" |
| 84 #include "core/page/Page.h" | 84 #include "core/page/Page.h" |
| 85 #include "core/page/scrolling/ChildViewportScrollCallback.h" | |
| 86 #include "core/page/scrolling/RootScrollerController.h" | 85 #include "core/page/scrolling/RootScrollerController.h" |
| 87 #include "core/page/scrolling/RootViewportScrollCallback.h" | |
| 88 #include "core/page/scrolling/ScrollingCoordinator.h" | 86 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 89 #include "core/paint/FramePainter.h" | 87 #include "core/paint/FramePainter.h" |
| 90 #include "core/paint/PaintLayer.h" | 88 #include "core/paint/PaintLayer.h" |
| 91 #include "core/paint/PrePaintTreeWalk.h" | 89 #include "core/paint/PrePaintTreeWalk.h" |
| 92 #include "core/plugins/PluginView.h" | 90 #include "core/plugins/PluginView.h" |
| 93 #include "core/style/ComputedStyle.h" | 91 #include "core/style/ComputedStyle.h" |
| 94 #include "core/svg/SVGDocumentExtensions.h" | 92 #include "core/svg/SVGDocumentExtensions.h" |
| 95 #include "core/svg/SVGSVGElement.h" | 93 #include "core/svg/SVGSVGElement.h" |
| 96 #include "platform/Histogram.h" | 94 #include "platform/Histogram.h" |
| 97 #include "platform/HostWindow.h" | 95 #include "platform/HostWindow.h" |
| (...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2409 page->chromeClient().annotatedRegionsChanged(); | 2407 page->chromeClient().annotatedRegionsChanged(); |
| 2410 } | 2408 } |
| 2411 | 2409 |
| 2412 void FrameView::didAttachDocument() | 2410 void FrameView::didAttachDocument() |
| 2413 { | 2411 { |
| 2414 FrameHost* frameHost = m_frame->host(); | 2412 FrameHost* frameHost = m_frame->host(); |
| 2415 DCHECK(frameHost); | 2413 DCHECK(frameHost); |
| 2416 | 2414 |
| 2417 DCHECK(m_frame->document()); | 2415 DCHECK(m_frame->document()); |
| 2418 | 2416 |
| 2419 ViewportScrollCallback* viewportScrollCallback = nullptr; | |
| 2420 | |
| 2421 if (m_frame->isMainFrame()) { | 2417 if (m_frame->isMainFrame()) { |
| 2422 ScrollableArea& visualViewport = frameHost->visualViewport(); | 2418 ScrollableArea& visualViewport = frameHost->visualViewport(); |
| 2423 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); | 2419 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); |
| 2424 DCHECK(layoutViewport); | 2420 DCHECK(layoutViewport); |
| 2425 | 2421 |
| 2426 RootFrameViewport* rootFrameViewport = | 2422 RootFrameViewport* rootFrameViewport = |
| 2427 RootFrameViewport::create(visualViewport, *layoutViewport); | 2423 RootFrameViewport::create(visualViewport, *layoutViewport); |
| 2428 m_viewportScrollableArea = rootFrameViewport; | 2424 m_viewportScrollableArea = rootFrameViewport; |
| 2429 | |
| 2430 viewportScrollCallback = RootViewportScrollCallback::create( | |
| 2431 &frameHost->topControls(), | |
| 2432 &frameHost->overscrollController(), | |
| 2433 *rootFrameViewport); | |
| 2434 } else { | |
| 2435 viewportScrollCallback = ChildViewportScrollCallback::create(); | |
| 2436 } | 2425 } |
| 2437 | |
| 2438 m_frame->document()->initializeRootScroller(viewportScrollCallback); | |
| 2439 } | 2426 } |
| 2440 | 2427 |
| 2441 void FrameView::updateScrollCorner() | 2428 void FrameView::updateScrollCorner() |
| 2442 { | 2429 { |
| 2443 RefPtr<ComputedStyle> cornerStyle; | 2430 RefPtr<ComputedStyle> cornerStyle; |
| 2444 IntRect cornerRect = scrollCornerRect(); | 2431 IntRect cornerRect = scrollCornerRect(); |
| 2445 Document* doc = m_frame->document(); | 2432 Document* doc = m_frame->document(); |
| 2446 | 2433 |
| 2447 if (doc && !cornerRect.isEmpty()) { | 2434 if (doc && !cornerRect.isEmpty()) { |
| 2448 // Try the <body> element first as a scroll corner source. | 2435 // Try the <body> element first as a scroll corner source. |
| (...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4336 } | 4323 } |
| 4337 | 4324 |
| 4338 bool FrameView::canThrottleRendering() const | 4325 bool FrameView::canThrottleRendering() const |
| 4339 { | 4326 { |
| 4340 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4327 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4341 return false; | 4328 return false; |
| 4342 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4329 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4343 } | 4330 } |
| 4344 | 4331 |
| 4345 } // namespace blink | 4332 } // namespace blink |
| OLD | NEW |