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

Unified Diff: Source/core/layout/HitTestResult.h

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix git cl format mangling Created 5 years, 7 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/HitTestResult.h
diff --git a/Source/core/layout/HitTestResult.h b/Source/core/layout/HitTestResult.h
index 01127a7ecd36ce969ce251bf51e202cc8a8e05e0..14be976f54d9c5f94acd00475c81272c931e45c9 100644
--- a/Source/core/layout/HitTestResult.h
+++ b/Source/core/layout/HitTestResult.h
@@ -63,6 +63,9 @@ public:
HitTestResult& operator=(const HitTestResult&);
DECLARE_TRACE();
+ bool equalForCacheability(const HitTestResult&) const;
+ void cacheValues(const HitTestResult&);
Rick Byers 2015/06/05 20:48:59 please add a brief comment describing when cacheVa
esprehn 2015/06/06 21:14:30 addCachedResult() I think is what you want.
dtapuska 2015/06/09 18:21:24 Done.
dtapuska 2015/06/09 18:21:24 Done.
+
// For point-based hit tests, these accessors provide information about the node
// under the point. For rect-based hit tests they are meaningless (reflect the
// last candidate node observed in the rect).
@@ -124,6 +127,9 @@ public:
bool isOverLink() const;
+ const LayoutRect& validityRect() const { return m_validityRect; }
+ void setValidityRect(const LayoutRect&);
+
// Return true if the test is a list-based test and we should continue testing.
bool addNodeToListBasedTestResult(Node*, const HitTestLocation& pointInContainer, const LayoutRect& = LayoutRect());
bool addNodeToListBasedTestResult(Node*, const HitTestLocation& pointInContainer, const FloatRect&);
@@ -143,6 +149,7 @@ private:
HitTestLocation m_hitTestLocation;
HitTestRequest m_hitTestRequest;
+ LayoutRect m_validityRect;
RefPtrWillBeMember<Node> m_innerNode;
RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode;

Powered by Google App Engine
This is Rietveld 408576698