Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2713333002: Remove redundant separator at end of the spelling correction context menu (Closed)
Patch Set: Switch back to check for separators at end of menu init Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index f86db71d8c2bd0bb784b87ddb39ee6aa4ccf0db2..9b6c6bd418552e6870de0c16cfde1b6226dad941 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -853,6 +853,13 @@ void RenderViewContextMenu::InitMenu() {
ContextMenuContentType::ITEM_GROUP_PRINT_PREVIEW)) {
AppendPrintPreviewItems();
}
+
+ // Remove any redundant spearators.
lazyboy 2017/02/28 01:03:29 nit: trailing separator.
edwardjung 2017/02/28 01:24:48 Done.
+ if (menu_model_.GetItemCount() > 0 &&
+ menu_model_.GetTypeAt(menu_model_.GetItemCount() - 1) ==
+ ui::MenuModel::TYPE_SEPARATOR) {
+ menu_model_.RemoveItemAt(menu_model_.GetItemCount() - 1);
+ }
}
Profile* RenderViewContextMenu::GetProfile() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698