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

Unified Diff: Source/core/layout/LayoutPart.cpp

Issue 1330113002: Rename WebSourceBuffer::abort into WebSourceBuffer::resetParserState (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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: Source/core/layout/LayoutPart.cpp
diff --git a/Source/core/layout/LayoutPart.cpp b/Source/core/layout/LayoutPart.cpp
index 1f21e6f37993227580d6f39d4d2a665acaf6a9b8..63243c8bff743a17d6374763d02e6a58bc72f440 100644
--- a/Source/core/layout/LayoutPart.cpp
+++ b/Source/core/layout/LayoutPart.cpp
@@ -184,8 +184,21 @@ bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locat
result = childFrameResult;
}
- if (isInsideChildFrame)
- return true;
+ // Don't trust |isInsideChildFrame|. For rect-based hit-test, returns
+ // true only when the hit test rect is totally within the iframe,
+ // i.e. nodeAtPointOverWidget() also returns true.
+ // Use a temporary HitTestResult because we don't want to collect the
+ // iframe element itself if the hit-test rect is totally within the iframe.
+ if (isInsideChildFrame) {
+ if (!locationInContainer.isRectBasedTest())
+ return true;
+ HitTestResult pointOverWidgetResult = result;
+ bool pointOverWidget = nodeAtPointOverWidget(pointOverWidgetResult, locationInContainer, accumulatedOffset, action);
+ if (pointOverWidget)
+ return true;
+ result = pointOverWidgetResult;
+ return false;
+ }
}
}
« no previous file with comments | « LayoutTests/fast/dom/nodesFromRect/resources/child-frame-scrolled.html ('k') | Source/devtools/front_end/ui/toolbar.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698