W3C home > Mailing lists > Public > www-style@w3.org > June 2015

Re: [css-ui] border-image with an SVG resource that has no intrinsic size

From: Dean Jackson <dino@apple.com>
Date: Sun, 14 Jun 2015 18:31:04 +1000
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <219F23A0-5170-48FE-9912-DBDC42284427@apple.com>
To: Patrick Dark <www-style.at.w3.org@patrick.dark.name>

> On 14 Jun 2015, at 9:09 am, Patrick Dark <www-style.at.w3.org@patrick.dark.name> wrote:
> 
> 
> On 5/28/2015 8:51 PM, Dean Jackson wrote:
>> I'm not sure if this is a UI spec thing, or borders, or something that's just fallen through the cracks. WebKit recently landed a change to make border-image with an SVG resource, that has no intrinsic size, behave like Firefox.
>> 
>> https://bugs.webkit.org/show_bug.cgi?id=139405 <https://bugs.webkit.org/show_bug.cgi?id=139405>
>> 
>> Example/Test is here: http://trac.webkit.org/export/184972/trunk/LayoutTests/fast/borders/border-image-fill-no-intrinsic-size.html <http://trac.webkit.org/export/184972/trunk/LayoutTests/fast/borders/border-image-fill-no-intrinsic-size.html>
>> 
>> Chrome had the same behaviour as WebKit did, before the change. I haven't tested on IE/Edge (sorry... I really need to set up a login).
>> 
>> It's not completely clear what the best thing to do in this case is, but we think the Firefox behaviour was better. Is this specified anywhere? We'd really like to encourage people to not put an intrinsic size in their SVG.
>> 
> 
> Your test document is missing tests with intrinsic dimensions specified via the SVG element's |viewBox| attribute: |viewBox="0,0 100,100"|.

The viewBox cannot imply any intrinsic dimensions. If it did, an SVG map that was using mm for units and displaying the entire world with an appropriate viewBox would be stupidly big.

It *might* be able to imply intrinsic aspect ratio.

Dean


> 
> In equivalent |viewBox|-based tests, Chrome 43 and Firefox 38 both seem to get the rendering wrong as I'd expect |viewBox="0,0 100,100"| to result in the same rendering as |width="100" height="100"|. Instead, |viewBox|-based tests render like your no-intrinsic-size tests in both browsers.
> 
> As for those no-intrinsic-size tests, I'd expect the same rendering as |width="100" height="100"| and a corrected rendering of |viewBox="0,0 100,100"|. Specifically, the browser should establish intrinsic dimensions using both the origin (0,0) and the painted area with positive coordinates (0,0 to 100,100).


Received on Sunday, 14 June 2015 08:31:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC