Commit 47a7a728 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Prune ComputeVisibleSelectionInDOMTreeDeprecated from LayoutTreeAsText

This patch replaces a call site of the deprecated function by the
proper version (which requires clean layout), which is safe because
the layout is:
- Either updated by the call site (ExternalRepresentation)
- Or intentionally kept dirty due to kLayoutAsTextDontUpdateLayout flag

Bug: 698633
Change-Id: I09c3be97ac43e5327cb1175999c83454a15c40f1
Reviewed-on: https://chromium-review.googlesource.com/596709Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491438}
parent 0be8db5f
......@@ -776,8 +776,8 @@ static void WriteSelection(TextStream& ts, const LayoutObject* o) {
if (!frame)
return;
VisibleSelection selection =
frame->Selection().ComputeVisibleSelectionInDOMTreeDeprecated();
const VisibleSelection& selection =
frame->Selection().ComputeVisibleSelectionInDOMTree();
if (selection.IsCaret()) {
ts << "caret: position " << selection.Start().ComputeEditingOffset()
<< " of " << NodePosition(selection.Start().AnchorNode());
......
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