Bug 137193

Summary: [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, gustavo, gyuyoung.kim, pnormand, rakuco, ryuan.choi, sergio, svillar
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch gustavo: review+

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>