[CTW] Bounds incorrect for text within height: 0, flex aside element
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: nlapre, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ctw-m5])
Attachments
(1 file)
With the following page:
data:text/html,<html><style>.container {height: 0;width: 100%;position: fixed;bottom: 0;right: 0;display: flex;flex-direction: row-reverse;flex-wrap: nowrap;align-items: flex-end;}</style><body><aside class="container"><div>testing</div></aside></body></html>
Get the cached bounds of the text leaf accessible contained within the aside
element. The bounds are different from the visual location of the text. Using Eitan's work here makes it easy to see visually: the cached bounds sit in the bottom right of the area outside of the landmark accessible that the aside
element creates, not within the aside
area. The non-cached bounds don't have this problem.
This is a pared-down example of an issue with LinkedIn's position: fixed
aside
that contains the persistent docked messages pop-up in the bottom-right of the site.
Reporter | ||
Comment 1•2 years ago
|
||
Morgan, does this seem like it should be in the same bucket as the other position: fixed
issue you're looking at (Bug 1809836)? It seemed maybe different enough to me to make a new bug (since this issue doesn't require scrolling), but it might end up being the same thing.
Comment 2•2 years ago
|
||
Hmm, if I had to guess I'd say this is a bug in bounds, not char/text bounds -- so it's probably similar to the work i the bug you linked. since it isn't related to scrolling, though, it's probably best to leave it separate for now.
Reporter | ||
Comment 3•2 years ago
|
||
Far more pared-down example:
data:text/html,<aside style="height: 0;display: flex;align-items: flex-end;"><div>testing</div></aside>
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
I've worked out what's going on here and I have a fix. Whether it's the "correct" fix is yet to be determined.
Assignee | ||
Comment 5•2 years ago
|
||
If a container has a 0 width/height, we use the ink overflow rect.
A container can overflow beyond the top left of its main rect; e.g. with align-items: flex-end.
Previously, when calculating the parent relative bounds of children, we always calculated relative to the parent's main rect.
If we ended up using the ink overflow rect for the parent, this meant that the parent relative bounds of children were wrong.
To fix this, compensate for the ink overflow offset in this case.
Comment 7•2 years ago
|
||
bugherder |
Description
•