WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
108689
Web Inspector: fix "DOM Exception 8" when deleting lines containing decoration in DTE.
https://bugs.webkit.org/show_bug.cgi?id=108689
Summary
Web Inspector: fix "DOM Exception 8" when deleting lines containing decoratio...
Andrey Lushnikov
Reported
2013-02-01 14:03:31 PST
Fix "DOM Exception 8" when deleting lines containing decoration in DTE.
Attachments
Patch
(1.95 KB, patch)
2013-02-01 14:08 PST
,
Andrey Lushnikov
no flags
Details
Formatted Diff
Diff
Patch
(1.97 KB, patch)
2013-02-01 15:15 PST
,
Andrey Lushnikov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Lushnikov
Comment 1
2013-02-01 14:08:17 PST
Created
attachment 186134
[details]
Patch
Alexander Pavlov (apavlov)
Comment 2
2013-02-01 14:16:26 PST
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.
Andrey Lushnikov
Comment 3
2013-02-01 14:29:31 PST
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!
Andrey Lushnikov
Comment 4
2013-02-01 15:15:01 PST
Created
attachment 186157
[details]
Patch
Alexander Pavlov (apavlov)
Comment 5
2013-02-01 16:44:01 PST
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
WebKit Review Bot
Comment 6
2013-02-01 18:19:05 PST
Comment on
attachment 186157
[details]
Patch Clearing flags on attachment: 186157 Committed
r141673
: <
http://trac.webkit.org/changeset/141673
>
WebKit Review Bot
Comment 7
2013-02-01 18:19:09 PST
All reviewed patches have been landed. Closing bug.
Pavel Feldman
Comment 8
2013-02-02 04:11:09 PST
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();
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug