Make more block commands preserve overrides
authorAryeh Gregor <ayg@aryeh.name>
Thu, 17 May 2012 05:23:14 -0600
changeset 729 c1369e156007
parent 728 cfe7e4a592e8
child 730 727e691b1779
Make more block commands preserve overrides
conformancetest/data.js
editing.html
implementation.js
source.html
--- a/conformancetest/data.js	Thu May 17 05:03:55 2012 -0600
+++ b/conformancetest/data.js	Thu May 17 05:23:14 2012 -0600
@@ -27698,32 +27698,32 @@
 	[["bold",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"bold":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"bold":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"bold":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><b>a[]</b>bar",
+	[true,true,true],
+	{"bold":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"bold":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"bold":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"bold":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<b>a[]</b>bar",
+	[true,true,true],
+	{"bold":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"bold":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"bold":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"bold":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><b>a[]</b>bar",
+	[true,true,true],
+	{"bold":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["bold",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -27863,32 +27863,32 @@
 	[["italic",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"italic":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"italic":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"italic":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><i>a[]</i>bar",
+	[true,true,true],
+	{"italic":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"italic":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"italic":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"italic":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<i>a[]</i>bar",
+	[true,true,true],
+	{"italic":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"italic":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"italic":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"italic":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><i>a[]</i>bar",
+	[true,true,true],
+	{"italic":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["italic",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28028,32 +28028,32 @@
 	[["strikethrough",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"strikethrough":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"strikethrough":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"strikethrough":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><s>a[]</s>bar",
+	[true,true,true],
+	{"strikethrough":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"strikethrough":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"strikethrough":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"strikethrough":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<s>a[]</s>bar",
+	[true,true,true],
+	{"strikethrough":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"strikethrough":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"strikethrough":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"strikethrough":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><s>a[]</s>bar",
+	[true,true,true],
+	{"strikethrough":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["strikethrough",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28193,32 +28193,32 @@
 	[["subscript",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"subscript":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"subscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"subscript":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><sub>a[]</sub>bar",
+	[true,true,true],
+	{"subscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"subscript":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"subscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"subscript":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<sub>a[]</sub>bar",
+	[true,true,true],
+	{"subscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"subscript":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"subscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"subscript":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><sub>a[]</sub>bar",
+	[true,true,true],
+	{"subscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["subscript",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28358,32 +28358,32 @@
 	[["superscript",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"superscript":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"superscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"superscript":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><sup>a[]</sup>bar",
+	[true,true,true],
+	{"superscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"superscript":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"superscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"superscript":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<sup>a[]</sup>bar",
+	[true,true,true],
+	{"superscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"superscript":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"superscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"superscript":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><sup>a[]</sup>bar",
+	[true,true,true],
+	{"superscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["superscript",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28523,32 +28523,32 @@
 	[["underline",""],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"underline":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"underline":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"underline":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><u>a[]</u>bar",
+	[true,true,true],
+	{"underline":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"underline":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+	{"underline":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"underline":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<u>a[]</u>bar",
+	[true,true,true],
+	{"underline":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"underline":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+	{"underline":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"underline":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><u>a[]</u>bar",
+	[true,true,true],
+	{"underline":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["underline",""],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28688,32 +28688,32 @@
 	[["backcolor","#00FFFF"],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthtml":[false,false,"",false,false,""]}],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"insertimage":[false,false,"",false,false,""]}],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["backcolor","#00FFFF"],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -28856,7 +28856,7 @@
 	{"createlink":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["createlink","http://www.google.com/"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
+	"foo<hr><a href=\"http://www.google.com/\">a[]</a>bar",
 	[true,true,true],
 	{"createlink":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
@@ -28866,7 +28866,7 @@
 	{"createlink":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["createlink","http://www.google.com/"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
+	"fooab<b>c</b>d<a href=\"http://www.google.com/\">a[]</a>bar",
 	[true,true,true],
 	{"createlink":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
@@ -28876,7 +28876,7 @@
 	{"createlink":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["createlink","http://www.google.com/"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
+	"foo<img src=\"/img/lion.svg\"><a href=\"http://www.google.com/\">a[]</a>bar",
 	[true,true,true],
 	{"createlink":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
@@ -29018,32 +29018,32 @@
 	[["fontname","sans-serif"],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><font face=\"sans-serif\">a[]</font>bar",
+	[true,true,true],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"inserthtml":[false,false,"",false,false,""]}],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<font face=\"sans-serif\">a[]</font>bar",
+	[true,true,true],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"insertimage":[false,false,"",false,false,""]}],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"fontname":[false,false,"serif",false,false,"serif"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><font face=\"sans-serif\">a[]</font>bar",
+	[true,true,true],
+	{"fontname":[false,false,"serif",false,false,"sans-serif"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontname","sans-serif"],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -29183,32 +29183,32 @@
 	[["fontsize","4"],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"fontsize":[false,false,"3",false,false,"4"],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><font size=\"4\">a[]</font>bar",
+	[true,true,true],
+	{"fontsize":[false,false,"3",false,false,"4"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"inserthtml":[false,false,"",false,false,""]}],
+	{"fontsize":[false,false,"3",false,false,"4"],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<font size=\"4\">a[]</font>bar",
+	[true,true,true],
+	{"fontsize":[false,false,"3",false,false,"4"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"insertimage":[false,false,"",false,false,""]}],
+	{"fontsize":[false,false,"3",false,false,"4"],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"fontsize":[false,false,"3",false,false,"3"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><font size=\"4\">a[]</font>bar",
+	[true,true,true],
+	{"fontsize":[false,false,"3",false,false,"4"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["fontsize","4"],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -29348,32 +29348,32 @@
 	[["forecolor","#0000FF"],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><font color=\"#0000ff\">a[]</font>bar",
+	[true,true,true],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"inserthtml":[false,false,"",false,false,""]}],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<font color=\"#0000ff\">a[]</font>bar",
+	[true,true,true],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"insertimage":[false,false,"",false,false,""]}],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><font color=\"#0000ff\">a[]</font>bar",
+	[true,true,true],
+	{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["forecolor","#0000FF"],["insertlinebreak",""]],
 	"foo<br>{}bar",
@@ -29513,32 +29513,32 @@
 	[["hilitecolor","#00FFFF"],["inserthorizontalrule",""]],
 	"foo<hr>{}bar",
 	[true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["inserthorizontalrule",""],["inserttext","a"]],
-	"foo<hr>a[]bar",
-	[true,true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<hr><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["inserthtml","ab<b>c</b>d"]],
 	"fooab<b>c</b>d{}bar",
 	[true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthtml":[false,false,"",false,false,""]}],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
-	"fooab<b>c</b>da[]bar",
-	[true,true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"fooab<b>c</b>d<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["insertimage","/img/lion.svg"]],
 	"foo<img src=\"/img/lion.svg\">{}bar",
 	[true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"insertimage":[false,false,"",false,false,""]}],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
-	"foo<img src=\"/img/lion.svg\">a[]bar",
-	[true,true,true],
-	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+	"foo<img src=\"/img/lion.svg\"><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+	[true,true,true],
+	{"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["hilitecolor","#00FFFF"],["insertlinebreak",""]],
 	"foo<br>{}bar",
--- a/editing.html	Thu May 17 05:03:55 2012 -0600
+++ b/editing.html	Thu May 17 05:23:14 2012 -0600
@@ -4752,6 +4752,9 @@
 range</a> is <code class=external data-anolis-spec=dom title=dom-Range-collapsed><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-range-collapsed>collapsed</a></code>, it must <a href=#restore-states-and-values>restore states and
 values</a> from the recorded list.
 
+<p class=note>All block commands preserve overrides except <a href=#the-inserttext-command>the
+<code title="">insertText</code> command</a>, which treats overrides specially.
+
 
 <h3 id=assorted-block-formatting-command-algorithms>Assorted block formatting command algorithms</h3>
 
@@ -8879,6 +8882,8 @@
 
 <h3 id=the-inserthorizontalrule-command><dfn>The <code title="">insertHorizontalRule</code> command</dfn></h3>
 
+<p><a href=#preserves-overrides>Preserves overrides</a>
+
 <p class=comments>You'd think interop here would be simple, right?  Nope: we
 have three different behaviors across four browsers.  Opera 11.00 is the only
 one that acts more or less like the spec.  IE9 and Chrome 12 dev treat the
@@ -8955,6 +8960,8 @@
 
 <h3 id=the-inserthtml-command><dfn>The <code title="">insertHTML</code> command</dfn></h3>
 
+<p><a href=#preserves-overrides>Preserves overrides</a>
+
 <div class=comments>
 <p>Not supported by IE9.  Handling of disallowed children is interesting:
 
@@ -9093,6 +9100,8 @@
 
 <h3 id=the-insertimage-command><dfn>The <code title="">insertImage</code> command</dfn></h3>
 
+<p><a href=#preserves-overrides>Preserves overrides</a>
+
 <p><a href=#action>Action</a>:
 
 <ol>
--- a/implementation.js	Thu May 17 05:03:55 2012 -0600
+++ b/implementation.js	Thu May 17 05:23:14 2012 -0600
@@ -7080,6 +7080,7 @@
 ///// The insertHorizontalRule command /////
 //@{
 commands.inserthorizontalrule = {
+	preservesOverrides: true,
 	action: function() {
 		// "Let start node, start offset, end node, and end offset be the
 		// active range's start and end nodes and offsets."
@@ -7176,6 +7177,7 @@
 ///// The insertHTML command /////
 //@{
 commands.inserthtml = {
+	preservesOverrides: true,
 	action: function(value) {
 		// "Delete the selection."
 		deleteSelection();
@@ -7247,6 +7249,7 @@
 ///// The insertImage command /////
 //@{
 commands.insertimage = {
+	preservesOverrides: true,
 	action: function(value) {
 		// "If value is the empty string, abort these steps and do nothing."
 		if (value === "") {
--- a/source.html	Thu May 17 05:03:55 2012 -0600
+++ b/source.html	Thu May 17 05:23:14 2012 -0600
@@ -4804,6 +4804,9 @@
 range</span> is [[rangecollapsed]], it must <span>restore states and
 values</span> from the recorded list.
 
+<p class=note>All block commands preserve overrides except <span>the
+<code title>insertText</code> command</span>, which treats overrides specially.
+
 <!-- @} -->
 <h3>Assorted block formatting command algorithms</h3>
 <!-- @{ -->
@@ -8978,6 +8981,8 @@
 <!-- @} -->
 <h3><dfn>The <code title>insertHorizontalRule</code> command</dfn></h3>
 <!-- @{ -->
+<p><span>Preserves overrides</span>
+
 <p class=comments>You'd think interop here would be simple, right?  Nope: we
 have three different behaviors across four browsers.  Opera 11.00 is the only
 one that acts more or less like the spec.  IE9 and Chrome 12 dev treat the
@@ -9054,6 +9059,8 @@
 <!-- @} -->
 <h3><dfn>The <code title>insertHTML</code> command</dfn></h3>
 <!-- @{ -->
+<p><span>Preserves overrides</span>
+
 <div class=comments>
 <p>Not supported by IE9.  Handling of disallowed children is interesting:
 
@@ -9194,6 +9201,8 @@
 <!-- @} -->
 <h3><dfn>The <code title>insertImage</code> command</dfn></h3>
 <!-- @{ -->
+<p><span>Preserves overrides</span>
+
 <p><span>Action</span>:
 
 <ol>