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)); |
} |