Open Bug 1822694 Opened 2 years ago Updated 10 months ago

WPT css-contain/content-visibility/content-visibility-048.html fails in Firefox

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 2 open bugs)

Details

Test results:
https://wpt.fyi/results/css/css-contain/content-visibility/content-visibility-048.html

If I'm reading the test correctly, it looks like it's testing that e.g. navigating to foo.html#target can properly scroll to #target (i.e. <div id="target">) even if that element happens to be inside of an element that skips its contents.

(In reply to Daniel Holbert [:dholbert] from comment #0)

If I'm reading the test correctly, it looks like it's testing that e.g. navigating to foo.html#target can properly scroll to #target (i.e. <div id="target">) even if that element happens to be inside of an element that skips its contents.

There's more to the failure, though, because things do seem to work when I try to do that^ directly -- e.g. if I load these URLs (with content-visibility enabled)...
http://wpt.live/css/css-contain/content-visibility/resources/text-fragment-target-auto.html#text
http://wpt.live/css/css-contain/content-visibility/resources/text-fragment-target-auto.html#text2

...then I do end up seeing the referenced element, scrolled partway down the page. So there's some additional subtlety to the failure here.

No longer depends on: css-content-visibility

It looks like the cases is using a fragment directive [1]: '#:~:text=hiddentext', which is not supported in Gecko yet.[2]
Maybe this wpt test should not block content-visibility?

[1] https://wicg.github.io/scroll-to-text-fragment/#the-fragment-directive
[2] https://caniuse.com/url-scroll-to-text-fragment

You need to log in before you can comment on or make changes to this bug.