Bug 178178

Summary: [GLib] WebKitNavigationAction should tell whether it is a redirect
Product: WebKit Reporter: Gustavo Noronha (kov) <gustavo>
Component: WebKitGTKAssignee: Gustavo Noronha (kov) <gustavo>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, berto, bugs-noreply, buildbot, cgarcia, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch cgarcia: review+

Description Gustavo Noronha (kov) 2017-10-11 11:37:59 PDT
[GLib] WebKitNavigationAction should tell whether it is a redirect
Comment 1 Gustavo Noronha (kov) 2017-10-11 11:41:26 PDT
Created attachment 323435 [details]
Patch
Comment 2 Build Bot 2017-10-11 11:43:15 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2017-10-11 12:32:49 PDT
Comment on attachment 323435 [details]
Patch

LGTM. Carlos Garcia will surely want to do the final review, since it's new API.
Comment 4 Adrian Perez 2017-10-12 02:39:53 PDT
Comment on attachment 323435 [details]
Patch

Same opinion as Michael: Looks good to me, but I am not
a reviewer yet so let's wait for Carlos to take a look.
Comment 5 Carlos Garcia Campos 2017-10-13 01:58:54 PDT
Comment on attachment 323435 [details]
Patch

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

LGTM, thanks!

> Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp:158
> + * Return whether the navigation had a redirect.

@navigation I'm confused here about the use of "had".

> Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp:160
> + * Returns: whether the original navigation was redirected.

for boolean functions we normally use the pattern %TRUE if bla bla bla, or %FALSE otherwise.
Comment 6 Gustavo Noronha (kov) 2017-10-13 10:07:40 PDT
Committed r223282: <https://trac.webkit.org/changeset/223282>
Comment 7 Michael Catanzaro 2017-10-14 17:03:39 PDT
(In reply to Carlos Garcia Campos from comment #5)
> for boolean functions we normally use the pattern %TRUE if bla bla bla, or
> %FALSE otherwise.

Personally, I omit the "or %FALSE otherwise" because it's obvious.