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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2725763002: Account for overlay scrollbars when computing scrollbar width/height. (Closed)
Patch Set: rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 5e1cd751f37909144240a811091817055e5d786a..c8523dcf456d0ae3bdc2fdc9567c761dfc4300f1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1284,10 +1284,12 @@ int PaintLayerScrollableArea::verticalScrollbarWidth(
OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const {
if (!hasVerticalScrollbar())
return 0;
- if (verticalScrollbar()->isOverlayScrollbar() &&
+ if ((verticalScrollbar()->isOverlayScrollbar() ||
+ box().style()->overflowY() == EOverflow::kOverlay) &&
(overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize ||
- !verticalScrollbar()->shouldParticipateInHitTesting()))
+ !verticalScrollbar()->shouldParticipateInHitTesting())) {
return 0;
+ }
return verticalScrollbar()->scrollbarThickness();
}
@@ -1295,10 +1297,12 @@ int PaintLayerScrollableArea::horizontalScrollbarHeight(
OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const {
if (!hasHorizontalScrollbar())
return 0;
- if (horizontalScrollbar()->isOverlayScrollbar() &&
+ if ((horizontalScrollbar()->isOverlayScrollbar() ||
+ box().style()->overflowX() == EOverflow::kOverlay) &&
(overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize ||
- !horizontalScrollbar()->shouldParticipateInHitTesting()))
+ !horizontalScrollbar()->shouldParticipateInHitTesting())) {
return 0;
+ }
return horizontalScrollbar()->scrollbarThickness();
}

Powered by Google App Engine
This is Rietveld 408576698