Re: [cssom] serializing Selectors

On 10/19/09 7:47 AM, Anne van Kesteren wrote:
> [*|ATTR]
>
> ends up as
>
> [attr] in Firefox and Opera and
> [*|attr] in WebKit
>
> for a text/html resource. Neither seems ideal.

For what it's worth, in trunk Firefox it ends up as [ATTR] if nothing 
else is going on, and this is independent of the kind of resource.  I 
believe the HTML5 requirements on selector matching (and in particular 
the requirement that the SVG and MathML be matched case-sensitively) 
implies that round-tripping case should not be a huge burden on 
implementations.  Certainly that's why we started doing it.

As for the fact that the "*|" disappears, Gecko in general doesn't 
serialize the "ns|" part of selectors in cases where the namespace is 
the stylesheet's default namespace.  This could be changed if really 
needed but that doesn't seem to be worth the extra bookkeeping to me. 
Are there particular problems with this approach, as long as people 
don't move the selectors between stylesheets with different default 
namespaces?  And if they do that, they'd lose anyway with unprefixed 
selectors, right?

-Boris

Received on Monday, 19 October 2009 12:45:32 UTC