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

Unified Diff: Source/core/page/CustomContextMenuProvider.cpp

Issue 508853002: Context menu should skip any menu construct whose submenu label is the empty string. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | « LayoutTests/fast/dom/HTMLMenuElement/custom-context-menu-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/CustomContextMenuProvider.cpp
diff --git a/Source/core/page/CustomContextMenuProvider.cpp b/Source/core/page/CustomContextMenuProvider.cpp
index d59802977b0909bc315f5837c2c61aaeae2c4ec6..0bd522c24da53527778c98056972c89ee36f99b3 100644
--- a/Source/core/page/CustomContextMenuProvider.cpp
+++ b/Source/core/page/CustomContextMenuProvider.cpp
@@ -85,11 +85,11 @@ void CustomContextMenuProvider::populateContextMenuItems(const HTMLMenuElement&
} else if (isHTMLMenuElement(*nextElement)) {
ContextMenu subMenu;
String labelString = nextElement->fastGetAttribute(labelAttr);
- if (labelString.isEmpty()) {
+ if (labelString.isNull()) {
appendSeparator(contextMenu);
populateContextMenuItems(*toHTMLMenuElement(nextElement), contextMenu);
appendSeparator(contextMenu);
- } else {
+ } else if (!labelString.isEmpty()) {
populateContextMenuItems(*toHTMLMenuElement(nextElement), subMenu);
contextMenu.appendItem(ContextMenuItem(SubmenuType, ContextMenuItemCustomTagNoAction, labelString, &subMenu));
}
« no previous file with comments | « LayoutTests/fast/dom/HTMLMenuElement/custom-context-menu-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698