[Webkit-unassigned] [Bug 21554] Hovering the "src" attribute for an image should show the image dimensions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 22 09:31:24 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=21554
--- Comment #7 from Pavel Feldman <pfeldman at chromium.org> 2009-11-22 09:31:24 PST ---
(From update of attachment 43646)
> + var prototype = new WebInspector.ObjectProxy(this.representedObject.id, [], 0);
No need to call this prototype - it was real prototype in the code you took it
from, while in here it is just a node wrapper you create.
"new WebInspector.ObjectProxy(this.representedObject.id)" would also do.
> + InjectedScriptAccess.getProperties(prototype, true, callback);
> + },
> +
> + _updateTitleWithRespectToNodeProperties: function(getPropertyValue)
> + {
This looks too complex to keep it in here. I'd suggest at least introducing
WebInspector.ObjectProxy.getPropertiesAsync(objectProxy, callback) that would
make properties request and invoke given callback with the result object that
would essentially be a map of name/values. You will then take the ones you need
from there.
I can also imagine us showing tips for other kinds of the nodes, so it might
make sense to make this code a bit more optimized. Getting all the properties
and wrapping them might be too expensive. I'd suggest introducing
InjectedScriptAccess.getPropertiesSimple(objectWrapper, ["array", "of",
"names", "to", "query", "for"], callback); that would work for basic properties
only (ones with primitive value types) and would not wrap them with
ObjectPropertyProxy, i.e. simply send JSON object in return. I can do this part
for you if you find explanation unclear.
--
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