Summary: | [GTK] Cannot scroll in option menu when it larger than the screen | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | csaavedra | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2013-11-20 10:53:29 PST
Created attachment 217458 [details]
Patch
Comment on attachment 217458 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217458&action=review > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95 > + for (i = 0, child = children.get(); i < itemCount; i++, child = g_list_next(child)) { I think that if you declare i and child here they will be scoped properly. For instance: for (int i = 0, GList* child = children.get();... > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:114 > + guint button = event && event->type == GDK_BUTTON_PRESS ? event->button.button : 1; > + guint32 activateTime = event ? gdk_event_get_time(event) : GDK_CURRENT_TIME; Nice cleanup. (In reply to comment #2) > (From update of attachment 217458 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=217458&action=review > > > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95 > > + for (i = 0, child = children.get(); i < itemCount; i++, child = g_list_next(child)) { > > I think that if you declare i and child here they will be scoped properly. For instance: > > for (int i = 0, GList* child = children.get();... Yes, that would be really great, but it doesn't work :-( > > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:114 > > + guint button = event && event->type == GDK_BUTTON_PRESS ? event->button.button : 1; > > + guint32 activateTime = event ? gdk_event_get_time(event) : GDK_CURRENT_TIME; > > Nice cleanup. Thanks. (In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 217458 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=217458&action=review > > > > > Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95 > > > + for (i = 0, child = children.get(); i < itemCount; i++, child = g_list_next(child)) { > > > > I think that if you declare i and child here they will be scoped properly. For instance: > > > > for (int i = 0, GList* child = children.get();... > > Yes, that would be really great, but it doesn't work :-( I've tried again to be sure, and this is what I got: CXX Source/WebCore/platform/gtk/libPlatformGtk_la-GtkPopupMenu.lo ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp: In member function 'void WebCore::GtkPopupMenu::popUp(const WebCore::IntSize&, const WebCore::IntPoint&, int, int, const GdkEvent*)': ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:30: error: expected initializer before '*' token ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:30: error: expected ';' before '*' token ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:32: error: 'child' was not declared in this scope ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:58: warning: for increment expression has no effect [-Wunused-value] ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:69: error: expected ')' before ';' token ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:71: error: 'i' was not declared in this scope ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:76: error: 'child' was not declared in this scope ../../Source/WebCore/platform/gtk/GtkPopupMenu.cpp:95:131: error: expected ';' before ')' token Committed r159615: <http://trac.webkit.org/changeset/159615> |