[webkit-reviews] review granted: [Bug 173484] NavigationAction has too many constructors : [Attachment 313188] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 19 15:37:09 PDT 2017


Brady Eidson <beidson at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 173484: NavigationAction has too many constructors
https://bugs.webkit.org/show_bug.cgi?id=173484

Attachment 313188: Patch

https://bugs.webkit.org/attachment.cgi?id=313188&action=review




--- Comment #13 from Brady Eidson <beidson at apple.com> ---
Comment on attachment 313188
  --> https://bugs.webkit.org/attachment.cgi?id=313188
Patch

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

Stylistic comments only.

> Source/WebCore/loader/FrameLoader.cpp:3411
> -	       action = NavigationAction(request, loadType, isFormSubmission,
event, shouldOpenExternalURLsPolicy);
> +	       action = NavigationAction { request, loadType, isFormSubmission,
event, shouldOpenExternalURLsPolicy };

"action" is already known to be a NavigationAction object, and therefore the
initializer list does not need a type name preceding it.

> Source/WebCore/loader/FrameLoader.cpp:3414
> +	       action = NavigationAction { request,
NavigationType::FormResubmitted, shouldOpenExternalURLsPolicy, event };

Ditto

> Source/WebCore/loader/FrameLoader.cpp:3703
> +    Page* page = oldPage->chrome().createWindow(openerFrame,
requestWithReferrer, features, NavigationAction {
requestWithReferrer.resourceRequest(), NavigationType::Other,
shouldOpenExternalURLsPolicy });

Ditto

> Source/WebCore/loader/NavigationAction.cpp:47
> +NavigationAction::NavigationAction(const ResourceRequest& resourceRequest,
NavigationType type,
> +    ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Event* event,
const AtomicString& downloadAttribute)
> +    : m_resourceRequest { resourceRequest }

We don't normally break up lines like this (the previous line wasn't nearly too
long, IMHO), and this is confusing style-bot on like 47


More information about the webkit-reviews mailing list