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

Unified Diff: third_party/WebKit/Source/core/input/EventHandlingUtil.cpp

Issue 2845973002: Merge two IsInDocument implementations. (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
index 8ce9d0cac29983c8d1b672e86243e670d4b616e1..cd4ac074a8b175c9f163cd9cb944b5b7e64de248 100644
--- a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
@@ -83,6 +83,10 @@ PaintLayer* LayerForNode(Node* node) {
return layer;
}
+bool IsInDocument(EventTarget* n) {
+ return n && n->ToNode() && n->ToNode()->isConnected();
+}
+
ScrollableArea* AssociatedScrollableArea(const PaintLayer* layer) {
if (PaintLayerScrollableArea* scrollable_area = layer->GetScrollableArea()) {
if (scrollable_area->ScrollsOverflow())
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlingUtil.h ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698