Skip to content

Commit

Permalink
Replace ComputeVisibleSelectionInDOMTreeDeprecated() in EnabledInRich…
Browse files Browse the repository at this point in the history
…lyEditableText()

This patch changes changes |ComputeVisibleSelectionInDOMTreeDeprecated()|
to |ComputeVisibleSelectionInDOMTree()| in |EnabledInRichlyEditableText()| for
improving code health.

This patch is similar to the patch[1].

[1] http://crrev.com/c/591087: Replace ComputeVisibleSelectionInDOMTreeDeprecated()
in EnabledRangeInRichlyEditableText()

Bug: 698633
Change-Id: I8e128544ee6ec90186607c743e82f0a03c5f04b9
Reviewed-on: https://chromium-review.googlesource.com/590971
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490328}
  • Loading branch information
yosinch authored and Commit Bot committed Jul 28, 2017
1 parent abc4634 commit 2c00a0f
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2168,15 +2168,10 @@ static bool EnabledInRichlyEditableText(LocalFrame& frame,
if (source == kCommandFromMenuOrKeyBinding &&
!frame.Selection().SelectionHasFocus())
return false;
return !frame.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.IsNone() &&
frame.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.IsContentRichlyEditable() &&
frame.Selection()
.ComputeVisibleSelectionInDOMTreeDeprecated()
.RootEditableElement();
const VisibleSelection& selection =
frame.Selection().ComputeVisibleSelectionInDOMTree();
return !selection.IsNone() && selection.IsContentRichlyEditable() &&
selection.RootEditableElement();
}

static bool EnabledPaste(LocalFrame& frame,
Expand Down

0 comments on commit 2c00a0f

Please sign in to comment.