| Summary: | [GTK][WK2] Back items are shown in reverse order in MiniBrowser | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | ChangSeok Oh <changseok> | ||||||||||
| Component: | WebKitGTK | Assignee: | ChangSeok Oh <changseok> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | cgarcia, commit-queue, gustavo, mrobinson | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
ChangSeok Oh
2013-12-31 20:51:26 PST
Created attachment 220174 [details]
Patch
Attachment 220174 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/MiniBrowser/gtk/BrowserWindow.c', '--commit-queue']" exit_code: 1
ERROR: Tools/MiniBrowser/gtk/BrowserWindow.c:235: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
ERROR: Tools/MiniBrowser/gtk/BrowserWindow.c:240: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
Total errors found: 2 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #2) > Attachment 220174 [details] did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/MiniBrowser/gtk/BrowserWindow.c', '--commit-queue']" exit_code: 1 > ERROR: Tools/MiniBrowser/gtk/BrowserWindow.c:235: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] > ERROR: Tools/MiniBrowser/gtk/BrowserWindow.c:240: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] > Total errors found: 2 in 2 files > > > If any of these errors are false positives, please file a bug against check-webkit-style. A false positives, I didn't change the indentations. Comment on attachment 220174 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220174&action=review > Tools/MiniBrowser/gtk/BrowserWindow.c:199 > +static GtkWidget *browserWindowCreateBackForwardMenu(BrowserWindow *window, GList *list, gboolean back) I think that reverseMenuItemOrder might be a better name for this variable. > Tools/MiniBrowser/gtk/BrowserWindow.c:235 > - browserWindowCreateBackForwardMenu(window, list)); > + browserWindowCreateBackForwardMenu(window, list, true)); The indentation was wrong here before, please fix it when you change this line. > Tools/MiniBrowser/gtk/BrowserWindow.c:240 > - browserWindowCreateBackForwardMenu(window, list)); > + browserWindowCreateBackForwardMenu(window, list, false)); Ditto. Created attachment 220176 [details]
Patch
Created attachment 220177 [details]
Patch
Comment on attachment 220174 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220174&action=review >> Tools/MiniBrowser/gtk/BrowserWindow.c:199 >> +static GtkWidget *browserWindowCreateBackForwardMenu(BrowserWindow *window, GList *list, gboolean back) > > I think that reverseMenuItemOrder might be a better name for this variable. Done. >> Tools/MiniBrowser/gtk/BrowserWindow.c:235 >> + browserWindowCreateBackForwardMenu(window, list, true)); > > The indentation was wrong here before, please fix it when you change this line. O.K no problem. >> Tools/MiniBrowser/gtk/BrowserWindow.c:240 >> + browserWindowCreateBackForwardMenu(window, list, false)); > > Ditto. Done. Comment on attachment 220177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220177&action=review > Tools/MiniBrowser/gtk/BrowserWindow.c:199 > +static GtkWidget *browserWindowCreateBackForwardMenu(BrowserWindow *window, GList *list, gboolean reverseMenuItemOrder) Use bool here instead of gboolean, you are indeed passing true/false not TRUE/FALSE. > Tools/MiniBrowser/gtk/BrowserWindow.c:235 > GList *list = webkit_back_forward_list_get_back_list_with_limit(backForwadlist, 10); > gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(window->backItem), > - browserWindowCreateBackForwardMenu(window, list)); > + browserWindowCreateBackForwardMenu(window, list, true)); I think it would be easier to revert the back list, so that you don't need any change in browserWindowCreateBackForwardMenu nor the boolean parameter. GList *list = g_list_reverse(webkit_back_forward_list_get_back_list_with_limit(backForwadlist, 10)); Comment on attachment 220177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220177&action=review >> Tools/MiniBrowser/gtk/BrowserWindow.c:235 >> + browserWindowCreateBackForwardMenu(window, list, true)); > > I think it would be easier to revert the back list, so that you don't need any change in browserWindowCreateBackForwardMenu nor the boolean parameter. > > GList *list = g_list_reverse(webkit_back_forward_list_get_back_list_with_limit(backForwadlist, 10)); Agree. It looks more elegant. Thanks Created attachment 220184 [details]
Patch
Comment on attachment 220184 [details] Patch Clearing flags on attachment: 220184 Committed r161187: <http://trac.webkit.org/changeset/161187> All reviewed patches have been landed. Closing bug. |