[Webkit-unassigned] [Bug 105480] Implement element type selectors for the WebVTT ::cue pseudo class

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 14 12:36:38 PST 2013


--- Comment #28 from Antti Koivisto <koivisto at iki.fi>  2013-01-14 12:38:25 PST ---
(In reply to comment #21)
> Antti, it looks like HTMLElementFactory is not used when HTMLElement::create is called. This means that the old code in the parser didn't create elements of the right type, or at least relied on the cloning which uses HTMLElementFactory::createHTMLElement and that actually calls the right constructor. What's better — to add vTag manually to the HTMLElementFactory function table so it would create the right element when cloning, or remove this call to the core cloning code and do it with my custom cloning function and just call the right constructor for this element?

The internal node tree does not really need to be HTMLElements as it doesn't need HTML semantics. That some WebVTT tags have the same names as HTML tags is good for remembering them but does not make them HTML tags. Rendering and selector matching code works fine with generic Elements and it would probably be clearer to create internal nodes with Element::create(). It doesn't make much practical difference though.

On the other hand it is important that the tree exposed by getCueAsHTML() is correctly constructed from HTML elements.

As I mentioned above, as long as the rendering tree and the node tree are identical you can avoid the whole cloning question by just having one tree.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list