WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145363
Web Inspector: Uncaught exception when using Inspect tool on SVG elements
https://bugs.webkit.org/show_bug.cgi?id=145363
Summary
Web Inspector: Uncaught exception when using Inspect tool on SVG elements
Brian Burg
Reported
2015-05-24 16:34:07 PDT
Steps to repro: 1. Go to the URL. 2. Inspect any SVG element with the "Inspect" picker. The numbered circles are an easy target. At this point, the 1st level inspector debugger pauses, with message: Exception with thrown value: TypeError: node.className.trim is not a function. (In 'node.className.trim()', 'node.className.trim' is undefined) It seems that InjectedScript.prototype._nodeDescription is blowing up because SVG*Element.className will return an SVGAnimatedString instead of a DOMString.
Attachments
Patch
(2.10 KB, patch)
2015-05-24 16:45 PDT
,
Brian Burg
joepeck
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-05-24 16:34:27 PDT
<
rdar://problem/21092210
>
Brian Burg
Comment 2
2015-05-24 16:45:31 PDT
Created
attachment 253670
[details]
Patch
Joseph Pecoraro
Comment 3
2015-05-24 18:41:42 PDT
Comment on
attachment 253670
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=253670&action=review
r=me. Good find!
> Source/JavaScriptCore/inspector/InjectedScriptSource.js:768 > + if (node.hasAttribute("class")) > + // Using .getAttribute() is a workaround for SVG*Element.className returning SVGAnimatedString, > + // which doesn't have any useful String methods. See <
https://webkit.org/b/145363
/>. > + description += "." + node.getAttribute("class").trim().replace(/\s+/g, ".");
Style: This block need braces now.
Brian Burg
Comment 4
2015-05-24 19:38:38 PDT
Committed
r184847
: <
http://trac.webkit.org/changeset/184847
>
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