RESOLVED FIXED 176583
Modernize and make API::UIClient more asynchronous
https://bugs.webkit.org/show_bug.cgi?id=176583
Summary Modernize and make API::UIClient more asynchronous
Alex Christensen
Reported 2017-09-07 21:32:21 PDT
Modernize and make API::UIClient more asynchronous
Attachments
Patch (56.97 KB, patch)
2017-09-07 21:38 PDT, Alex Christensen
no flags
Patch (60.36 KB, patch)
2017-09-07 21:51 PDT, Alex Christensen
no flags
Patch (66.74 KB, patch)
2017-09-07 21:58 PDT, Alex Christensen
no flags
Patch (66.58 KB, patch)
2017-09-07 22:45 PDT, Alex Christensen
no flags
Patch (66.18 KB, patch)
2017-09-08 10:06 PDT, Alex Christensen
no flags
Patch (64.70 KB, patch)
2017-09-11 15:24 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2017-09-07 21:38:09 PDT
Alex Christensen
Comment 2 2017-09-07 21:51:57 PDT
Build Bot
Comment 3 2017-09-07 21:54:42 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
Alex Christensen
Comment 4 2017-09-07 21:58:12 PDT
Alex Christensen
Comment 5 2017-09-07 22:45:22 PDT
Alex Christensen
Comment 6 2017-09-08 10:06:28 PDT
Blaze Burg
Comment 7 2017-09-08 11:03:38 PDT
Comment on attachment 320271 [details] Patch Automation changes look OK in principle, but I would like to read this more deeply and run test suite.
Blaze Burg
Comment 8 2017-09-08 11:04:10 PDT
(In reply to Brian Burg from comment #7) > Comment on attachment 320271 [details] > Patch > > Automation changes look OK in principle, but I would like to read this more > deeply and run test suite. Or Carlos could do the same. I don't have time to review until Monday.
Blaze Burg
Comment 9 2017-09-11 14:09:41 PDT
Comment on attachment 320271 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320271&action=review r=me with small request > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:212 > + page.getWindowFrameWithCompletionHandler([this, protectedThis = WTFMove(protectedThis), activeURL = page.pageLoadState().activeURL(), handle = handleForWebPageProxy(page), completionHandler = WTFMove(completionHandler)](WebCore::FloatRect windowFrame) mutable { Err, this is weird. The async part should not be in the factory method, which just translates WK types to JSON payloads. So the new signature for this builder should be adjusted to take the page and its windowFrame, and stay synchronous. > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:235 > +void WebAutomationSession::getNextContext(Ref<WebAutomationSession>&& protectedThis, Vector<Ref<WebPageProxy>>&& pages, Ref<Inspector::Protocol::Array<Inspector::Protocol::Automation::BrowsingContext>> contexts, Ref<WebAutomationSession::GetBrowsingContextsCallback>&& callback) This diff is hard to read. > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:242 > + buildBrowsingContextForPage(WTFMove(protectedThis), page.get(), [this, pages = WTFMove(pages), contexts = WTFMove(contexts), callback = WTFMove(callback)](Ref<WebAutomationSession>&& protectedThis, Ref<Inspector::Protocol::Automation::BrowsingContext>&& context) mutable { ... so the windowFrame async call would be here, and call the builder inside the completion handler. > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1288 > + parsedButton and parsedInteraction don't need to be in the completion handler.
Alex Christensen
Comment 10 2017-09-11 15:24:04 PDT
Alex Christensen
Comment 11 2017-09-11 15:51:30 PDT
Radar WebKit Bug Importer
Comment 12 2017-09-27 13:02:19 PDT
Note You need to log in before you can comment on or make changes to this bug.