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 52e6e04639eff8d1bb4d08eb15a9ba932e96efb5..04a89ad07fd68c95ce597443d2b043ec2b08a08b 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
@@ -1197,14 +1197,20 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { |
case IDC_CONTENT_CONTEXT_COPY: |
return !!(params_.edit_flags & WebContextMenuData::CanCopy); |
- case IDC_CONTENT_CONTEXT_PASTE: |
- case IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE: { |
+ case IDC_CONTENT_CONTEXT_PASTE: { |
std::vector<base::string16> types; |
bool ignore; |
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes( |
ui::CLIPBOARD_TYPE_COPY_PASTE, &types, &ignore); |
return !types.empty(); |
} |
+ |
+ case IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE: { |
+ return ui::Clipboard::GetForCurrentThread()->IsFormatAvailable( |
+ ui::Clipboard::GetPlainTextFormatType(), |
+ ui::CLIPBOARD_TYPE_COPY_PASTE); |
+ } |
+ |
case IDC_CONTENT_CONTEXT_DELETE: |
return !!(params_.edit_flags & WebContextMenuData::CanDelete); |