Fix "DOM Exception 8" when deleting lines containing decoration in DTE.
Created attachment 186134 [details] Patch
Comment on attachment 186134 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186134&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2931 > + if (this.element.contains(this.element.decorationsElement)) We usually use the parentElement check, something like if (this.element.decorationsElement.parentElement) this.element.decorationsElement.parentElement.removeChild(this.element.decorationsElement); The node.contains() method is potentially slower, since it will check all the element's descendants, not only immediate children.
Comment on attachment 186134 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186134&action=review >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2931 >> + if (this.element.contains(this.element.decorationsElement)) > > We usually use the parentElement check, something like > > if (this.element.decorationsElement.parentElement) > this.element.decorationsElement.parentElement.removeChild(this.element.decorationsElement); > > The node.contains() method is potentially slower, since it will check all the element's descendants, not only immediate children. That is reasonable!
Created attachment 186157 [details] Patch
Comment on attachment 186157 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186157&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2931 > + if (this.element.decorationsElement.parentElement) I DO hope the parentElement is guaranteed to be this.element
Comment on attachment 186157 [details] Patch Clearing flags on attachment: 186157 Committed r141673: <http://trac.webkit.org/changeset/141673>
All reviewed patches have been landed. Closing bug.
Comment on attachment 186157 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186157&action=review >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2931 >> + if (this.element.decorationsElement.parentElement) > > I DO hope the parentElement is guaranteed to be this.element Should have been this.element.decorationElement.removeSelf();