Chromium Code Reviews
DescriptionMake SelectionEditor::markCacheDirty() not to reset cached value if it has been cleared
This patch makes |SelectionEditor::markCacheDirty()| not to reset cached
|VisibleSeleciton| and |VisibleSelectionInFlatTree| when we've already cleard,
calling default constructor of |VisibleSelection| and
|VisibleSelectionInFlatTree| and copying them, to make |markCacheDirty()|
faster.
In "PerformanceTests/Bindings/append-child.html", |markCacheDirty()| takes
5.26% of |ContainerNode::appendChild()|.
In "PerformanceTests/DOM/inner_html_with_selection.html", |markCacheDirty()|
takes 8.56% of |ContainerNode::appendChild()|.
BUG=692939, 693458
TEST=n/a; no behavior changes
Review-Url: https://codereview.chromium.org/2708533002
Cr-Commit-Position: refs/heads/master@{#451567}
Committed: https://chromium.googlesource.com/chromium/src/+/54210329887cfd683e71722b93a5e05b95f5e12d
Patch Set 1 : 2017-02-20T12:38:08 #
Messages
Total messages: 12 (8 generated)
|
|||||||||||||||||||