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

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

Issue 1242593004: Fix invalidity in HitTestCache with LayoutParts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout test Created 5 years, 4 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 3bd9e7fbba2e5aafaf2d74491450b2ac38532fee..7e1af73aa8e6df5563484adb6402c6a193b82ba1 100644
--- a/Source/core/layout/LayoutPart.cpp
+++ b/Source/core/layout/LayoutPart.cpp
@@ -152,6 +152,12 @@ bool LayoutPart::nodeAtPointOverWidget(HitTestResult& result, const HitTestLocat
// Check to see if we are really over the widget itself (and not just in the border/padding area).
pdr. 2015/08/08 05:44:14 It looks like there are three modes here: 1) hit t
dtapuska 2015/08/10 19:35:42 Yes ideally we could cache the border or padding a
if ((inside || result.isRectBasedTest()) && !hadResult && result.innerNode() == node())
result.setIsOverWidget(contentBoxRect().contains(result.localPoint()));
+
+ // If there was a hit on the LayoutReplaced; the child FrameView
+ // likely isn't loaded yet; so don't cache this result.
pdr. 2015/08/08 05:44:14 Can we replace "...the child FrameView likely isn'
dtapuska 2015/08/10 19:35:42 Effectively yes this patch prevents caching hit te
+ if (inside)
+ result.setCacheable(false);
+
return inside;
}
« LayoutTests/fast/events/hit-test-cache-iframes.html ('K') | « Source/core/layout/HitTestCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698