Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
index f1c829038055538fe31a41e9edce18811875ce5c..e0cc689747bf617559b2b27bccc78c9632e0fb75 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
@@ -420,7 +420,7 @@ static TriState selectionListState(const FrameSelection& selection, |
selection.computeVisibleSelectionInDOMTreeDeprecated().start(), |
tagName)) |
return TrueTriState; |
- } else if (selection.isRange()) { |
+ } else if (selection.computeVisibleSelectionInDOMTreeDeprecated().isRange()) { |
Element* startElement = enclosingElementWithTag( |
selection.computeVisibleSelectionInDOMTreeDeprecated().start(), |
tagName); |
@@ -1939,7 +1939,10 @@ static bool enabledRangeInEditableText(LocalFrame& frame, |
// We should update selection to canonicalize with current layout and style, |
// before accessing |FrameSelection::selection()|. |
frame.selection().updateIfNeeded(); |
- return frame.selection().isRange() && frame.selection().isContentEditable(); |
+ return frame.selection() |
+ .computeVisibleSelectionInDOMTreeDeprecated() |
+ .isRange() && |
+ frame.selection().isContentEditable(); |
} |
static bool enabledRangeInRichlyEditableText(LocalFrame& frame, |
@@ -1950,7 +1953,9 @@ static bool enabledRangeInRichlyEditableText(LocalFrame& frame, |
// We should update selection to canonicalize with current layout and style, |
// before accessing |FrameSelection::selection()|. |
frame.selection().updateIfNeeded(); |
- return frame.selection().isRange() && |
+ return frame.selection() |
+ .computeVisibleSelectionInDOMTreeDeprecated() |
+ .isRange() && |
frame.selection() |
.computeVisibleSelectionInDOMTreeDeprecated() |
.isContentRichlyEditable(); |