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

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

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup, add a better test for tables Created 5 years, 10 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/dom/TreeScope.cpp ('k') | Source/core/layout/HitTestResult.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/HitTestRequest.h
diff --git a/Source/core/layout/HitTestRequest.h b/Source/core/layout/HitTestRequest.h
index 272c0a20222eae54294974dbc9b874fcbcb852bf..d9e937e1c31b2ab2a7830e2ab721976775951c72 100644
--- a/Source/core/layout/HitTestRequest.h
+++ b/Source/core/layout/HitTestRequest.h
@@ -23,6 +23,8 @@
#ifndef HitTestRequest_h
#define HitTestRequest_h
+#include "wtf/Assertions.h"
+
namespace blink {
class HitTestRequest {
@@ -38,6 +40,12 @@ public:
AllowChildFrameContent = 1 << 8,
ChildFrameHitTest = 1 << 9,
IgnorePointerEventsNone = 1 << 10,
+ // Collect a list of nodes instead of just one.
+ // (This is for elementsFromPoint and rect-based tests).
+ ListBased = 1 << 11,
+ // When using list-based testing, this flag causes us to continue hit
+ // testing after a hit has been found.
+ PenetratingList = 1 << 12,
};
typedef unsigned HitTestRequestType;
@@ -45,6 +53,8 @@ public:
HitTestRequest(HitTestRequestType requestType)
: m_requestType(requestType)
{
+ // Penetrating lists should also be list-based.
+ ASSERT(!(requestType & PenetratingList) || (requestType & ListBased));
}
bool readOnly() const { return m_requestType & ReadOnly; }
@@ -57,6 +67,8 @@ public:
bool allowsChildFrameContent() const { return m_requestType & AllowChildFrameContent; }
bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerEventsNone; }
+ bool listBased() const { return m_requestType & ListBased; }
+ bool penetratingList() const { return m_requestType & PenetratingList; }
// Convenience functions
bool touchMove() const { return move() && touchEvent(); }
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/layout/HitTestResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698