Index: Source/web/ContextMenuClientImpl.cpp |
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp |
index 517305b7570e797255ab3ac8d6ee9ef5271aafa6..6579f6e80dd9b70bd0f8e4d5b7461cae9cd200d0 100644 |
--- a/Source/web/ContextMenuClientImpl.cpp |
+++ b/Source/web/ContextMenuClientImpl.cpp |
@@ -219,8 +219,10 @@ void ContextMenuClientImpl::showContextMenu(const blink::ContextMenu* defaultMen |
data.editFlags |= WebContextMenuData::CanPaste; |
if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canDelete()) |
data.editFlags |= WebContextMenuData::CanDelete; |
- // We can always select all... |
- data.editFlags |= WebContextMenuData::CanSelectAll; |
+ if (isHTMLTextFormControlElement(r.innerNonSharedNode())) { |
+ if (!toHTMLTextFormControlElement(r.innerNonSharedNode())->value().isEmpty()) |
+ data.editFlags |= WebContextMenuData::CanSelectAll; |
+ } |
data.editFlags |= WebContextMenuData::CanTranslate; |
// Links, Images, Media tags, and Image/Media-Links take preference over |