| Index: third_party/WebKit/Source/core/editing/Editor.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| index 5a50facd29f34cfd7e38e20e0632135d5b042c34..ea9f3d2b59a7eb5992f2bb678dc6e07b5f0542d2 100644
|
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| @@ -208,7 +208,8 @@ static bool isCaretAtStartOfWrappedLine(const FrameSelection& selection) {
|
| return false;
|
| if (selection.selectionInDOMTree().affinity() != TextAffinity::Downstream)
|
| return false;
|
| - const Position& position = selection.start();
|
| + const Position& position =
|
| + selection.computeVisibleSelectionInDOMTreeDeprecated().start();
|
| return !inSameLine(PositionWithAffinity(position, TextAffinity::Upstream),
|
| PositionWithAffinity(position, TextAffinity::Downstream));
|
| }
|
| @@ -1096,7 +1097,10 @@ void Editor::cut(EditorCommandSource source) {
|
| // TODO(yosin) We should use early return style here.
|
| if (canDeleteRange(selectedRange())) {
|
| spellChecker().updateMarkersForWordsAffectedByEditing(true);
|
| - if (enclosingTextControl(frame().selection().start())) {
|
| + if (enclosingTextControl(frame()
|
| + .selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .start())) {
|
| String plainText = frame().selectedTextForClipboard();
|
| Pasteboard::generalPasteboard()->writePlainText(
|
| plainText, canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace
|
| @@ -1133,7 +1137,10 @@ void Editor::copy() {
|
| // we need clean layout to obtain the selected content.
|
| frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| - if (enclosingTextControl(frame().selection().start())) {
|
| + if (enclosingTextControl(frame()
|
| + .selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .start())) {
|
| Pasteboard::generalPasteboard()->writePlainText(
|
| frame().selectedTextForClipboard(),
|
| canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace
|
|
|