Bug 64739 - [Qt] Make the WebContextMenuProxyQt handle the full interactions between the views and the WebPageProxy
Summary: [Qt] Make the WebContextMenuProxyQt handle the full interactions between the ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-07-18 11:31 PDT by Benjamin Poulain
Modified: 2011-07-26 09:56 PDT (History)
0 users

See Also:


Attachments
Patch (13.82 KB, patch)
2011-07-18 11:45 PDT, Benjamin Poulain
kling: review+
kling: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 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.
Comment 1 Benjamin Poulain 2011-07-18 11:45:23 PDT
Created attachment 101183 [details]
Patch
Comment 2 Andreas Kling 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.
Comment 3 Andreas Kling 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.
Comment 4 Benjamin Poulain 2011-07-26 09:56:44 PDT
Committed r91758: <http://trac.webkit.org/changeset/91758>