Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2454913003: MainFrame scrollbars should work with RFV instead of FV (Closed)
Patch Set: add test + rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 PaintLayerScrollableArea::compositorAnimationTimeline() const { 1734 PaintLayerScrollableArea::compositorAnimationTimeline() const {
1734 if (LocalFrame* frame = box().frame()) { 1735 if (LocalFrame* frame = box().frame()) {
1735 if (Page* page = frame->page()) 1736 if (Page* page = frame->page())
1736 return page->scrollingCoordinator() 1737 return page->scrollingCoordinator()
1737 ? page->scrollingCoordinator()->compositorAnimationTimeline() 1738 ? page->scrollingCoordinator()->compositorAnimationTimeline()
1738 : nullptr; 1739 : nullptr;
1739 } 1740 }
1740 return nullptr; 1741 return nullptr;
1741 } 1742 }
1742 1743
1744 void PaintLayerScrollableArea::getTickmarks(Vector<IntRect>& tickmarks) const {
1745 if (LocalFrame* frame = box().frame()) {
1746 tickmarks = frame->document()->markers().renderedRectsForMarkers(
1747 DocumentMarker::TextMatch);
bokan 2016/10/31 15:25:09 Does this make the tickmarks work for root-layer-s
ymalik 2016/11/03 18:49:12 Almost. I am not sure where the tickmarks should b
1748 }
1749 }
1750
1743 PaintLayerScrollableArea* 1751 PaintLayerScrollableArea*
1744 PaintLayerScrollableArea::ScrollbarManager::scrollableArea() { 1752 PaintLayerScrollableArea::ScrollbarManager::scrollableArea() {
1745 return toPaintLayerScrollableArea(m_scrollableArea.get()); 1753 return toPaintLayerScrollableArea(m_scrollableArea.get());
1746 } 1754 }
1747 1755
1748 void PaintLayerScrollableArea::ScrollbarManager::destroyDetachedScrollbars() { 1756 void PaintLayerScrollableArea::ScrollbarManager::destroyDetachedScrollbars() {
1749 ASSERT(!m_hBarIsAttached || m_hBar); 1757 ASSERT(!m_hBarIsAttached || m_hBar);
1750 ASSERT(!m_vBarIsAttached || m_vBar); 1758 ASSERT(!m_vBarIsAttached || m_vBar);
1751 if (m_hBar && !m_hBarIsAttached) 1759 if (m_hBar && !m_hBarIsAttached)
1752 destroyScrollbar(HorizontalScrollbar); 1760 destroyScrollbar(HorizontalScrollbar);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 1957
1950 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 1958 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
1951 clampScrollableAreas() { 1959 clampScrollableAreas() {
1952 for (auto& scrollableArea : *s_needsClamp) 1960 for (auto& scrollableArea : *s_needsClamp)
1953 scrollableArea->clampScrollOffsetsAfterLayout(); 1961 scrollableArea->clampScrollOffsetsAfterLayout();
1954 delete s_needsClamp; 1962 delete s_needsClamp;
1955 s_needsClamp = nullptr; 1963 s_needsClamp = nullptr;
1956 } 1964 }
1957 1965
1958 } // namespace blink 1966 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698