document.queryCommandValue("FormatBlock") does not respect the editing boundary. It returns the name of block even if the block was an ancestor of the editable root or the editable root itself. Firefox doesn't this do.
Created attachment 76828 [details] fixes the bug
Comment on attachment 76828 [details] fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=76828&action=review > WebCore/editing/FormatBlockCommand.cpp:111 > if (!commonAncestor) > return 0; > > + Element* rootEditableElement = range->startContainer()->rootEditableElement(); > + if (!rootEditableElement || commonAncestor->contains(rootEditableElement)) > + return 0; > + I could combine these two if statements in practice but I was concerned that there could be a case where startContainer() is null. While we DO check this condition in valueFormatBlock, I didn't want to make the precondition of this function tighter.
Comment on attachment 76828 [details] fixes the bug Clearing flags on attachment: 76828 Committed r74603: <http://trac.webkit.org/changeset/74603>
All reviewed patches have been landed. Closing bug.