Closed Bug 1948050 Opened 11 days ago Closed 6 days ago

[wpt-sync] Sync PR 50682 - Update collapsible placeholder computation

Categories

(Core :: DOM: Editor, task, P4)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 50682 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/50682
Details from upstream follow.

Utkarsh Pathak <utpathak@microsoft.com> wrote:

Update collapsible placeholder computation

This CL resolves a crash bug which occurs due to incorrect calculation
as currently we calculate the collapsible placeholder before the call to
|PrepareWhitespaceAtPositionForSplit| method which actually replaces
"\n" with a nbsp and which is why at the time of removal of collapsible
placeholder, it's not there anymore so the DCHECK fails.
Now on, the collapsible placeholder calculation would be done after all
adjustments done on insertion position and just before the node
insertion starts. This makes sure that we check for collapsible
placeholder at correct |insertion_pos|.
The web_test in this CL should not crash.

Bug: 395028747
Change-Id: Ibba1b868da27a0891a5ea8132295acdfacaed641
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6248618
Reviewed-by: Sambamurthy Bandaru \<sambamurthy.bandaru@microsoft.com>
Reviewed-by: Kent Tamura \<tkent@chromium.org>
Reviewed-by: Siye Liu \<siliu@microsoft.com>
Commit-Queue: Utkarsh Pathak \<utpathak@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1419895}

Component: web-platform-tests → DOM: Editor
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c6561639723 [wpt PR 50682] - Update collapsible placeholder computation, a=testonly
Status: NEW → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.