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

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

Issue 2730343003: Fix overflow:overlay scrollbar width for paint. (Closed)
Patch Set: logic fix Created 3 years, 9 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 8a5fd7f3bc135dc51d8b1fe6a2e3615ff0f209be..1ed376f5621eba05f543b35248939684a3c76b40 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -504,7 +504,10 @@ IntSize PaintLayerScrollableArea::maximumScrollOffsetInt() const {
IntSize contentSize = contentsSize();
IntSize visibleSize =
- pixelSnappedIntRect(box().overflowClipRect(box().location())).size();
+ pixelSnappedIntRect(
+ box().overflowClipRect(box().location(),
+ IgnorePlatformAndCSSOverlayScrollbarSize))
pdr. 2017/03/08 20:33:20 Is this the only callsite using IgnorePlatformAndC
szager1 2017/03/08 20:43:09 My initial patch did something like that, but skob
+ .size();
FrameHost* host = layoutBox()->document().frameHost();
DCHECK(host);
@@ -1296,10 +1299,16 @@ int PaintLayerScrollableArea::verticalScrollbarWidth(
OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const {
if (!hasVerticalScrollbar())
return 0;
- if ((verticalScrollbar()->isOverlayScrollbar() ||
- box().style()->overflowY() == EOverflow::kOverlay) &&
- (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize ||
- !verticalScrollbar()->shouldParticipateInHitTesting())) {
+ if (overlayScrollbarClipBehavior ==
+ IgnorePlatformAndCSSOverlayScrollbarSize &&
+ box().style()->overflowY() == EOverflow::kOverlay) {
+ return 0;
+ }
+ if ((overlayScrollbarClipBehavior == IgnorePlatformOverlayScrollbarSize ||
+ overlayScrollbarClipBehavior ==
+ IgnorePlatformAndCSSOverlayScrollbarSize ||
+ !verticalScrollbar()->shouldParticipateInHitTesting()) &&
+ verticalScrollbar()->isOverlayScrollbar()) {
return 0;
}
return verticalScrollbar()->scrollbarThickness();
@@ -1309,10 +1318,16 @@ int PaintLayerScrollableArea::horizontalScrollbarHeight(
OverlayScrollbarClipBehavior overlayScrollbarClipBehavior) const {
if (!hasHorizontalScrollbar())
return 0;
- if ((horizontalScrollbar()->isOverlayScrollbar() ||
- box().style()->overflowX() == EOverflow::kOverlay) &&
- (overlayScrollbarClipBehavior == IgnoreOverlayScrollbarSize ||
- !horizontalScrollbar()->shouldParticipateInHitTesting())) {
+ if (overlayScrollbarClipBehavior ==
+ IgnorePlatformAndCSSOverlayScrollbarSize &&
+ box().style()->overflowX() == EOverflow::kOverlay) {
+ return 0;
+ }
+ if ((overlayScrollbarClipBehavior == IgnorePlatformOverlayScrollbarSize ||
+ overlayScrollbarClipBehavior ==
+ IgnorePlatformAndCSSOverlayScrollbarSize ||
+ !horizontalScrollbar()->shouldParticipateInHitTesting()) &&
+ horizontalScrollbar()->isOverlayScrollbar()) {
return 0;
}
return horizontalScrollbar()->scrollbarThickness();

Powered by Google App Engine
This is Rietveld 408576698