W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Re: [cssom] serializing Selectors

From: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Date: Tue, 20 Oct 2009 18:02:36 +0400 (MSD)
To: Anne van Kesteren <annevk@opera.com>
cc: CSS WG <www-style@w3.org>
Message-ID: <Pine.LNX.4.63.0910201715290.14120@master.abisoft.spb.ru>
On Mon, 19 Oct 2009, Anne van Kesteren wrote:

> Another thing I was wondering about was what to do about @namespace rules 
> that are removed and added dynamically. Changing/adding them would 
> essentially require parsing the style sheet again which seems suboptimal.
>
> I thought of various ways to solve this all assuming we want to keep that 
> @namespace rules are a parse-time construct only (and therefore a namespace 
> map is created during parsing):
>
> 1) Any changes to @namespace rules (removal, adding, etc.) does not affect 
> the namespace map.
> 2) We remove @namespace rules (and the CSSNamespaceRule interface/object) 
> from the rules collection and expose a readonly namespace map on the 
> CSSStyleSheet object in some fashion.
> 3) We remove the ability for @namespace rules to be either added, removed, or 
> changed by either 3a) throwing or 3b) ignoring such operations.
>
> Any thoughts?

neither:
ability to aceess @namespace rules essential if stylesheet
constructed using cssom api.
removing them from rules collection making cssom inconsistent/inadequate.
the same if changes not affect namespace map (subsequent rule insertion
broken).

too high price for 'perfect serialization'. i prefer non-serializable 
impl:
- changes in @namespace rules mirrored to namespace map in sheet's
   context immediately;
- such map used only during parse;
- any subsequent parser invocation use current state of map.

>
>
>
Received on Tuesday, 20 October 2009 14:03:14 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:40 UTC