Closed
Bug 1987086
Opened 8 months ago
Closed 5 months ago
Handle anchor scope when element does not generate a frame
Categories
(Core :: Layout: Positioned, task)
Core
Layout: Positioned
Tracking
()
RESOLVED
FIXED
147 Branch
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: jari, Assigned: jari)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
It was pointed out that there are circumstances where a frame is not generated for an element, see the demo
<!DOCTYPE html>
<style>
.abs-cb {
position: relative;
width: 100px;
height: 100px;
border: 1px solid;
}
.anchor {
anchor-name: --foo;
width: 10px;
height: 10px;
background: pink;
}
.positioned {
width: 15px;
height: 15px;
background: purple;
position: absolute;
position-anchor: --foo;
left: anchor(right);
top: anchor(bottom);
}
.scope {
anchor-scope: all;
display: contents;
}
</style>
<div class=abs-cb>
<div class=scope>
<div class=anchor></div>
</div>
<div class=positioned></div>
</div>
from the review of D262825 and its variations. When we traverse from the anchor element to its scope parent element, it has no frame when display: contents applies and detection of the anchor-scope style fails.
| Assignee | ||
Comment 1•8 months ago
|
||
Updated•8 months ago
|
Assignee: nobody → jjalkanen
Status: NEW → ASSIGNED
Updated•8 months ago
|
Attachment #9511946 -
Attachment description: Bug 1987086: Handle anchor scopes when display is contents. r=#anchor-positioning-reviewers → Bug 1987086: Handle anchor scopes when frame is missing thanks to display: contents. r=#anchor-positioning-reviewers
Updated•8 months ago
|
Attachment #9511946 -
Attachment description: Bug 1987086: Handle anchor scopes when frame is missing thanks to display: contents. r=#anchor-positioning-reviewers → Bug 1987086: Handle anchor scopes when display is contents. r=#anchor-positioning-reviewers
Updated•8 months ago
|
Attachment #9511946 -
Attachment description: Bug 1987086: Handle anchor scopes when display is contents. r=#anchor-positioning-reviewers → Bug 1987086: Handle anchor scopes when frame is missing thanks to display: contents. r=#anchor-positioning-reviewers
Comment 2•5 months ago
|
||
Rebased version of D264040, with the test moved to WPT and my comments
fixed.
Pushed by ealvarez@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/d1276e3d4198
https://hg.mozilla.org/integration/autoland/rev/7a5328a78e1d
Handle anchor scopes with display: contents. r=layout-anchor-positioning-reviewers,layout-reviewers,dshin
Comment 4•5 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
status-firefox147:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/56448 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•5 months ago
|
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in
before you can comment on or make changes to this bug.
Description
•