Closed
Bug 1340715
Opened 7 years ago
Closed 2 years ago
{inc}nsSVGOuterSVGFrame::GetPrefISize depends on results of previous layout
Categories
(Core :: SVG, defect, P3)
Core
SVG
Tracking
()
RESOLVED
FIXED
106 Branch
People
(Reporter: dbaron, Assigned: TYLin)
References
(Regressed 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
Bug 1162418 made nsSVGOuterSVGFrame::GetPrefISize call GetLogicalSize on ancestors going up the frame tree. It's incorrect to do this, because it can depend on the results in a *previous* layout rather than the current one. What led me to this code was trying to explain to fantasai the Firefox behavior in: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cdiv%20style%3D%22width%3A%20500px%3B%20border%3A%20magenta%20solid%20thick%22%3E%0A%3Cdiv%20style%3D%22float%3A%20left%3B%20border%3A%20orange%20solid%20thick%3B%22%3E%0A%3Csvg%20viewbox%3D%220%200%2010%2010%22%20style%3D%22display%3A%20block%22%3E%0A%20%3Crect%20fill%3Dblue%20width%3D100%25%20height%3D100%25%20%2F%3E%0A%3C%2Fsvg%3E%0A%3C%2Fdiv%3E which is actually reasonable, and could probably be obtained by returning nscoord_MAX as the pref ISize, but I think this code is incorrect. I'll try to write a testcase showing the bad results later.
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Reporter | ||
Comment 3•7 years ago
|
||
Attachment #8838795 -
Attachment is obsolete: true
Reporter | ||
Comment 4•7 years ago
|
||
Note that this nearly led the spec authors to specify ... it's not clear what ... but it might not have been implementable: https://github.com/w3c/csswg-drafts/issues/951
Updated•7 years ago
|
Component: Layout → SVG
Updated•7 years ago
|
Priority: -- → P3
Reporter | ||
Updated•7 years ago
|
Summary: nsSVGOuterSVGFrame::GetPrefISize depends on results of previous layout → {inc}nsSVGOuterSVGFrame::GetPrefISize depends on results of previous layout
Updated•2 years ago
|
Assignee: nobody → emilio
Comment 6•2 years ago
|
||
This corrects bug 1162418 to make intrinsic size not depend on an
arbitrary container. We fall back to the default replaced object size to
avoid regressing bug 1162418.
This is unlike for images, but we've had compat reports to this regard,
and this is what Chromium does effectively, so seems somewhat
reasonable.
Assignee | ||
Comment 7•2 years ago
|
||
Updated•2 years ago
|
Attachment #9292318 -
Attachment description: WIP: Bug 1340715 - When computing replace element's max-content inline-size, use the same logic as computing auto. → Bug 1340715 - Change SVG max-content size for webcompat.
Updated•2 years ago
|
Attachment #9292251 -
Attachment is obsolete: true
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/76c1fb5130dc Change SVG max-content size for webcompat. r=emilio
Comment 10•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35755 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•2 years ago
|
Updated•2 years ago
|
QA Whiteboard: [qa-106b-p2]
Comment 17•1 year ago
|
||
Hello Ting-Yu, wonder if it's possible to uplift this patch to ESR?
(coming from https://github.com/webcompat/web-bugs/issues/114165 where a user is still facing the issue on esr)
Flags: needinfo?(aethanyc)
Comment 18•1 year ago
|
||
That doesn't sound like a good idea given the regression of bug 1801581
Assignee | ||
Comment 19•1 year ago
|
||
I agree with Robert. This bug has two regressions -- bug 1790167 and bug 1801581. I don't feel confident to uplift my patch to ESR.
Flags: needinfo?(aethanyc)
Comment 20•1 year ago
|
||
Good point, thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•