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

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

Issue 2919573002: Prune ComputeVisibleSelectionInDOMTreeDeprecated from Editor::ReplaceSelectionWithFragment (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 459034657393d31623397c0c3fd4915dd4814736..fa0e682d60109513ca7d6893334e4cba0c07789d 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -655,15 +655,9 @@ void Editor::ReplaceSelectionWithFragment(DocumentFragment* fragment,
bool match_style,
InputEvent::InputType input_type) {
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
- if (GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .IsNone() ||
- !GetFrame()
- .Selection()
- .ComputeVisibleSelectionInDOMTreeDeprecated()
- .IsContentEditable() ||
- !fragment)
+ const VisibleSelection& selection =
+ GetFrame().Selection().ComputeVisibleSelectionInDOMTree();
+ if (selection.IsNone() || !selection.IsContentEditable() || !fragment)
return;
ReplaceSelectionCommand::CommandOptions options =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698