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

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: Adjust comment to be inclusive of all the cases 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
« no previous file with comments | « Source/core/layout/HitTestCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutPart.cpp
diff --git a/Source/core/layout/LayoutPart.cpp b/Source/core/layout/LayoutPart.cpp
index 3bd9e7fbba2e5aafaf2d74491450b2ac38532fee..9f2b2b4e0167d1d675be89690ce444a98a11205b 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).
if ((inside || result.isRectBasedTest()) && !hadResult && result.innerNode() == node())
result.setIsOverWidget(contentBoxRect().contains(result.localPoint()));
+
+ // Do not cache hit tests as we don't get appropriate callbacks to invalidate the cache.
+ // This includes the border and padding areas for simplicity.
+ if (inside)
esprehn 2015/08/10 21:22:02 Why not just use the isOverWidget check we did abo
+ result.setCacheable(false);
+
return inside;
}
« no previous file with comments | « Source/core/layout/HitTestCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698