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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2642193011: Unify all types of overflow-related clips for paint and hit testing. (Closed)
Patch Set: none Created 3 years, 11 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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 882eadfab0ba37ccc82799febfbb9f140d5083b5..9989d0d5533f0a1096bf5787f785c8bed6ffdc2b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1399,7 +1399,7 @@ bool LayoutBox::nodeAtPoint(HitTestResult& result,
// TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer
// case, similar to overflow clip below.
bool skipChildren = false;
- if (hasOverflowClip() && !hasSelfPaintingLayer()) {
+ if (shouldClipOverflow() && !hasSelfPaintingLayer()) {
if (!locationInContainer.intersects(overflowClipRect(
adjustedLocation, ExcludeOverlayScrollbarSizeForHitTesting))) {
skipChildren = true;
@@ -1410,11 +1410,6 @@ bool LayoutBox::nodeAtPoint(HitTestResult& result,
}
}
- // A control clip can also clip out child hit testing.
- if (!skipChildren && hasControlClip() &&
- !locationInContainer.intersects(controlClipRect(adjustedLocation)))
- skipChildren = true;
-
// TODO(pdr): We should also include checks for hit testing border radius at
// the layer level (see: crbug.com/568904).
@@ -1797,8 +1792,12 @@ LayoutRect LayoutBox::overflowClipRect(
clipRect.setSize(clipRect.size() - LayoutSize(borderLeft() + borderRight(),
borderTop() + borderBottom()));
+ if (hasControlClip())
pdr. 2017/01/23 18:46:12 I think this needs to be after excludeScrollbars.
chrishtr 2017/01/23 18:53:20 DONE!!!
+ clipRect.intersect(controlClipRect(location));
+
if (hasOverflowClip())
excludeScrollbars(clipRect, overlayScrollbarClipBehavior);
+
return clipRect;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698