Bug 151168

Summary: Rename handle.*Event to dispatch.*Event
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, esprehn+autocc, japhet, kangil.han
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.