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

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

Issue 1907213002: Refactor OverlayScrollbarSizeRelevancy into OverlayScrollbarClipBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include -> Exclude Created 4 years, 8 months 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 reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@gmail.com> 9 * Christian Biesinger <cbiesinger@gmail.com>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 if (hasVerticalScrollbar()) 1038 if (hasVerticalScrollbar())
1039 verticalScrollbar()->styleChanged(); 1039 verticalScrollbar()->styleChanged();
1040 1040
1041 setScrollCornerNeedsPaintInvalidation(); 1041 setScrollCornerNeedsPaintInvalidation();
1042 1042
1043 // Force an update since we know the scrollbars have changed things. 1043 // Force an update since we know the scrollbars have changed things.
1044 if (box().document().hasAnnotatedRegions()) 1044 if (box().document().hasAnnotatedRegions())
1045 box().document().setAnnotatedRegionsDirty(true); 1045 box().document().setAnnotatedRegionsDirty(true);
1046 } 1046 }
1047 1047
1048 int PaintLayerScrollableArea::verticalScrollbarWidth(OverlayScrollbarSizeRelevan cy relevancy) const 1048 int PaintLayerScrollableArea::verticalScrollbarWidth(OverlayScrollbarClipBehavio r overlayScrollbarClipBehavior) const
1049 { 1049 {
1050 if (!hasVerticalScrollbar() || (verticalScrollbar()->isOverlayScrollbar() && (relevancy == IgnoreOverlayScrollbarSize || !verticalScrollbar()->shouldPartici pateInHitTesting()))) 1050 if (!hasVerticalScrollbar())
1051 return 0;
1052 if (verticalScrollbar()->isOverlayScrollbar() && (overlayScrollbarClipBehavi or == IgnoreOverlayScrollbarSize || !verticalScrollbar()->shouldParticipateInHit Testing()))
1051 return 0; 1053 return 0;
1052 return verticalScrollbar()->width(); 1054 return verticalScrollbar()->width();
1053 } 1055 }
1054 1056
1055 int PaintLayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarSizeRele vancy relevancy) const 1057 int PaintLayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarClipBeha vior overlayScrollbarClipBehavior) const
1056 { 1058 {
1057 if (!hasHorizontalScrollbar() || (horizontalScrollbar()->isOverlayScrollbar( ) && (relevancy == IgnoreOverlayScrollbarSize || !horizontalScrollbar()->shouldP articipateInHitTesting()))) 1059 if (!hasHorizontalScrollbar())
1060 return 0;
1061 if (horizontalScrollbar()->isOverlayScrollbar() && (overlayScrollbarClipBeha vior == IgnoreOverlayScrollbarSize || !horizontalScrollbar()->shouldParticipateI nHitTesting()))
1058 return 0; 1062 return 0;
1059 return horizontalScrollbar()->height(); 1063 return horizontalScrollbar()->height();
1060 } 1064 }
1061 1065
1062 void PaintLayerScrollableArea::positionOverflowControls() 1066 void PaintLayerScrollableArea::positionOverflowControls()
1063 { 1067 {
1064 if (!hasScrollbar() && !box().canResize()) 1068 if (!hasScrollbar() && !box().canResize())
1065 return; 1069 return;
1066 1070
1067 const IntRect borderBox = box().pixelSnappedBorderBoxRect(); 1071 const IntRect borderBox = box().pixelSnappedBorderBoxRect();
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 } 1609 }
1606 1610
1607 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) 1611 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager)
1608 { 1612 {
1609 visitor->trace(m_scrollableArea); 1613 visitor->trace(m_scrollableArea);
1610 visitor->trace(m_hBar); 1614 visitor->trace(m_hBar);
1611 visitor->trace(m_vBar); 1615 visitor->trace(m_vBar);
1612 } 1616 }
1613 1617
1614 } // namespace blink 1618 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698