Modernize and make API::UIClient more asynchronous
Created attachment 320235 [details] Patch
Created attachment 320236 [details] Patch
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
Created attachment 320237 [details] Patch
Created attachment 320242 [details] Patch
Created attachment 320271 [details] Patch
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.
(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.
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.
Created attachment 320486 [details] Patch
http://trac.webkit.org/r221887
<rdar://problem/34694523>