RESOLVED FIXED112810
[Qt][WK2] Use C API to enable Navigator Qt Object.
https://bugs.webkit.org/show_bug.cgi?id=112810
Summary [Qt][WK2] Use C API to enable Navigator Qt Object.
Michael Brüning
Reported 2013-03-20 07:28:42 PDT
[Qt][WK2] Use C API to enable Navigator Qt Object.
Attachments
Patch (2.14 KB, patch)
2013-03-20 07:46 PDT, Michael Brüning
no flags
Patch (2.12 KB, patch)
2013-03-21 07:30 PDT, Michael Brüning
kling: review+
Michael Brüning
Comment 1 2013-03-20 07:46:21 PDT
Kenneth Rohde Christiansen
Comment 2 2013-03-20 07:48:12 PDT
Comment on attachment 194053 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=194053&action=review > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:845 > + static WKStringRef messageName = WKStringCreateWithUTF8CString("SetNavigatorQtObjectEnabled"); > + WKRetainPtr<WKBooleanRef> enabledRef = adoptWK(WKBooleanCreate(enabled)); > + WKPagePostMessageToInjectedBundle(webPage.get(), messageName, enabledRef.get()); Why is this static? why not use WKRetainPtr = adoptWK...?
Michael Brüning
Comment 3 2013-03-20 07:51:13 PDT
(In reply to comment #2) > (From update of attachment 194053 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=194053&action=review > > > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:845 > > + static WKStringRef messageName = WKStringCreateWithUTF8CString("SetNavigatorQtObjectEnabled"); > > + WKRetainPtr<WKBooleanRef> enabledRef = adoptWK(WKBooleanCreate(enabled)); > > + WKPagePostMessageToInjectedBundle(webPage.get(), messageName, enabledRef.get()); > > Why is this static? why not use WKRetainPtr = adoptWK...? To prevent reinitialization and to follow the same pattern used in https://bugs.webkit.org/show_bug.cgi?id=108826 .
Jocelyn Turcotte
Comment 4 2013-03-21 07:23:59 PDT
Comment on attachment 194053 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=194053&action=review > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:844 > + WKRetainPtr<WKBooleanRef> enabledRef = adoptWK(WKBooleanCreate(enabled)); Nit: Maybe call it wkEnabled (since it's actually a WKRetainPtr). Otherwise LGTM
Michael Brüning
Comment 5 2013-03-21 07:30:05 PDT
Michael Brüning
Comment 6 2013-04-09 04:47:35 PDT
Note You need to log in before you can comment on or make changes to this bug.