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()) |