Bug 206775

Summary: Update EditorState from WebProcess when requesting context menu
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch wenson_hsieh: review+

Description Alex Christensen 2020-01-24 15:50:16 PST
Update EditorState from WebProcess when requesting context menu
Comment 1 Alex Christensen 2020-01-24 15:53:38 PST
Created attachment 388734 [details]
Patch
Comment 2 Alex Christensen 2020-01-24 15:53:41 PST
<rdar://problem/56305573>
Comment 3 Wenson Hsieh 2020-01-24 16:02:58 PST
Comment on attachment 388734 [details]
Patch

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

> Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp:-72
> -    m_page->send(Messages::WebPageProxy::ShowContextMenu(contextMenuContextData, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));

This seems okay, but we should also consider just calling flushPendingEditorStateUpdate() sending WebPageProxy::ShowContextMenu.

This would have the advantage of avoiding editor state computation in the state where nothing changed (so m_hasPendingEditorStateUpdate is false).
Comment 4 Alex Christensen 2020-01-24 16:49:30 PST
Even better!

http://trac.webkit.org/r255106