Closed Bug 2028429 Opened 3 months ago Closed 2 months ago

[wpt-sync] Sync PR 58887 - Add highlightsFromPoint support for OpaqueRange

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Stephanie Zhang <stephanie.zhang@microsoft.com> wrote:

Add highlightsFromPoint support for OpaqueRange

Allow highlightsFromPoint to return highlights containing OpaqueRanges
inside form controls. Hit testing for text inside \<input> and \<textarea>
requires bypassing the user-agent shadow tree check and walking from the
inner editor element to its text node child when the hit test doesn't
return a text node directly.

Low-Coverage-Reason: COVERAGE_UNDERREPORTED
Bug: 421421332
Change-Id: I940b86757883ae7d7747e568234e647c53288aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7693796
Commit-Queue: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Reviewed-by: Fernando Fiori \<ffiori@microsoft.com>
Reviewed-by: Dan Clark \<daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1608014}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 16 tests and 2 subtests

Status Summary

Firefox

OK : 1[GitHub] 16[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
FAIL: 11[GitHub] 153[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

OK : 1
PASS: 4
FAIL: 7

Safari

OK : 1
FAIL: 11

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /dom/ranges/tentative/OpaqueRange-auto-disconnect.html [wpt.fyi]
    • OpaqueRange disconnected on element removal (textarea): FAIL
    • All OpaqueRanges disconnected on element removal (textarea): FAIL
    • Element accepts new OpaqueRanges after re-insertion (textarea): FAIL
    • OpaqueRange disconnected on ancestor removal (textarea): FAIL
    • OpaqueRange disconnected on implicit removal via innerHTML (textarea): FAIL
    • No error when element removed after manual disconnect (textarea): FAIL
    • OpaqueRange disconnected when element adopted into another document (textarea): FAIL
    • OpaqueRange disconnected on element removal (input): FAIL
    • All OpaqueRanges disconnected on element removal (input): FAIL
    • Element accepts new OpaqueRanges after re-insertion (input): FAIL
    • OpaqueRange disconnected on ancestor removal (input): FAIL
    • OpaqueRange disconnected on implicit removal via innerHTML (input): FAIL
    • No error when element removed after manual disconnect (input): FAIL
    • OpaqueRange disconnected when element adopted into another document (input): FAIL
    • OpaqueRange disconnected on input type change to "color".: FAIL
    • OpaqueRange disconnected on input type change to "search".: FAIL
    • Input accepts new OpaqueRanges after type changes back to text.: FAIL
  • /dom/ranges/tentative/OpaqueRange-basic.html [wpt.fyi]
    • Tests createValueRange returns OpaqueRange that extends AbstractRange.: FAIL
    • OpaqueRange handles createValueRange correctly.: FAIL
    • OpaqueRange handles empty value correctly.: FAIL
  • /dom/ranges/tentative/OpaqueRange-disconnect.html [wpt.fyi]
    • disconnect() resets range state and geometry.: FAIL
    • disconnect() is idempotent.: FAIL
    • disconnect() stops live offset updates.: FAIL
    • disconnect() only affects the target range.: FAIL
    • Element accepts new ranges after a prior range is disconnected.: FAIL
  • /dom/ranges/tentative/OpaqueRange-geometry-basic.html [wpt.fyi]
    • Collapsed caret geometry (input): FAIL
    • Simple selection geometry (input): FAIL
    • Geometry empty after control removal (input): FAIL
    • Collapsed caret at start/middle/end (input): FAIL
    • Full selection bounding box inside element (input): FAIL
    • Backwards offsets collapse (input): FAIL
    • display:none empty geometry (input): FAIL
    • Collapsed caret geometry (textarea): FAIL
    • Simple selection geometry (textarea): FAIL
    • Geometry empty after control removal (textarea): FAIL
    • Collapsed caret at start/middle/end (textarea): FAIL
    • Full selection bounding box inside element (textarea): FAIL
    • Backwards offsets collapse (textarea): FAIL
    • display:none empty geometry (textarea): FAIL
  • /dom/ranges/tentative/OpaqueRange-geometry-complexity-and-visibility.html [wpt.fyi]
    • Bidirectional mixed text full selection geometry (input): FAIL
    • Surrogate pair width normalization invariants (input): FAIL
    • visibility:hidden caret geometry (input): FAIL
    • Bidirectional mixed text full selection geometry (textarea): FAIL
    • Surrogate pair width normalization invariants (textarea): FAIL
    • visibility:hidden caret geometry (textarea): FAIL
  • /dom/ranges/tentative/OpaqueRange-geometry-multiline-and-mutations.html [wpt.fyi]
    • Partial hard-newline selection (textarea): FAIL
    • Selection spanning blank line (textarea): FAIL
    • Soft-wrapped long single line (textarea): FAIL
    • Collapsed caret across newline parity (textarea): FAIL
    • Input live insertion/deletion adjustments: FAIL
    • Textarea interior deletion & insertion adjustments: FAIL
    • Insertion inside expands width (input): FAIL
    • Deletion collapses geometry (input): FAIL
    • Shrink/grow end offset clamping (input): FAIL
    • Tail deletion clamps end offset (input): FAIL
    • Insertion inside expands width (textarea): FAIL
    • Deletion collapses geometry (textarea): FAIL
    • Shrink/grow end offset clamping (textarea): FAIL
    • Tail deletion clamps end offset (textarea): FAIL
    • Deletion collapses selection (input explicit): FAIL
  • /dom/ranges/tentative/OpaqueRange-highlightsFromPoint.html [wpt.fyi]
    • highlightsFromPoint returns OpaqueRange highlight (input): FAIL (Chrome: FAIL, Safari: FAIL)
    • highlightsFromPoint returns empty outside control (input): FAIL (Chrome: PASS, Safari: FAIL)
    • highlightsFromPoint returns empty for disconnected OpaqueRange (input): FAIL (Chrome: PASS, Safari: FAIL)
    • highlightsFromPoint with multiple and overlapping OpaqueRanges (input): FAIL (Chrome: FAIL, Safari: FAIL)
    • highlightsFromPoint returns OpaqueRange highlight (textarea): FAIL (Chrome: FAIL, Safari: FAIL)
    • highlightsFromPoint returns empty outside control (textarea): FAIL (Chrome: PASS, Safari: FAIL)
    • highlightsFromPoint returns empty for disconnected OpaqueRange (textarea): FAIL (Chrome: PASS, Safari: FAIL)
    • highlightsFromPoint with multiple and overlapping OpaqueRanges (textarea): FAIL (Chrome: FAIL, Safari: FAIL)
    • highlightsFromPoint with mixed OpaqueRange and DOM Range in one Highlight: FAIL (Chrome: FAIL, Safari: FAIL)
    • highlightsFromPoint for textarea inside an author shadow root: FAIL (Chrome: FAIL, Safari: FAIL)
    • OpaqueRange and DOM Range in same shadow root behave consistently: FAIL (Chrome: FAIL, Safari: FAIL)
  • /dom/ranges/tentative/OpaqueRange-interactive-basic.html [wpt.fyi]
    • Insertion: at start boundary keeps start; end extends (multi-char) (input).: FAIL
    • Insertion: inside range extends end by length (input).: FAIL
    • Insertion: at end boundary leaves offsets unchanged (multi-char) (input).: FAIL
    • Equal-length replacement: single char inside range (input).: FAIL
    • Deletion: backspace before range shifts both left (input).: FAIL
    • Deletion: forward delete inside range contracts end by 1 (input).: FAIL
    • Deletion: forward delete at end boundary no effect on range (input).: FAIL
    • Deletion: backspace at control start is no-op (input).: FAIL
    • Insertion: at start boundary keeps start; end extends (multi-char) (textarea).: FAIL
    • Insertion: inside range extends end by length (textarea).: FAIL
    • Insertion: at end boundary leaves offsets unchanged (multi-char) (textarea).: FAIL
    • Equal-length replacement: single char inside range (textarea).: FAIL
    • Deletion: backspace before range shifts both left (textarea).: FAIL
    • Deletion: forward delete inside range contracts end by 1 (textarea).: FAIL
    • Deletion: forward delete at end boundary no effect on range (textarea).: FAIL
    • Deletion: backspace at control start is no-op (textarea).: FAIL
  • /dom/ranges/tentative/OpaqueRange-interactive-overlap-and-selection.html [wpt.fyi]
    • Overlap: partial overlap at start (delete selection) (input).: FAIL
    • Overlap: partial overlap at end (delete selection) (input).: FAIL
    • Selection deletion: delete selection exactly equal to range (collapse) (input).: FAIL
    • Selection deletion: delete subset inside range (contract end) (input).: FAIL
    • Boundary forward delete shifts range left (input).: FAIL
    • Overlap: partial overlap at start (delete selection) (textarea).: FAIL
    • Overlap: partial overlap at end (delete selection) (textarea).: FAIL
    • Selection deletion: delete selection exactly equal to range (collapse) (textarea).: FAIL
    • Selection deletion: delete subset inside range (contract end) (textarea).: FAIL
    • Boundary forward delete shifts range left (textarea).: FAIL
  • /dom/ranges/tentative/OpaqueRange-offset.html [wpt.fyi]
    • createValueRange with single character in textarea.: FAIL
    • createValueRange with empty control in textarea.: FAIL
    • createValueRange boundary positions in textarea.: FAIL
    • createValueRange with Unicode characters in textarea.: FAIL
    • createValueRange with single character in input.: FAIL
    • createValueRange with empty control in input.: FAIL
    • createValueRange boundary positions in input.: FAIL
    • createValueRange with Unicode characters in input.: FAIL
    • createValueRange on textarea with whitespace in light DOM.: FAIL
    • createValueRange works correctly with weirdly formed light DOM structure.: FAIL
    • createValueRange ignores malformed input child nodes.: FAIL
  • /dom/ranges/tentative/OpaqueRange-programmatic-updates.html [wpt.fyi]
    • Full replace collapses to start (shorter & longer) (input): FAIL
    • Full replace from whole-old range collapses to 0 (input): FAIL
    • Full replace (equal length) collapses to 0 (input): FAIL
    • Partial replacement adjusts end (input): FAIL
    • No-op leaves range unchanged (input): FAIL
    • Insertion before range shifts both endpoints (input): FAIL
    • Interior deletion shrinks end (input): FAIL
    • Before-range shrink shifts left (input): FAIL
    • After-range grow leaves range unchanged (input): FAIL
    • Superset replacement collapses to change start (input): FAIL
    • Insert at range.start extends end (input): FAIL
    • Insert at range.end leaves range unchanged (input): FAIL
    • Surrogate pair expansion grows end (input): FAIL
    • Chained interior edits cumulatively adjust range (input): FAIL
    • Full replace collapses to start (shorter & longer) (textarea): FAIL
    • Full replace from whole-old range collapses to 0 (textarea): FAIL
    • Full replace (equal length) collapses to 0 (textarea): FAIL
    • Partial replacement adjusts end (textarea): FAIL
    • No-op leaves range unchanged (textarea): FAIL
    • Insertion before range shifts both endpoints (textarea): FAIL
    • Interior deletion shrinks end (textarea): FAIL
    • Before-range shrink shifts left (textarea): FAIL
    • After-range grow leaves range unchanged (textarea): FAIL
    • Superset replacement collapses to change start (textarea): FAIL
    • Insert at range.start extends end (textarea): FAIL
    • Insert at range.end leaves range unchanged (textarea): FAIL
    • Surrogate pair expansion grows end (textarea): FAIL
    • Chained interior edits cumulatively adjust range (textarea): FAIL
  • /dom/ranges/tentative/OpaqueRange-range-updates.html [wpt.fyi]
    • createValueRange creates independent ranges on same element.: FAIL
    • createValueRange works on different form controls.: FAIL
    • createValueRange works with disconnected form controls.: FAIL
    • OpaqueRange collapses on full .value= replacement.: FAIL
  • /dom/ranges/tentative/OpaqueRange-supported-elements.html [wpt.fyi]
    • createValueRange should work on textarea.: FAIL
    • createValueRange should work on input[type=text].: FAIL
    • createValueRange should work on input[type=search].: FAIL
    • createValueRange should work on input[type=password].: FAIL
    • createValueRange should work on input[type=url].: FAIL
    • createValueRange should work on input[type=tel].: FAIL
  • /dom/ranges/tentative/OpaqueRange-unsupported-elements.html [wpt.fyi]
    • createValueRange throws NotSupportedError for unsupported input types.: FAIL
  • /dom/ranges/tentative/OpaqueRange-update-event-order.html [wpt.fyi]
    • Event order: OpaqueRange updates between beforeinput and input (input).: FAIL
    • Canceled beforeinput leaves OpaqueRange unchanged (input).: FAIL
    • Event order: OpaqueRange updates between beforeinput and input (textarea).: FAIL
    • Canceled beforeinput leaves OpaqueRange unchanged (textarea).: FAIL
  • /dom/ranges/tentative/OpaqueRange-validation.html [wpt.fyi]
    • createValueRange throws IndexSizeError for out-of-bounds offsets.: FAIL
    • createValueRange handles all range types correctly: forward, backwards, and out-of-bounds.: FAIL
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
You need to log in before you can comment on or make changes to this bug.