[Webkit-unassigned] [Bug 30079] unselectable resources in resource panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 6 11:28:20 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30079





--- Comment #3 from Patrick Mueller <pmuellr at yahoo.com>  2009-10-06 11:28:20 PDT ---
If you look at a trace of the relevant methods invoked, it turns out everything
pretty much goes as planned, but then WebInspector.documentClick() is invoked
because the item in the Resources list is actually living in an <a> element. 
You can see in that code that what ends up happening is that
WebInspector.showResourceForURL() is invoked.  That method only takes the href
as a parameter.  At that point, all hell breaks loose.

In theory then, this would break if you had an XHR with a "GET" followed by a
"DELETE" as well, since the href would be the same for them.

Seems to me like the WebInspector.documentClick() functionality isn't needed
here.  And that the <a> in the item in the Resources isn't really needed;
clicking on those items is handled by the tree code itself.

So, I did the simplest possible thing.  In
WebInspector.ResourceSidebarTreeElement.prototype.onattach(), I changed the
following code:

   var link = document.createElement("a");
   link.href = this.resource.url;

to:

   var link = document.createElement("span");

to see what would happen.  This changes the <a> element to a <span>, so
WebInspector.documentClick() isn't invoked anymore.

Voila!  Now it works.  

The question is, what did this break?  Is anyone else dependent on the
Resources elements list?  If not, a nicer looking modification than what I just
did should suffice as a fix.  Presumably change the name of the var from "link"
to "span" or "element".

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list