[Webkit-unassigned] [Bug 26140] Implement onreadystatechange event handler for Documents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 11 17:23:58 PDT 2010


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
  Attachment #70499|review?                     |review-
               Flag|                            |

--- Comment #4 from Darin Adler <darin at apple.com>  2010-10-11 17:23:57 PST ---
(From update of attachment 70499)
View in context: https://bugs.webkit.org/attachment.cgi?id=70499&action=review

> WebCore/dom/Document.cpp:1900
> -void Document::implicitOpen()
> +void Document::implicitOpen(bool removeExistingEventListeners)
>  {
>      cancelParsing();
> +    if (removeExistingEventListeners)
> +        removeAllEventListeners();

Why is adding a boolean better than calling removeAllEventListeners in Document::open?

> WebCore/dom/Document.h:536
> -    void implicitOpen();
> +    void implicitOpen(bool removeExistingEventListeners);

This seems like a poor change. Normally if we are just passing in a boolean constant we use an enum instead so it’s named and can be understood at the call site. But in this case, it seems the caller can just call removeAllEventListeners.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list