| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 if (m_frame->isMainFrame() && !m_viewportScrollableArea) { | 815 if (m_frame->isMainFrame() && !m_viewportScrollableArea) { |
| 816 ScrollableArea& visualViewport = m_frame->host()->visualViewport(); | 816 ScrollableArea& visualViewport = m_frame->host()->visualViewport(); |
| 817 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); | 817 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); |
| 818 DCHECK(layoutViewport); | 818 DCHECK(layoutViewport); |
| 819 m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *la
youtViewport); | 819 m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *la
youtViewport); |
| 820 } | 820 } |
| 821 | 821 |
| 822 if (!m_scrollAnchor.hasScroller()) | 822 if (!m_scrollAnchor.hasScroller()) |
| 823 m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollab
leArea : this); | 823 m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollab
leArea : this); |
| 824 | 824 |
| 825 if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 825 if (anchorScroll()) |
| 826 m_scrollAnchor.save(); | 826 m_scrollAnchor.save(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 static inline void layoutFromRootObject(LayoutObject& root) | 829 static inline void layoutFromRootObject(LayoutObject& root) |
| 830 { | 830 { |
| 831 LayoutState layoutState(root); | 831 LayoutState layoutState(root); |
| 832 root.layout(); | 832 root.layout(); |
| 833 } | 833 } |
| 834 | 834 |
| 835 void FrameView::prepareLayoutAnalyzer() | 835 void FrameView::prepareLayoutAnalyzer() |
| (...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 if (layoutViewItem().isNull()) | 2114 if (layoutViewItem().isNull()) |
| 2115 return; | 2115 return; |
| 2116 | 2116 |
| 2117 scheduleUpdateWidgetsIfNecessary(); | 2117 scheduleUpdateWidgetsIfNecessary(); |
| 2118 | 2118 |
| 2119 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) | 2119 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) |
| 2120 scrollingCoordinator->notifyGeometryChanged(); | 2120 scrollingCoordinator->notifyGeometryChanged(); |
| 2121 | 2121 |
| 2122 scrollToFragmentAnchor(); | 2122 scrollToFragmentAnchor(); |
| 2123 // TODO(skobes): Figure out interactions between scroll anchor, fragment anc
hor, and history restoration. | 2123 // TODO(skobes): Figure out interactions between scroll anchor, fragment anc
hor, and history restoration. |
| 2124 if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 2124 if (anchorScroll()) |
| 2125 m_scrollAnchor.restore(); | 2125 m_scrollAnchor.restore(); |
| 2126 | 2126 |
| 2127 sendResizeEventIfNeeded(); | 2127 sendResizeEventIfNeeded(); |
| 2128 } | 2128 } |
| 2129 | 2129 |
| 2130 bool FrameView::wasViewportResized() | 2130 bool FrameView::wasViewportResized() |
| 2131 { | 2131 { |
| 2132 ASSERT(m_frame); | 2132 ASSERT(m_frame); |
| 2133 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 2133 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 2134 if (layoutViewItem.isNull()) | 2134 if (layoutViewItem.isNull()) |
| (...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4069 ScrollableArea* FrameView::layoutViewportScrollableArea() | 4069 ScrollableArea* FrameView::layoutViewportScrollableArea() |
| 4070 { | 4070 { |
| 4071 Settings* settings = frame().settings(); | 4071 Settings* settings = frame().settings(); |
| 4072 if (!settings || !settings->rootLayerScrolls()) | 4072 if (!settings || !settings->rootLayerScrolls()) |
| 4073 return this; | 4073 return this; |
| 4074 | 4074 |
| 4075 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 4075 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 4076 return layoutViewItem.isNull() ? nullptr : layoutViewItem.getScrollableArea(
); | 4076 return layoutViewItem.isNull() ? nullptr : layoutViewItem.getScrollableArea(
); |
| 4077 } | 4077 } |
| 4078 | 4078 |
| 4079 LayoutObject* FrameView::viewportLayoutObject() | 4079 LayoutObject* FrameView::viewportLayoutObject() const |
| 4080 { | 4080 { |
| 4081 if (Document* document = frame().document()) { | 4081 if (Document* document = frame().document()) { |
| 4082 if (Element* element = document->viewportDefiningElement()) | 4082 if (Element* element = document->viewportDefiningElement()) |
| 4083 return element->layoutObject(); | 4083 return element->layoutObject(); |
| 4084 } | 4084 } |
| 4085 return nullptr; | 4085 return nullptr; |
| 4086 } | 4086 } |
| 4087 | 4087 |
| 4088 void FrameView::collectAnnotatedRegions(LayoutObject& layoutObject, Vector<Annot
atedRegionValue>& regions) const | 4088 void FrameView::collectAnnotatedRegions(LayoutObject& layoutObject, Vector<Annot
atedRegionValue>& regions) const |
| 4089 { | 4089 { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4258 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4258 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4259 } | 4259 } |
| 4260 | 4260 |
| 4261 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4261 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4262 { | 4262 { |
| 4263 ASSERT(!layoutViewItem().isNull()); | 4263 ASSERT(!layoutViewItem().isNull()); |
| 4264 return *layoutView(); | 4264 return *layoutView(); |
| 4265 } | 4265 } |
| 4266 | 4266 |
| 4267 } // namespace blink | 4267 } // namespace blink |
| OLD | NEW |