fullscreen img element missing backdrop
Categories
(Core :: Layout, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox147 | --- | wontfix |
| firefox148 | --- | verified |
| firefox149 | --- | verified |
People
(Reporter: eyalgruss, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
User Story
In an online gallery we use requestFullscreen on <img> to zoom the image to fullscreen. The recent change now leaks the underlaying page.
Attachments
(6 files)
|
2.06 MB,
image/png
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Bug 2006998 removed ::backdrop on "things like a full-screen<input>, but that seems unlikely"...
well this breaks e.g. fullscreen <img> by leaking the background, and imho the assumption is not reasonable at all, as one could also imagine creative use of other leaf elements as a fullscreen element.
works in chromium.
example code: https://codepen.io/eyaler/pen/pvbQjYq
mozregression:
2026-02-09T15:58:17.353000: DEBUG : Found commit message:
Bug 2006998 - Avoid creating ::backdrop pseudo-elements for leaf frames. r=layout-reviewers,firefox-style-system-reviewers,dshin
This prevents special frames from having unexpected children. This
technically avoids having ::backdrop on things like a full-screen
<input>, but that seems unlikely and consistent with
::before / ::after / ::marker.
Differential Revision: https://phabricator.services.mozilla.com/D277188
| Assignee | ||
Updated•7 days ago
|
| Assignee | ||
Comment 1•7 days ago
|
||
Gah, sorry for missing this. FWIW I did because <img> is already sort-of-special (because it already supports rendering a shadow tree).
But that actually makes it rather easy to support. Other than image boxes, I think the remaining LEAF frames that are accessible to web content miscellaneous form controls (<input> / <progress> / etc).
Curious, I get that fullscreening an image is reasonable. I reckon you'd be fine with us not supporting the "fullscreening a textfield" use case? :)
Comment 2•7 days ago
|
||
Set release status flags based on info from the regressing bug 2006998
| Assignee | ||
Updated•7 days ago
|
| Assignee | ||
Comment 3•7 days ago
|
||
I guess <iframe> should also support this at the very least.
| Assignee | ||
Updated•7 days ago
|
| Reporter | ||
Comment 4•7 days ago
|
||
thanks(In reply to Emilio Cobos Álvarez [:emilio] from comment #1)
Gah, sorry for missing this. FWIW I did because
<img>is already sort-of-special (because it already supports rendering a shadow tree).But that actually makes it rather easy to support. Other than image boxes, I think the remaining
LEAFframes that are accessible to web content miscellaneous form controls (<input>/<progress>/ etc).Curious, I get that fullscreening an image is reasonable. I reckon you'd be fine with us not supporting the "fullscreening a textfield" use case? :)
thanks emilio!
i was not yet able to figure out exactly which elements (and under which conditions) are considered "leaf frames" in this context. is there an exhaustive list?
i am testing various elements and found that also <svg> and <textarea> seem to show the issue. also, people (me) some times use form controls to do weird stuff...
| Assignee | ||
Comment 5•7 days ago
|
||
Yeah, <textarea> is expected. Currently all the ones that have LEAF in here would hit this.
| Assignee | ||
Updated•7 days ago
|
| Assignee | ||
Comment 6•7 days ago
|
||
Only add exceptions for a few elements that do rely on their frame tree
size (mostly text controls). These are fixable but separate bug at the
very least.
Add reftests for <iframe> and <img>. Also, test all HTML elements in all
writing modes to ensure that they don't trigger assertions.
The <svg> case can't be easily reftested, afaict, because fullscreen
will change the size of the reftest window and <svg> doesn't support
popover.
| Assignee | ||
Comment 7•7 days ago
|
||
| Assignee | ||
Comment 8•7 days ago
|
||
| Assignee | ||
Comment 9•7 days ago
|
||
Comment 10•6 days ago
|
||
This is the final week of beta for Fx148.
:emilio, there seems to be a few changes here. Will this be low risk for a beta uplift with little bake time?
Updated•6 days ago
|
Comment 13•6 days ago
|
||
Comment 14•6 days ago
|
||
Comment 15•6 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ae187c85229e
https://hg.mozilla.org/mozilla-central/rev/e10a1900b527
https://hg.mozilla.org/mozilla-central/rev/173a24dd87f6
| Assignee | ||
Comment 16•6 days ago
|
||
Add exceptions for a few elements that do rely on their frame tree
size (mostly text controls). These are fixable but separate bug at the
very least.
Add reftests for <iframe> and <img>. Also, test all HTML elements in all
writing modes to ensure that they don't trigger assertions.
The <svg> case can't be easily reftested, afaict, because fullscreen
will change the size of the reftest window and <svg> doesn't support
popover.
Original Revision: https://phabricator.services.mozilla.com/D282451
Updated•6 days ago
|
Comment 17•6 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Fixes regression introduced in 147.0.3
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: comment 0
- Risk associated with taking this patch: low
- Explanation of risk level: Targetted fix restoring pre-regression behavior.
- String changes made/needed: none
- Is Android affected?: yes
Comment 18•6 days ago
|
||
Comment 19•5 days ago
|
||
| bugherder | ||
Updated•5 days ago
|
Updated•5 days ago
|
Updated•5 days ago
|
Comment 20•5 days ago
|
||
| uplift | ||
Comment 21•5 days ago
|
||
I was able to reproduce the issue on Win11x64 using Firefox build 147.0.3.
Verified as fixed on Win11x64 using Firefox build 149.0a1(20260210213212). Waiting for beta fix.
Comment 24•4 days ago
|
||
Verified as fixed on Win11x64 using Firefox build 148.0b14.
| Reporter | ||
Updated•2 days ago
|
Description
•