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

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

Issue 2646963002: Stop dismissing selection handles when selection is kept (Closed)
Patch Set: Created 3 years, 11 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 0238e0b185480ab4010b2ce338dc56d0336b45ea..30d896d81f701a0f5eee8e14acd2ee8c3cda11a8 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -182,19 +182,20 @@ void FrameSelection::setSelectionAlgorithm(
DCHECK(isAvailable());
DCHECK(newSelection.isValidFor(document()));
const Document& currentDocument = document();
+ // TODO(editing-dev): We should rename variable |s| to another name to avoid
+ // using one letter variable name.
+ VisibleSelectionTemplate<Strategy> s = newSelection;
+
if (m_granularityStrategy &&
(options & FrameSelection::DoNotClearStrategy) == 0)
m_granularityStrategy->Clear();
bool closeTyping = options & CloseTyping;
bool shouldClearTypingStyle = options & ClearTypingStyle;
- const HandleVisibility handleVisibility = options & HandleVisible
- ? HandleVisibility::Visible
- : HandleVisibility::NotVisible;
+ const HandleVisibility handleVisibility =
+ (options & HandleVisible || s.isHandleVisible())
yosin_UTC9 2017/01/20 07:54:07 We don't need to have |SelectionOption::HandleVisi
Changwan Ryu 2017/01/24 06:38:45 I just wanted to minimize the scope of this CL to
amaralp 2017/01/25 03:48:35 I uploaded a patch crrev.com/2647283006.
+ ? HandleVisibility::Visible
+ : HandleVisibility::NotVisible;
EUserTriggered userTriggered = selectionOptionsToUserTriggered(options);
-
- // TODO(editing-dev): We should rename variable |s| to another name to avoid
- // using one letter variable name.
- VisibleSelectionTemplate<Strategy> s = newSelection;
if (shouldAlwaysUseDirectionalSelection(m_frame))
s.setIsDirectional(true);

Powered by Google App Engine
This is Rietveld 408576698