Clarify when CSS styling flag, etc. are cleared
authorAryeh Gregor <ayg@aryeh.name>
Mon, 05 Mar 2012 10:45:01 -0700
changeset 711 3859b3153f0c
parent 710 52c84909f3b3
child 712 cbe370176b36
Clarify when CSS styling flag, etc. are cleared

Fixes: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16207
Reported-By: Ryosuke Niwa
editing.html
source.html
--- a/editing.html	Mon Mar 05 10:38:38 2012 -0700
+++ b/editing.html	Mon Mar 05 10:45:01 2012 -0700
@@ -2010,6 +2010,21 @@
 <p class=XXX>Figure out exactly what commands need to preserve state/value
 overrides.
 
+<p class=comments>See
+<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16207">bug 16207</a>.
+
+<p>When
+<code class=external data-anolis-spec=html title=dom-Document-open><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#dom-document-open>document.open()</a></code> is
+called and a <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-document title=concept-document>document</a>'s singleton objects are all replaced by new instances
+of those objects, editing state associated with that document (including the
+<a href=#css-styling-flag>CSS styling flag</a>, <a href=#default-single-line-container-name>default single-line container name</a>,
+and any <a href=#state-override title="state override">state overrides</a> or
+<a href=#value-override title="value override">value overrides</a>) must be reset.
+
+<p class=note>Of course, any action that replaces a <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-document title=concept-document>document</a> object
+entirely, such as reloading the page, will also reset any editing state
+associated with the document.
+
 <p>When this specification refers to a method or attribute that is defined in a
 specification, the user agent must treat the method or attribute as defined by
 that specification.  In particular, if a script has overridden a standard
--- a/source.html	Mon Mar 05 10:38:38 2012 -0700
+++ b/source.html	Mon Mar 05 10:45:01 2012 -0700
@@ -1996,6 +1996,21 @@
 <p class=XXX>Figure out exactly what commands need to preserve state/value
 overrides.
 
+<p class=comments>See
+<a href=https://www.w3.org/Bugs/Public/show_bug.cgi?id=16207>bug 16207</a>.
+
+<p>When
+<code data-anolis-spec=html title=dom-Document-open>document.open()</code> is
+called and a [[document]]'s singleton objects are all replaced by new instances
+of those objects, editing state associated with that document (including the
+<span>CSS styling flag</span>, <span>default single-line container name</span>,
+and any <span title="state override">state overrides</span> or
+<span title="value override">value overrides</span>) must be reset.
+
+<p class=note>Of course, any action that replaces a [[document]] object
+entirely, such as reloading the page, will also reset any editing state
+associated with the document.
+
 <p>When this specification refers to a method or attribute that is defined in a
 specification, the user agent must treat the method or attribute as defined by
 that specification.  In particular, if a script has overridden a standard