[Webkit-unassigned] [Bug 133680] [GTK] WebKitWebView::create should receive information about the navigation action

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 24 06:53:57 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133680





--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-06-24 06:54:14 PST ---
(From update of attachment 232791)
View in context: https://bugs.webkit.org/attachment.cgi?id=232791&action=review

I'm using WebHitTestResult::Data because that's what we receive now in API:UIClient methods, WebHitTestResult is the C API wrapper, but we are not using the C API for the UI client anymore. So, instead of allocating a WebHitTestResult I prefer to use the given const reference. It's only a problem for the context menu, until we use a custom client that receives a const WebHitTestResult::Data& too. And the style issues are false positives of std::function

>> Source/WebKit2/ChangeLog:10
>> +        signal. In the future it could alsp be also for the
> 
> s/alsp//

Oops.

>> Source/WebKit2/UIProcess/API/gtk/WebKitNavigationActionPrivate.h:49
>> +    unsigned isUserGesture : 1;
> 
> Why not use a bool here?

No reason, we can use bool as well.

>> Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp:50
>> +        return webkitWebViewCreateNewPage(m_webView, windowFeatures, &navigation);
> 
> Nit: Probably "action" is a better name.

Ok.

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:940
>> +        g_cclosure_marshal_generic,
> 
> Is this really the correct marshaller for a OBJECT and an enum value?

Yes, the generic marshaller can be used for any parameters

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1869
>> +    GRefPtr<WebKitHitTestResult> hitTestResult = adoptGRef(webkitHitTestResultCreate(data));
> 
> Wow. It'd be great to avoid all these copies! Why not just pass a const WebHitTestResult& instead of Data?

That's what the previous FIXME is about :-)

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h:212
>> +                                                WebKitNavigationAction      *navigation);
> 
> Probably should be called action or navigation_action.

Ok.

-- 
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