Re: [cssom] serializing Selectors

On Mon, 19 Oct 2009 15:03:39 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> In this case losing *| is problematic if you have one or more attributes
>> named ATTR that are in a namespace. This is different for elements of
>> course, where *| is the default, unless there is a default namespace
>> declaration.
>
> Ah, right.  You're correct that Gecko is not round-tripping this  
> correctly.  Will fix to output [*|ATTR].  See  
> https://bugzilla.mozilla.org/show_bug.cgi?id=523089

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?


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Monday, 19 October 2009 15:45:39 UTC