[editing] Optimize MostBackwardOrForwardCaretPosition
MostBackwardOrForwardCaretPosition was added in r832706, and this caused a -1.8% perf regression for line-layout-repeat-append-select.html The reason is that the function adjusts the obtained candidate position to avoid crossing shadow boundaries. This patch adds fast paths for the common cases when both the candidate and the original position are neither in a shadow tree nor are shadow hosts themselves. Bug: 1154646 Change-Id: I036e9044e2b8c921b466595be9661efbc852aa1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2569740 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#833152}
Showing
Please register or sign in to comment