Unindenting text inside a blockquote can result in the text being reordered
Created attachment 298298 [details] Patch
Hopefully someone who knows something about editing will tell me why this patch is wrong (and ... then ... how to fix it correctly).
Comment on attachment 298298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298298&action=review r=me assuming two more test cases I suggested work as expected. > LayoutTests/editing/execCommand/unindent-nested-blockquote-with-inner-div.html:15 > +if (window.testRunner) > + document.body.innerText = document.getElementById("description1").innerText + "\n" + edit1.innerHTML; > + Please use LayoutTests/resources/dump-as-markup.js and dump markup before/after the outdent command. Also, please add a test case for when second is inside a div as well as when it's inside a b/i/etc...
Note it's very important for have those three test cases to be separate (can be in the same file).
Created attachment 298299 [details] Patch
It looks reasonable to me; does this look OK to you, Ryosuke? And, thanks for pointing me to dump-as-markup! I seem to have gotten very unlucky with the test I decided to copy from :)
Comment on attachment 298299 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298299&action=review > LayoutTests/editing/execCommand/unindent-nested-blockquote-with-inner-div-expected.txt:65 > +| <br> This br needs to be inside the div. Because br appears outside div, we're keeping blockquote after "second" in "after outdent".
(In reply to comment #7) > Comment on attachment 298299 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=298299&action=review > > > LayoutTests/editing/execCommand/unindent-nested-blockquote-with-inner-div-expected.txt:65 > > +| <br> > > This br needs to be inside the div. > Because br appears outside div, we're keeping blockquote after "second" in > "after outdent". Good call. Fixed, and everything still seems fine.
https://trac.webkit.org/changeset/210524