[whatwg] Descendents of source and track elements should be skipped when serializing HTML fragment (10.3)

Hi,

In HTML fragment serialization algorithm, we skip elements with empty
content model in step 2.2:
If current node is an
area<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-area-element>
, base<http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-base-element>
, basefont<http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#basefont>
, bgsound<http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#bgsound>
, br<http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-br-element>
, col<http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-col-element>
, embed<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-embed-element>
, frame<http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#frame>
, hr<http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-hr-element>
, img<http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#the-img-element>
, input<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element>
, keygen<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-keygen-element>
, link<http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-link-element>
, meta<http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#meta>
, param<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-param-element>,
or wbr<http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-wbr-element>element,
then continue on to the next child node at this point.

For consistency, I propose to skip children of source and track elements as
well.

Also, the algorithm does not seem to specify the behavior on deprecated (or
undocumented) elements such as isindex.  Can we assume that the
serialization of such elements are UA-defined?

Best,
Ryosuke Niwa
Software Engineer
rniwa at webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100907/3ef37c79/attachment-0001.htm>

Received on Tuesday, 7 September 2010 16:44:58 UTC