[webkit-reviews] review granted: [Bug 133699] Web Inspector: TypeError when hovering over "Show All Nodes" button in the Dom Tree inspector : [Attachment 233668] [PATCH] Fix attempt.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 24 11:33:35 PDT 2014


Geoffrey Garen <ggaren at apple.com> has granted Jono Wells
<jonowells at apple.com>'s request for review:
Bug 133699: Web Inspector: TypeError when hovering over "Show All Nodes" button
in the Dom Tree inspector
https://bugs.webkit.org/show_bug.cgi?id=133699

Attachment 233668: [PATCH] Fix attempt.
https://bugs.webkit.org/attachment.cgi?id=233668&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=233668&action=review


> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:313
> +	       if (element.representedObject && !element.tooltip && element
instanceof WebInspector.DOMTreeElement)
>		   element._createTooltipForNode();

I think it might be better just to test for the presence of the
"_createTooltipForNode" property, instead of doing an instanceof check. This is
basically a delegation protocol, and those usually work best when they are
agnostic about the type of the target object, and only check whether the target
object responds to the delegate function.


More information about the webkit-reviews mailing list