[webkit-dev] CSSGroupingRule and a bit of refactoring?
Pablo Flouret
pablof at motorola.com
Thu Dec 13 14:36:16 PST 2012
On Thu, 13 Dec 2012 14:12:06 -0800, Antti Koivisto <koivisto at iki.fi> wrote:
> We already have internal type corresponding to the new
> CSSGroupingRule, StyleRuleBlock. Technically refactoring the CSSOM like
> this would be fairly trivial.
>
> It is not clear to me what value this new type adds though. In JS you
> don't
> really care if types have a common base as long as they share similar
> looking interface. Are there some concrete use cases?
>
Not particularly, no, i just saw a lot of copypasting around
cssRules/insertRule/deleteRule/cssomwrappers. I don't feel strongly about
this, so i can leave it alone, maybe post a patch later on if have the
time, to see if it would add value.
Thanks for the input,
/pf
> antti
>
>
> On Thu, Dec 13, 2012 at 3:41 AM, Pablo Flouret <pablof at motorola.com>
> wrote:
>
>> Hello webkit folk,
>>
>> I'm working on having @supports behave like a proper CSSSupportsRule
>> [1].
>>
>> In the css3-conditional spec, CSSSupportsRule inherits from a
>> CSSGroupingRule (CSSMediaRule does as well):
>> http://dev.w3.org/csswg/css3-conditional/#the-cssgroupingrule-interface.
>>
>> I'm wondering if it's a good idea, as a first step, to do a bit of
>> refactoring and rip the stuff that's now in CSSGroupingRule from
>> CSSMediaRule (cssRules/insertRule/deleteRule), and have the supports
>> and media rules inherit from it.
>>
>> Incidentally, i see at least WebKitCSSKeyframesRule and
>> WebKitCSSRegionRule also having similar but not quite identical
>> re-implementations of these functions, but i guess whether these ones
>> should also inherit from CSSGroupingRule might be a question for the
>> standards mailing lists first (in any case, they would potentially
>> benefit from such a refactoring).
>>
>> Opinions / advice / potential problems?
>>
>> Thanks!
>>
>> [1] http://wkbug.com/104822
>>
>> --
>> pablo flouret
>> motorola | webkit / browser team
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo/webkit-dev
>>
--
pablo flouret
motorola | webkit / browser team
More information about the webkit-dev
mailing list