Repro: Select hoge and press Indent. <div id="container"></div> <button onclick="document.execCommand("Indent")" value="Indent"> <script> var container = document.getElementById('container'); var shadowRoot = new WebKitShadowRoot(container); shadowRoot.innerHTML = "<span contenteditable>hoge</span>"; </script>
Created attachment 141660 [details] Patch
Comment on attachment 141660 [details] Patch Attachment 141660 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/12680398
Comment on attachment 141660 [details] Patch Attachment 141660 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/12679436
Created attachment 141665 [details] Patch
Try to fix build...
Comment on attachment 141665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141665&action=review Looks sane to me. > LayoutTests/editing/shadow/execcommand-indent-in-shadow.html:1 > + <!DOCTYPE html> Why do we have a space before <!DOCTYPE?
Comment on attachment 141665 [details] Patch I’d rather see the type be ContainerNode rather than Node in a case like this.
(In reply to comment #7) > (From update of attachment 141665 [details]) > I’d rather see the type be ContainerNode rather than Node in a case like this. That's a good point. Please address Darin's comment before you land it.
(In reply to comment #8) > (In reply to comment #7) > > (From update of attachment 141665 [details] [details]) > > I’d rather see the type be ContainerNode rather than Node in a case like this. > > That's a good point. Please address Darin's comment before you land it. Thank you for reviewing! Yeah, I'll fix them to land it.
Created attachment 141878 [details] Patch for landing
Committed r117041: <http://trac.webkit.org/changeset/117041>