W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [vendor-prefixes] The system needs to be opt-out, not opt-in

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 10 Feb 2012 10:20:42 -0500
Message-ID: <4F3535CA.8030903@mit.edu>
To: www-style@w3.org
On 2/10/12 8:36 AM, Lea Verou wrote:
> On 10/2/12 12:07, François REMY wrote:
>> * it recognizes both "-beta-property" and
>> "-vendor-property" as aliases :
>
> I was under the impression that such aliases consume extra memory (as
> they need to be present on every instance) and thus vendors are trying
> to avoid them.

I think it really depends on how they're required to behave.

If the aliases are pure parse-time aliases (as in, they just both get 
treated as "property" internally, last one set wins, etc), then 
supporting them is pretty low overhead.  You just have to have a mapping 
from alias to real property name, and there is no extra storage involved 
otherwise.  You can see the entirety of the code and data needed to add 
such aliases in Gecko at 
<http://hg.mozilla.org/mozilla-central/rev/8adb2f64c138>.  If there were 
a lot of aliases, a bit more complexity may be involved to replace the 
linear scan with a hashtable lookup, but it wouldn't be a huge deal.

If the aliases have some sort of complicated cascading behavior, then 
things get worse.  The longer the separate data needs to be kept, the 
worse it is.  The worst case, of course, would be if both aliases are 
required to be present in computed style and then the "right" one is 
picked for used style.

-Boris
Received on Friday, 10 February 2012 15:21:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT