Closed Bug 1950307 Opened 24 days ago Closed 20 days ago

[wpt-sync] Sync PR 50922 - [Editing] Fix null check for block_flow while creating inline contents on extending selection backward.

Categories

(Core :: DOM: Selection, 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 50922 into mozilla-central (this bug is closed when the sync is complete).

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

Pranav Modi <pranavmodi@microsoft.com> wrote:

[Editing] Fix null check for block_flow while creating inline contents on extending selection backward.

When selection is extended backward word-wise and block element is part
of the inline item, if the target in |CreateInlineContentsFromBlockFlow|
is part of the Shadow tree but the block_flow is anonymous and outside
the Shadow tree then the target is never reached and as block_flow being
a PseudoNode, makes |first| and |last| as nullptr since the traversal
inside the shadow tree doesn't happen for user agent root. Thus we need
to re-target the target before we create inline contents from block_flow
in this case to avoid the crash and get to the correct target. This CL
fixes this by sending the correct target before calling
|CreateInlineContentsFromBlockFlow| in |ComputeInlineContentsFromNode|.

Bug: 380107555
Change-Id: I40dbb7628ed6dd7ecebd5842ee740c28c7a5037d
Reviewed-on: https://chromium-review.googlesource.com/6175802
WPT-Export-Revision: 5ffaa2938f1e14ecd7f6364d58eee8811a8643a6

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

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS : 1

Chrome

CRASH: 1

Safari

OK : 1
PASS : 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1f9fb6d39c8b [wpt PR 50922] - [Editing] Fix null check for block_flow while creating inline contents on extending selection backward., a=testonly https://hg.mozilla.org/integration/autoland/rev/c992ce9d1549 [wpt PR 50922] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 20 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.