Bug 151168 - Rename handle.*Event to dispatch.*Event
Summary: Rename handle.*Event to dispatch.*Event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-11 16:48 PST by Geoffrey Garen
Modified: 2015-11-14 14:06 PST (History)
6 users (show)

See Also:


Attachments
Patch (19.39 KB, patch)
2015-11-11 16:49 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2015-11-11 16:48:19 PST
Rename handle.*Event to dispatch.*Event
Comment 1 Geoffrey Garen 2015-11-11 16:49:38 PST
Created attachment 265336 [details]
Patch
Comment 2 Chris Dumez 2015-11-11 16:50:54 PST
Comment on attachment 265336 [details]
Patch

r=me
Comment 3 Geoffrey Garen 2015-11-11 16:59:44 PST
Comment on attachment 265336 [details]
Patch

Go go Gadget Commit Queue.
Comment 4 WebKit Commit Bot 2015-11-11 17:48:28 PST
Comment on attachment 265336 [details]
Patch

Clearing flags on attachment: 265336

Committed r192342: <http://trac.webkit.org/changeset/192342>
Comment 5 WebKit Commit Bot 2015-11-11 17:48:33 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2015-11-14 14:06:41 PST
Comment on attachment 265336 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=265336&action=review

> Source/WebCore/loader/DocumentLoader.h:142
> +        void dispatchOnloadEvents();
> +        bool wasOnloadDispatched() { return m_wasOnloadDispatched; }

These are not good function names. The events are “load” events. There is no standard “onload” event, although a webpage could create and dispatch an event with that name, although there would be no point. There are some attributes named "onload" that set up handlers for "load" events.

I’m also unclear why “event” here is plural. Maybe there is more than one load event that gets dispatched?

> Source/WebCore/loader/DocumentLoader.h:391
> +        bool m_wasOnloadDispatched;

Ditto.

> Source/WebCore/loader/EmptyClients.h:274
> +    virtual void dispatchDidDispatchOnloadEvents() override { }

Ditto.

> Source/WebCore/loader/FrameLoader.h:215
> +    void dispatchOnloadEvents();

Ditto.

> Source/WebCore/loader/FrameLoaderClient.h:155
> +        virtual void dispatchDidDispatchOnloadEvents() = 0;

Ditto.