Bug 15348 - DOM Inspector hits exception when inspecting SVG
Summary: DOM Inspector hits exception when inspecting SVG
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.croczilla.com/svg/samples/...
Keywords: HasReduction
Depends on: 15422
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-02 15:38 PDT by Eric Seidel (no email)
Modified: 2007-10-26 00:05 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-10-02 15:38:20 PDT
DOM Inspector hits exception when inspecting SVG

(event handler):Null value

1.  Inspect the path element (click on the orange or black part of the butterfly.
2.  click on the "svg" "tab" at the bottom of the source display (5-sided figure, square with attached triangle)
3.  click on the "path" "tab" at the bottom of the source dispaly:
4.  you'll see this exception:

(event handler):Null value

I assume this is actually a bug in the JS bindings for SVGElement and not a bug in the inspector, but it could be either...
Comment 1 Eric Seidel (no email) 2007-10-02 15:46:34 PDT
I cant seem to get Drosera to stop at the event handler null value.  However, when I run Drosera I seem to get these additional logs in my console:

Unsafe JavaScript attempt to access frame with URL http://www.croczilla.com/svg/samples/butterfly/butterfly.svg from frame with URL file:///Stuff/Users/eric/Projects/build/Debug/WebCore.framework/Resources/inspector/inspector.html. Domains must match.

It seems strange to me that those only started after I launched Drosera, but perhaps I just missed them before.
Comment 2 Eric Seidel (no email) 2007-10-08 00:24:34 PDT
Turns out that the line having trouble was:

if (!priorityUsed && style.getPropertyPriority(name).length)

style.getPropertyPriority(name) was returning null, because name was null.

Instead of fixing the JS, I implemented getComputedStyle for SVG, which stopped "name" from being null (at least for now).  This isn't a full fix, but it solved my issue.  If someone would like to make this hunk of inspector JS more robust, be my guess.  I wasn't exactly sure what the "correct" behavior was when "name" was null.

The security exceptions are covered by:
http://bugs.webkit.org/show_bug.cgi?id=15419
Comment 3 Eric Seidel (no email) 2007-10-08 13:49:50 PDT
Now that bug 15422 is solved, it is not absolutely necessary to change this JS.  But I leave that up to ya'll inspector folks to decide.  If so, just close the bug.
Comment 4 Timothy Hatcher 2007-10-26 00:05:31 PDT
I think this can be closed since it no longer happens.