Re: Selectors, vendor prefixes (again...) and IE9

On 5/18/10 12:03 PM, François REMY wrote:
> I was under the impression some implementors were
> complaining because they would need to create a lot
> of "pseudo elements" (in the DOM?) when the user press
> CTRL+A. If ::selection is simply a syntactic concept, I don't
> understand why they have said that.

Dunno.  In Gecko's implementation the only thing that would be "created" 
in this situation is the computed style data structure; this would 
admittedly be different for different parts of the DOM tree, so a good 
bit of memory would be used for all those computed styles.  But in the 
current formulation that's needed, since all those different parts of 
the selection can inherit different text colors.

I can't speak to webkit's exact situation here.

> David L. Baron, in its discussion about ::selection problems
> also spoke about "nesting" ::selection pseudo elements, and
> (maybe someone else) went in the following discussion
> about a similarity between ::first-line and ::selection, in the
> sense both of them are "encapsulating" some text, like a
> <span> in a <div>.

That's a conceptual device to figure out how inheritance works.

> These two remarks conduced me to think a pseudo element
> should have an "existence" in the DOM. But maybe I mis-
> understood what those poeple were exactly speaking about.

I think so...

-Boris

Received on Tuesday, 18 May 2010 16:34:58 UTC