Chromium Code Reviews| 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); |