mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
Spec quote from https://drafts.csswg.org/css-contain/#containment-size : "Replaced elements must be treated as having an intrinsic width and height of 0" To achieve that, we just need to: (a) make all of these frame classes' GetPrefISize and GetMinISize methods return 0 if they're styled with contain:size. (b) make all of these frame classes' GetIntrinsicSize() and GetIntrinsicRatio() methods return 0,0. In some cases, these methods are implemented in terms of common helper methods (and sometimes member variables). For those cases, this patch adjusts the helper methods (and variables) rather than the getters themselves. Also: in one case (nsHTMLCanvasFrame), I needed to update its ComputeSize method to remove a dependency on the "real" intrinsic size & ratio. I believe the other classes' ComputeSize implementations do the right thing automatically by sharing code & data with their intrinsic-size codepaths. Differential Revision: https://phabricator.services.mozilla.com/D28159 --HG-- rename : testing/web-platform/tests/media/white.webm => testing/web-platform/tests/css/css-contain/support/white.webm extra : moz-landing-system : lando |
||
|---|---|---|
| .. | ||
| blue-100x100.png | ||
| blue50wBy25h.png | ||
| blue50wBy46h.png | ||
| pattern-gg-gr-100x100.png | ||
| swatch-blue.png | ||
| swatch-orange.png | ||
| swatch-red.png | ||
| swatch-yellow.png | ||
| white.webm | ||