Chromium Code Reviews| Index: Source/core/rendering/RenderBlock.cpp |
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
| index fbcc31eb3c1ddbed2c55e49fdf3f75103d6adc04..b7a02b5e85bcbde1688e5ac3da43e774ce910c39 100644 |
| --- a/Source/core/rendering/RenderBlock.cpp |
| +++ b/Source/core/rendering/RenderBlock.cpp |
| @@ -2882,7 +2882,15 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu |
| // If we have clipping, then we can't have any spillout. |
| bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); |
| bool useClip = (hasControlClip() || useOverflowClip); |
| - bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.intersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(overflowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); |
| + LayoutRect clipRect = overflowClipRect(adjustedLocation, IncludeOverlayScrollbarSize); |
|
ojan
2014/05/07 03:18:28
It looks like this is only used in the else clause
pals
2014/05/07 06:31:53
Done.
|
| + bool checkChildren = !useClip; |
| + if (!checkChildren) { |
| + if (hasControlClip()) { |
| + checkChildren = locationInContainer.intersects(controlClipRect(adjustedLocation)); |
| + } else { |
| + checkChildren = style()->hasBorderRadius() ? locationInContainer.intersects(style()->getRoundedBorderFor(clipRect)) : locationInContainer.intersects(clipRect); |
|
ojan
2014/05/07 03:18:28
I think the ternary makes this hard to read with s
pals
2014/05/07 06:31:53
Done.
|
| + } |
| + } |
| if (checkChildren) { |
| // Hit test descendants first. |
| LayoutSize scrolledOffset(localOffset); |
| @@ -2904,7 +2912,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu |
| } |
| // Check if the point is outside radii. |
| - if (!isRenderView() && style()->hasBorderRadius()) { |
| + if (style()->hasBorderRadius()) { |
| LayoutRect borderRect = borderBoxRect(); |
| borderRect.moveBy(adjustedLocation); |
| RoundedRect border = style()->getRoundedBorderFor(borderRect); |