Bug 64739

Summary: [Qt] Make the WebContextMenuProxyQt handle the full interactions between the views and the WebPageProxy
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebKit2Assignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Qt, QtTriaged
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch kling: review+, kling: commit-queue-

Benjamin Poulain
Reported 2011-07-18 11:31:36 PDT
The current design of WebContextMenuProxyQt still suffer from the old QWKPage: -the actions of the menu are still QtWebPageProxy::WebAction which was a terrible idea (because those actions are really only valid in when a context menu is up) -the functions of the views are called through the QtWebPageProxy wich defeat the purpose of WebContextMenuProxy The WebContextMenuProxyQt needs to be promoted to a real proxy on its own with the full responsibility of the context menu.
Attachments
Patch (13.82 KB, patch)
2011-07-18 11:45 PDT, Benjamin Poulain
kling: review+
kling: commit-queue-
Benjamin Poulain
Comment 1 2011-07-18 11:45:23 PDT
Andreas Kling
Comment 2 2011-07-26 06:33:44 PDT
Comment on attachment 101183 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101183&action=review > Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp:105 > + connect(qtAction, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool)), Qt::DirectConnection); The Qt::DirectConnection here can be omitted, since the object is on the same thread.
Andreas Kling
Comment 3 2011-07-26 06:41:49 PDT
Comment on attachment 101183 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101183&action=review > Source/WebKit2/ChangeLog:3 > + [Qt] Make the WebContextMenuProxyQt handle the full interactions between the views and the WebPageProxy Where's the customary [WK2] huh? Unacceptable, sir! >> Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp:105 >> + connect(qtAction, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool)), Qt::DirectConnection); > > The Qt::DirectConnection here can be omitted, since the object is on the same thread. Apparently this is meant to protect against future refactorings, since the slot assumes that QObject::sender() is valid, which may not be the case given a queued connection. That's somewhat reasonable, so I'm retracting this moan.
Benjamin Poulain
Comment 4 2011-07-26 09:56:44 PDT
Note You need to log in before you can comment on or make changes to this bug.