Commit 379dacd4 authored by tanvir.rizvi's avatar tanvir.rizvi Committed by Commit Bot

Avoid redundant equality check in SelectionEditor::SetSelection

SelectionEditor::SetSelection is only called from FrameSelection
SetSelection, which does the equality of the old DOM selection with
the existing selection. So we can avoid doing the check in Selection
Editor::SetSelection

BUG=N/A

Change-Id: Ida77fee4e4bd26aa5729d367a181b7437c7eaaf9
Reviewed-on: https://chromium-review.googlesource.com/595787
Commit-Queue: Tanvir Rizvi <tanvir.rizvi@samsung.com>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491296}
parent b25f768c
......@@ -113,8 +113,7 @@ void SelectionEditor::MarkCacheDirty() {
void SelectionEditor::SetSelection(const SelectionInDOMTree& new_selection) {
new_selection.AssertValidFor(GetDocument());
if (selection_ == new_selection)
return;
DCHECK_NE(selection_, new_selection);
ClearDocumentCachedRange();
MarkCacheDirty();
selection_ = new_selection;
......
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