Add note to clarify overrides
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 03 Aug 2011 13:48:48 -0600
changeset 492 02c347df78f6
parent 491 9eadbd256e0e
child 493 f9470ec1b290
Add note to clarify overrides

Reported-By: Ryosuke Niwa
Report-URL: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-August/032782.html
editing.html
source.html
--- a/editing.html	Wed Aug 03 13:31:38 2011 -0600
+++ b/editing.html	Wed Aug 03 13:48:48 2011 -0600
@@ -904,6 +904,14 @@
 different, the <a href=#state-override>state override</a> and <a href=#value-override>value override</a> must
 be unset for every <a href=#command>command</a>.
 
+<p class=note>The primary purpose of state and value overrides is that if the
+user runs a command like <a href=#the-bold-command><code title="">bold</code></a>
+with a collapsed selection, then types something without moving the cursor,
+they expect it to have the given style (bold or such).  Thus the commands like
+<a href=#the-bold-command><code title="">bold</code></a> set state and value
+overrides, and <a href=#the-inserttext-command><code title="">insertText</code></a> checks for them and applies them to the
+newly-inserted text.  Other commands like <a href=#the-delete-command><code title="">delete</code></a> also interact with overrides.
+
 <p class=XXX>Figure out exactly what commands need to preserve state/value
 overrides.
 
--- a/source.html	Wed Aug 03 13:31:38 2011 -0600
+++ b/source.html	Wed Aug 03 13:48:48 2011 -0600
@@ -856,6 +856,16 @@
 different, the <span>state override</span> and <span>value override</span> must
 be unset for every <span>command</span>.
 
+<p class=note>The primary purpose of state and value overrides is that if the
+user runs a command like <a href=#the-bold-command><code title>bold</code></a>
+with a collapsed selection, then types something without moving the cursor,
+they expect it to have the given style (bold or such).  Thus the commands like
+<a href=#the-bold-command><code title>bold</code></a> set state and value
+overrides, and <a href=#the-inserttext-command><code
+title>insertText</code></a> checks for them and applies them to the
+newly-inserted text.  Other commands like <a href=#the-delete-command><code
+title>delete</code></a> also interact with overrides.
+
 <p class=XXX>Figure out exactly what commands need to preserve state/value
 overrides.