gecko-dev/testing/web-platform/tests/css/css-contain/support
Daniel Holbert 842b893fe3 Bug 1544121: Make size-contained replaced elements behave as if they had 0x0 intrinsic size and ratio. r=TYLin
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
2019-04-26 00:18:32 +00:00
..
blue-100x100.png
blue50wBy25h.png Bug 1490556 [wpt PR 12960] - [css-contain] Fix contain-size-025 using "dislay: block" on images, a=testonly 2018-09-13 02:59:37 +00:00
blue50wBy46h.png
pattern-gg-gr-100x100.png
swatch-blue.png
swatch-orange.png
swatch-red.png
swatch-yellow.png
white.webm Bug 1544121: Make size-contained replaced elements behave as if they had 0x0 intrinsic size and ratio. r=TYLin 2019-04-26 00:18:32 +00:00