Steps to reproduce: 1) Create a contentEditable field with some text, and no display: block elements. 2) In javascript, call document.execCommand("justifyRight", false) Expected Result: A block-level element should be created around the text with style='text-align: right'. IE creates a <p> element. Actual Result: The contentEditable element has style='text-align: right.' Notes: As a general principle, execCommand should *never* modify the attributes of a node with contentEditable on. There are all sorts of reasons why this is bad: it may change the layout of the field itself, it makes it more difficult to get the contents of the field, etc. See the demo at the URL.
This shouldn't be too hard to fix, ApplyStyleCommand::moveParagraphContentsToNewBlockIfNecessary just needs to know about this situation.
I'm testing a fix...
Created attachment 27624 [details] patch
Comment on attachment 27624 [details] patch looks great! r=me.
http://trac.webkit.org/changeset/41026