Closed Bug 1908118 Opened 1 year ago Closed 1 year ago

Text-Fragments: Test for search-invisible content inside of text directive parameters

Categories

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

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: jjaschke, Assigned: jjaschke)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The tests in find-range-from-text-directive.html only test for search-invisible content between text directive parameters (e.g. between prefix- and start). But, according to the spec (step 1.6.2), search-invisible content is also allowed inside of a parameter and should be ignored / stepped over.

Google Search creates links which contain text fragments where a parameter "contains" search-invisible content, in this case an image after Settings:
https://support.apple.com/en-gb/guide/iphone/iphea1c2fe48/ios#:~:text=Go%20to%20Settings%20%3E%20General%20%3E%20Transfer,of%20your%20content%20is%20removed

(This link currently only works on Firefox with dom.text_fragments.enabled=true, both Safari and Chrome don't find the text directive)

Therefore, it would make sense to add additional test cases in the mentioned web-platform test file to ensure that search-invisible content is treated correctly.

Existing tests only cover search-invisible content in between text directive tokens (eg. between prefix- and start),
but not inside of a text directive parameter.
Since this is a use case that happens rather frequently (e.g. an image inside a text node), there should be tests for this.

Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/56d722e540c7 Text Fragments: Add tests for search-invisible content inside a text directive parameter. r=peterv,dom-core
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47261 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: