| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@gmail.com> | 10 * Christian Biesinger <cbiesinger@gmail.com> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 */ | 43 */ |
| 44 | 44 |
| 45 #include "core/paint/PaintLayerScrollableArea.h" | 45 #include "core/paint/PaintLayerScrollableArea.h" |
| 46 | 46 |
| 47 #include "core/css/PseudoStyleRequest.h" | 47 #include "core/css/PseudoStyleRequest.h" |
| 48 #include "core/dom/AXObjectCache.h" | 48 #include "core/dom/AXObjectCache.h" |
| 49 #include "core/dom/DOMNodeIds.h" | 49 #include "core/dom/DOMNodeIds.h" |
| 50 #include "core/dom/Node.h" | 50 #include "core/dom/Node.h" |
| 51 #include "core/dom/shadow/ShadowRoot.h" | 51 #include "core/dom/shadow/ShadowRoot.h" |
| 52 #include "core/editing/FrameSelection.h" | 52 #include "core/editing/FrameSelection.h" |
| 53 #include "core/editing/markers/DocumentMarkerController.h" |
| 53 #include "core/frame/FrameHost.h" | 54 #include "core/frame/FrameHost.h" |
| 54 #include "core/frame/FrameView.h" | 55 #include "core/frame/FrameView.h" |
| 55 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
| 56 #include "core/frame/RootFrameViewport.h" | 57 #include "core/frame/RootFrameViewport.h" |
| 57 #include "core/frame/Settings.h" | 58 #include "core/frame/Settings.h" |
| 58 #include "core/html/HTMLFrameOwnerElement.h" | 59 #include "core/html/HTMLFrameOwnerElement.h" |
| 59 #include "core/input/EventHandler.h" | 60 #include "core/input/EventHandler.h" |
| 60 #include "core/layout/LayoutFlexibleBox.h" | 61 #include "core/layout/LayoutFlexibleBox.h" |
| 61 #include "core/layout/LayoutPart.h" | 62 #include "core/layout/LayoutPart.h" |
| 62 #include "core/layout/LayoutScrollbar.h" | 63 #include "core/layout/LayoutScrollbar.h" |
| (...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 PaintLayerScrollableArea::compositorAnimationTimeline() const { | 1761 PaintLayerScrollableArea::compositorAnimationTimeline() const { |
| 1761 if (LocalFrame* frame = box().frame()) { | 1762 if (LocalFrame* frame = box().frame()) { |
| 1762 if (Page* page = frame->page()) | 1763 if (Page* page = frame->page()) |
| 1763 return page->scrollingCoordinator() | 1764 return page->scrollingCoordinator() |
| 1764 ? page->scrollingCoordinator()->compositorAnimationTimeline() | 1765 ? page->scrollingCoordinator()->compositorAnimationTimeline() |
| 1765 : nullptr; | 1766 : nullptr; |
| 1766 } | 1767 } |
| 1767 return nullptr; | 1768 return nullptr; |
| 1768 } | 1769 } |
| 1769 | 1770 |
| 1771 void PaintLayerScrollableArea::getTickmarks(Vector<IntRect>& tickmarks) const { |
| 1772 // TODO(crbug.com/417782): Verify that tickmarks work with root layer |
| 1773 // scrolling. |
| 1774 if (LocalFrame* frame = box().frame()) |
| 1775 frame->view()->getTickmarks(tickmarks); |
| 1776 } |
| 1777 |
| 1770 PaintLayerScrollableArea* | 1778 PaintLayerScrollableArea* |
| 1771 PaintLayerScrollableArea::ScrollbarManager::scrollableArea() { | 1779 PaintLayerScrollableArea::ScrollbarManager::scrollableArea() { |
| 1772 return toPaintLayerScrollableArea(m_scrollableArea.get()); | 1780 return toPaintLayerScrollableArea(m_scrollableArea.get()); |
| 1773 } | 1781 } |
| 1774 | 1782 |
| 1775 void PaintLayerScrollableArea::ScrollbarManager::destroyDetachedScrollbars() { | 1783 void PaintLayerScrollableArea::ScrollbarManager::destroyDetachedScrollbars() { |
| 1776 DCHECK(!m_hBarIsAttached || m_hBar); | 1784 DCHECK(!m_hBarIsAttached || m_hBar); |
| 1777 DCHECK(!m_vBarIsAttached || m_vBar); | 1785 DCHECK(!m_vBarIsAttached || m_vBar); |
| 1778 if (m_hBar && !m_hBarIsAttached) | 1786 if (m_hBar && !m_hBarIsAttached) |
| 1779 destroyScrollbar(HorizontalScrollbar); | 1787 destroyScrollbar(HorizontalScrollbar); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1976 | 1984 |
| 1977 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 1985 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 1978 clampScrollableAreas() { | 1986 clampScrollableAreas() { |
| 1979 for (auto& scrollableArea : *s_needsClamp) | 1987 for (auto& scrollableArea : *s_needsClamp) |
| 1980 scrollableArea->clampScrollOffsetsAfterLayout(); | 1988 scrollableArea->clampScrollOffsetsAfterLayout(); |
| 1981 delete s_needsClamp; | 1989 delete s_needsClamp; |
| 1982 s_needsClamp = nullptr; | 1990 s_needsClamp = nullptr; |
| 1983 } | 1991 } |
| 1984 | 1992 |
| 1985 } // namespace blink | 1993 } // namespace blink |
| OLD | NEW |