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

Unified Diff: Source/core/dom/TreeScope.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/dom/TreeScope.h
diff --git a/Source/core/dom/TreeScope.h b/Source/core/dom/TreeScope.h
index 1bfcdf91861bd05cc0b548b98cc7eebc3ba2422e..30b28b8cec1c66b394ac366028b6b95f5dff30f6 100644
--- a/Source/core/dom/TreeScope.h
+++ b/Source/core/dom/TreeScope.h
@@ -77,6 +77,7 @@ public:
HTMLMapElement* getImageMap(const String& url) const;
Element* elementFromPoint(int x, int y) const;
+ Element* elementFromPointNoCache(int x, int y) const;
Vector<Element*> elementsFromPoint(int x, int y) const;
// For accessibility.
@@ -176,6 +177,9 @@ private:
bool rootNodeHasTreeSharedParent() const;
+ // Return the element from the point |x,y| and conditionally use the cache based on |useCache|.
+ Element* hitTestPoint(int x, int y, bool useCache) const;
esprehn 2015/06/06 21:14:29 Can we use an IntPoint?
dtapuska 2015/06/09 18:21:23 We could; but I think this would be overkill. Sinc
+
RawPtrWillBeMember<ContainerNode> m_rootNode;
RawPtrWillBeMember<Document> m_document;
RawPtrWillBeMember<TreeScope> m_parentTreeScope;
@@ -208,7 +212,7 @@ inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co
DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
-HitTestResult hitTestInDocument(const Document*, int x, int y);
+HitTestResult hitTestInDocument(const Document*, int x, int y, bool useCache);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698