Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp |
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
index decdf8298f69484fdba6bd5410c017621d4af8b5..2bb755fe6279400eb9a77d32102fc2bb011ee534 100644 |
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
@@ -62,6 +62,7 @@ |
#include "core/html/HTMLFrameElementBase.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLSelectElement.h" |
+#include "core/input/ContextMenuAllowedScope.h" |
#include "core/input/EventHandler.h" |
#include "core/layout/HitTestRequest.h" |
#include "core/layout/HitTestResult.h" |
@@ -722,6 +723,11 @@ void FrameSelection::SelectAll(EUserTriggered user_triggered) { |
SelectFrameElementInParentIfFullySelected(); |
// TODO(editing-dev): Should we pass in user_triggered? |
NotifyTextControlOfSelectionChange(kUserTriggered); |
+ if (IsHandleVisible()) { |
yosin_UTC9
2017/05/24 04:51:23
It is OK to show context menu when JS calls |docum
amaralp1
2017/05/24 08:30:34
I think it is OK in this case. The selectAll will
|
+ ContextMenuAllowedScope scope; |
+ frame_->GetEventHandler().SendContextMenuEventForTouchSelection( |
+ kMenuSourceTouch); |
+ } |
} |
bool FrameSelection::SetSelectedRange(const EphemeralRange& range, |