Chromium Code Reviews| 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; |
| } |