[webkit-reviews] review granted: [Bug 50396] REGRESSION(r72783): DOMActivate fires multiple times from input type=file : [Attachment 75502] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 3 09:36:03 PST 2010


Darin Adler <darin at apple.com> has granted Dimitri Glazkov (Google)
<dglazkov at chromium.org>'s request for review:
Bug 50396: REGRESSION(r72783): DOMActivate fires multiple times from input
type=file
https://bugs.webkit.org/show_bug.cgi?id=50396

Attachment 75502: Patch
https://bugs.webkit.org/attachment.cgi?id=75502&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=75502&action=review

> WebCore/dom/Node.cpp:1205
> +    if (!node)
> +	   return false;
> +    if (this == node)
> +	   return true;
> +    for (ContainerNode* n = node->parentOrHostNode(); n; n =
n->parentOrHostNode()) {
> +	   if (n == this)
> +	       return true;
> +    }
> +    return false;

I like the way you wrote this, but I would have written it this way:

    for (Node* n = node; n; n = n->parentOrHostNode()) {
	if (n == this)
	    return true;
    }
    return false;

No need for the special handling of the node itself.


More information about the webkit-reviews mailing list