Commit 3587d94a authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Prune ComputeVisibleSelectionInDOMTreeDeprecated from EditorCommand.cpp

This patch prunes the deprecated function from EditorCommand.cpp, which
is safe because layout is already clean at the call sites, updated
in Editor::Command::Execute() before calling the ExecuteFoo() functions.

Bug: 698633
Change-Id: I011cb5dbc95a8b2a5d2b9289db6610471688094a
Reviewed-on: https://chromium-review.googlesource.com/777476Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517756}
parent 94877813
......@@ -303,7 +303,7 @@ static bool ExecuteToggleStyleInList(LocalFrame& frame,
CSSValue* value) {
EditingStyle* selection_style =
EditingStyleUtilities::CreateStyleAtSelectionStart(
frame.Selection().ComputeVisibleSelectionInDOMTreeDeprecated());
frame.Selection().ComputeVisibleSelectionInDOMTree());
if (!selection_style || !selection_style->Style())
return false;
......@@ -399,12 +399,9 @@ static bool ExpandSelectionToGranularity(LocalFrame& frame,
TextGranularity granularity) {
const VisibleSelection& selection = CreateVisibleSelectionWithGranularity(
SelectionInDOMTree::Builder()
.SetBaseAndExtent(frame.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.Base(),
frame.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.Extent())
.SetBaseAndExtent(
frame.Selection().ComputeVisibleSelectionInDOMTree().Base(),
frame.Selection().ComputeVisibleSelectionInDOMTree().Extent())
.Build(),
granularity);
const EphemeralRange new_range = selection.ToNormalizedEphemeralRange();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment