Attention needed from Kent Tamura and Peng Zhou
Shweta Bindal has uploaded the change for review![Open in Gerrit]()
Shweta Bindal would like Chromium LUCI CQ, Peng Zhou and Kent Tamura to review this change.
Commit message
Revert "The candidate position can also as a child node of the editing_root"
This reverts commit bc351d7210f9c09cf981aa96f7a10957f89492d1.
Reason for revert: These changes make sense only for user-initiated selections. However, since the |setSelection()| method currently also sets the canonical selection, it is causing numerous issues. Therefore, we should revert this change for now.
Original change's description:
> The candidate position can also as a child node of the editing_root
>
> Consider this test case:
> <div contenteditable id="1">
> <div contenteditable="false" id="2">
> <div contenteditable id="3">|</div>
> </div>
> </div>
> Render process crashes when pressing "cmd+shift+;" to activate
> spell checker. The parameter of `CanonicalPosition` is div#1@offset[0]
> and the `anchor_node` of `next` is div#3. Since div#2 is not editable,
> the result of `RootEditableElementOf(next)` is div#3. However,
> `editing_root` is div#1, `CanonicalPosition` returns an empty position,
> leading to a DCHECK failure.
>
> Bug: 398288325
> Change-Id: Ic59883c3252afaf29b6e572147c74debbedd35a6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6294503
> Reviewed-by: Kent Tamura <tk...@chromium.org>
> Commit-Queue: Peng Zhou <zhoupe...@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#1424296}
Bug: 474377386
Bug: 398288325
Change-Id: Icaee6a1261a0447ea98511df74da9648731f3f70
Change information
Files:
- M third_party/blink/renderer/core/editing/spellcheck/spell_checker_test.cc
- M third_party/blink/renderer/core/editing/visible_units.cc
- M third_party/blink/renderer/platform/runtime_enabled_features.json5
- M third_party/blink/web_tests/editing/execCommand/delete-non-editable-range-crash.html
Change size: M
Delta: 4 files changed, 36 insertions(+), 62 deletions(-)
Open in GerritRelated details
Attention is currently required from:
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icaee6a1261a0447ea98511df74da9648731f3f70
Gerrit-Change-Number: 7451438
Gerrit-PatchSet: 1