WebKit fails to execute document.execCommand("insertHTML", false, '<h6>hello world</h6>'); properly (loses h6) if the selection at the time is before some text. Reduction: http://jsbin.com/isibud/3/ (Click "Insert h6"). I suspect this is a bug in markup.cpp. The list of elements there is missing h6 for some reason.
http://crbug.com/117966
The issue is the isHeaderElement() in ReplaceSelectionCommand doesn't include h6Tag. Will provide a patch with tests soon.
Created attachment 135874 [details] First try
Comment on attachment 135874 [details] First try The fix looks correct and neat. Did you run the entire layout tests?
Comment on attachment 135874 [details] First try View in context: https://bugs.webkit.org/attachment.cgi?id=135874&action=review > LayoutTests/editing/execCommand/4128080-1.html:15 > + if (actual == expected) > + return "Success\n"; Can we output something for Success case as well so that it'll be easier to understand the output?
Thanks for reviewing. I will update the test case and commit the patch then.
Committed r114131: <http://trac.webkit.org/changeset/114131>