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

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

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 9 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/inspector/InspectorDOMAgent.cpp ('k') | Source/core/layout/HitTestResult.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/HitTestResult.h
diff --git a/Source/core/layout/HitTestResult.h b/Source/core/layout/HitTestResult.h
index 822a5a844713b3e880310a3229e2873004050e8e..f855972b35f605035b82a9c5df86a35075cbe48c 100644
--- a/Source/core/layout/HitTestResult.h
+++ b/Source/core/layout/HitTestResult.h
@@ -53,10 +53,10 @@ public:
typedef WillBeHeapListHashSet<RefPtrWillBeMember<Node>> NodeSet;
HitTestResult();
- HitTestResult(const LayoutPoint&);
+ HitTestResult(const HitTestRequest&, const LayoutPoint&);
// Pass positive padding values to perform a rect-based hit test.
- HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
- HitTestResult(const HitTestLocation&);
+ HitTestResult(const HitTestRequest&, const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
+ HitTestResult(const HitTestRequest&, const HitTestLocation&);
HitTestResult(const HitTestResult&);
~HitTestResult();
HitTestResult& operator=(const HitTestResult&);
@@ -96,6 +96,7 @@ public:
void setToShadowHostIfInClosedShadowRoot();
const HitTestLocation& hitTestLocation() const { return m_hitTestLocation; }
+ const HitTestRequest& hitTestRequest() const { return m_hitTestRequest; }
void setInnerNode(Node*);
void setInnerNonSharedNode(Node*);
@@ -120,9 +121,9 @@ public:
bool isOverLink() const;
// Return true if the test is a list-based test and we should continue testing.
- bool addNodeToListBasedTestResult(Node*, const HitTestRequest&, const HitTestLocation& pointInContainer, const LayoutRect& = LayoutRect());
- bool addNodeToListBasedTestResult(Node*, const HitTestRequest&, const HitTestLocation& pointInContainer, const FloatRect&);
- void append(const HitTestResult&, const HitTestRequest&);
+ bool addNodeToListBasedTestResult(Node*, const HitTestLocation& pointInContainer, const LayoutRect& = LayoutRect());
+ bool addNodeToListBasedTestResult(Node*, const HitTestLocation& pointInContainer, const FloatRect&);
+ void append(const HitTestResult&);
// If m_listBasedTestResult is 0 then set it to a new NodeSet. Return *m_listBasedTestResult. Lazy allocation makes
// sense because the NodeSet is seldom necessary, and it's somewhat expensive to allocate and initialize. This method does
@@ -137,6 +138,7 @@ private:
HTMLMediaElement* mediaElement() const;
HitTestLocation m_hitTestLocation;
+ HitTestRequest m_hitTestRequest;
RefPtrWillBeMember<Node> m_innerNode;
RefPtrWillBeMember<Node> m_innerPossiblyPseudoNode;
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/layout/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698