This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22897 - What state needs to be cloned when a Document is cloned?
Summary: What state needs to be cloned when a Document is cloned?
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-07 21:49 UTC by Erik Arvidsson
Modified: 2013-08-09 13:37 UTC (History)
4 users (show)

See Also:


Attachments

Description Erik Arvidsson 2013-08-07 21:49:14 UTC
Right now no state is copied when a Document is cloned. Should we copy any of the following?

- Base URL
- Compat mode

Anything else?
Comment 1 Anne 2013-08-08 10:29:46 UTC
Testing in Gecko shows we copy URL/baseURI/compatMode/contentType/characterSet. Not entirely clear to me how much of that is desirable. Olli?
Comment 2 Anne 2013-08-08 10:30:27 UTC
I suspect we copy XMLness too. Haven't tested.
Comment 3 Olli Pettay 2013-08-08 13:10:39 UTC
Yes, XMLness/SVGness/HTMLness.

We probably want URL if base URL is copied, and we probably want base URL to
be correct so that various urls in the clone tree are correct.

compatMode yes, since it seems to affect to innerHTML behavior and it would be
odd if the clone would have different behavior than the original
http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsContentUtils.h?rev=82d3b49ce0df&mark=1137-1137,1149-1149#1130

Not sure whether contentType or characterSet matter much.
Comment 4 Anne 2013-08-08 13:12:55 UTC
If you care about how APIs behave (e.g. for parsing links characterSet matters), they would matter.