Bug 137193 - [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
Summary: [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2014-09-28 04:50 PDT by Carlos Garcia Campos
Modified: 2014-09-30 06:28 PDT (History)
8 users (show)

See Also:


Attachments
Patch (26.87 KB, patch)
2014-09-28 04:53 PDT, Carlos Garcia Campos
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-09-28 04:50:39 PDT
This class was in platform only to have a common implementation to be shared with WebKit1. Now that it's only used by WebPopupMenuProxyGtk in WebKit2, we can simplify the code by merging the implementation directly into WebPopupMenuProxyGtk.
Comment 1 Carlos Garcia Campos 2014-09-28 04:53:42 PDT
Created attachment 238812 [details]
Patch
Comment 2 WebKit Commit Bot 2014-09-28 04:55:23 PDT
Attachment 238812 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:134:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gustavo Noronha (kov) 2014-09-30 05:44:06 PDT
Comment on attachment 238812 [details]
Patch

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

LGTM with one question:

> Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:-69
> -        m_popup->clear();

Is clearing the menu no longer necessary? I couldn't figure out what change makes this not needed.
Comment 4 Carlos Garcia Campos 2014-09-30 05:50:34 PDT
(In reply to comment #3)
> (From update of attachment 238812 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=238812&action=review
> 
> LGTM with one question:
> 
> > Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp:-69
> > -        m_popup->clear();
> 
> Is clearing the menu no longer necessary? I couldn't figure out what change makes this not needed.

Yes, I'm not sure if that was there because WebKit1 worked differently, but in WebKit2, the same WebPopupMenuProxy can't be populated twice, the page proxy always creates a new WebPopupMenuProxy when it receives the ShowPopupMenu message and if there was an active one already, it's destroyed.
Comment 5 Carlos Garcia Campos 2014-09-30 06:28:20 PDT
Committed r174103: <http://trac.webkit.org/changeset/174103>