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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase 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/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 ab71a5b04f3adcf3f6625c45ba0905e8f6a8fe7a..2c1d36550e91f3943e62b4aadd226dc82feae170 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"
@@ -728,6 +729,11 @@ void FrameSelection::SelectAll(EUserTriggered user_triggered) {
SelectFrameElementInParentIfFullySelected();
// TODO(editing-dev): Should we pass in user_triggered?
NotifyTextControlOfSelectionChange(kUserTriggered);
+ if (IsHandleVisible()) {
+ ContextMenuAllowedScope scope;
+ frame_->GetEventHandler().ShowNonLocatedContextMenu(nullptr,
+ kMenuSourceTouch);
+ }
}
void FrameSelection::NotifyAccessibilityForSelectionChange() {

Powered by Google App Engine
This is Rietveld 408576698