Index: WebCore/dom/Node.cpp |
=================================================================== |
--- WebCore/dom/Node.cpp (revision 73270) |
+++ WebCore/dom/Node.cpp (working copy) |
@@ -1192,6 +1192,17 @@ |
return this == node || node->isDescendantOf(this); |
} |
+bool Node::containsIncludingShadowDOM(Node* node) |
+{ |
+ if (!node) |
+ return false; |
+ for (Node* n = node; n; n = n->parentOrHostNode()) { |
+ if (n == this) |
+ return true; |
+ } |
+ return false; |
+} |
+ |
void Node::attach() |
{ |
ASSERT(!attached()); |
@@ -2634,7 +2645,7 @@ |
if (event->bubbles()) { |
size_t size = ancestors.size(); |
for (size_t i = 0; i < size; ++i) { |
- ancestors[i].defaultEventHandler(event.get()); |
+ ancestors[i].node()->defaultEventHandler(event.get()); |
ASSERT(!event->defaultPrevented()); |
if (event->defaultHandled()) |
goto doneWithDefault; |