Chromium Code Reviews| Index: Source/core/layout/LayoutPart.cpp |
| diff --git a/Source/core/layout/LayoutPart.cpp b/Source/core/layout/LayoutPart.cpp |
| index 1f21e6f37993227580d6f39d4d2a665acaf6a9b8..f984289626dd96a3c8499242d1041fbb0cb4dbe2 100644 |
| --- a/Source/core/layout/LayoutPart.cpp |
| +++ b/Source/core/layout/LayoutPart.cpp |
| @@ -184,8 +184,19 @@ bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locat |
| result = childFrameResult; |
| } |
| - if (isInsideChildFrame) |
| - return true; |
| + // Don't trust |isInsideChildFrame|. Returns true only when the hit test |
| + // point/rect is totally within the iframe, i.e. nodeAtPointOverWidget() |
| + // also returns true. |
| + // Use a temparory HitTestResult because we don't want to collect the |
| + // iframe element itself if the hit-test rect is totally within the iframe. |
| + if (isInsideChildFrame) { |
|
dtapuska
2015/09/08 20:07:48
I presume this code path isn't necessary for the n
Yufeng Shen (Slow to review)
2015/09/08 22:08:42
done.
|
| + HitTestResult pointOverWidgetResult = result; |
| + bool pointOverWidget = nodeAtPointOverWidget(pointOverWidgetResult, locationInContainer, accumulatedOffset, action); |
| + if (pointOverWidget) |
| + return true; |
| + result = pointOverWidgetResult; |
| + return false; |
| + } |
| } |
| } |