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

Unified Diff: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase problems Created 3 years, 7 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
Index: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index 55dfe1df690957fd5b3cc1179e778754a8525ac4..0cfc6ce13d5439fb2c6519939b9da2534f330931 100644
--- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -54,6 +54,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/HTMLPlugInElement.h"
+#include "core/input/ContextMenuAllowedScope.h"
#include "core/input/EventHandler.h"
#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutPart.h"
@@ -80,7 +81,6 @@
#include "public/web/WebSearchableFormData.h"
#include "public/web/WebTextCheckClient.h"
#include "public/web/WebViewClient.h"
-#include "web/ContextMenuAllowedScope.h"
namespace blink {
@@ -197,7 +197,7 @@ bool ContextMenuClientImpl::ShouldShowContextMenuFromTouch(
!data.link_url.IsEmpty() ||
data.media_type == WebContextMenuData::kMediaTypeImage ||
data.media_type == WebContextMenuData::kMediaTypeVideo ||
- data.is_editable;
+ data.is_editable || !data.selected_text.IsEmpty();
}
static HTMLFormElement* AssociatedFormElement(HTMLElement& element) {

Powered by Google App Engine
This is Rietveld 408576698