W3C home > Mailing lists > Public > public-css-testsuite@w3.org > December 2010

Re: background-intrinsic-004

From: Simon Fraser <smfr@me.com>
Date: Wed, 01 Dec 2010 14:37:46 -0800
Cc: Řyvind Stenhaug <oyvinds@opera.com>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-id: <EBA0F3F4-E138-45E1-9E0A-7EE1B3DC28A9@me.com>
To: fantasai <fantasai.lists@inkedblade.net>
On Nov 30, 2010, at 5:14 PM, fantasai wrote:

> On 11/24/2010 07:34 AM, Řyvind Stenhaug wrote:
>> http://test.csswg.org/source/contributors/fantasai/submitted/css2.1/backgrounds/background-intrinsic-004.htm
>> (RC version is older and broken in various other ways)
>> This seems to have mixed up 'width' and 'height' for the .control elements' dimensions.
> Fixed.

I'm confused by this test (which WebKit fails).

The test assertion is "A background image with only an intrinsic ratio covers largest rectangle at that ratio that exceeds neither the height nor width of the background positioning area."

I take this to refer to this sentence under <http://www.w3.org/TR/CSS21/colors.html#background-properties>:

"If the image has no intrinsic dimensions and has an intrinsic ratio the dimensions must be assumed to be the largest dimensions at that ratio such that neither dimension exceeds the dimensions of the rectangle that establishes the coordinate system for the 'background-position'property."

I read that as the background-image being scaled-to-fit, maintaining aspect ratio, into the background-positioning area. And I think <http://www.w3.org/TR/CSS21/colors.html#propdef-background-position> is telling me that the background-positioning area is the padding box.

So the first ".test" has a padding box of 80x100px. green-intrinsic-ratio-portrait.svg has an intrinsic ratio of 4/6. So the SVG will be scaled up with a factor of 16.666667, giving a width of 66.666667. Hence there's a gap down each side, and the red shows through.

Is my analysis flawed, or is the test invalid?

Received on Wednesday, 1 December 2010 22:38:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:22 UTC