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

Unified Diff: WebCore/dom/Node.cpp

Issue 5605003: Merge 73270 - 2010-12-03 Dimitri Glazkov <dglazkov@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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 | « WebCore/dom/Node.h ('k') | WebCore/html/HTMLLabelElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « WebCore/dom/Node.h ('k') | WebCore/html/HTMLLabelElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698