Closed Bug 831398 Opened 10 years ago Closed 10 years ago

Inspector doesn't show any XML nodes inside <svg> for reftest feBlend-1.svg

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: dholbert, Assigned: miker)

Details

Attachments

(1 file)

STR:
 1. Visit https://hg.mozilla.org/mozilla-central/raw-file/8d8912467c41/layout/reftests/svg/filters/feBlend-1.svg
 2. Right click on any of the rects and pick "Inspect Element

ACTUAL RESULTS:
Inspector's XML view of the page just shows the opening and closing SVG tags, with nothing in between.

EXPECTED RESULTs:
Inspector's XML view of the page should approximately match view-source, showing e.g. <filter> and <rect> elements.
It looks SVG specific (appears to works with XHTML and XUL document).

Exception:

Timestamp: 02/14/2013 04:48:17 PM
Error: TypeError: attr.querySelector is not a function: EE_createAttribute@resource://gre/modules/devtools/MarkupView.jsm:1088
EE_update@resource://gre/modules/devtools/MarkupView.jsm:1077
ElementEditor@resource://gre/modules/devtools/MarkupView.jsm:1050
MarkupContainer@resource://gre/modules/devtools/MarkupView.jsm:754
MT_importNode@resource://gre/modules/devtools/MarkupView.jsm:298
MT_showNode@resource://gre/modules/devtools/MarkupView.jsm:352
MT__onNewSelection@resource://gre/modules/devtools/MarkupView.jsm:103
EventEmitter_emit@resource:///modules/devtools/EventEmitter.jsm:100
SN_setNode@resource://gre/modules/devtools/Selection.jsm:135
CM_inspectNode/<@chrome://browser/content/nsContextMenu.js:434
effort@resource://gre/modules/commonjs/sdk/core/promise.js:55
resolved@resource://gre/modules/commonjs/sdk/core/promise.js:117
then@resource://gre/modules/commonjs/sdk/core/promise.js:37
resolve@resource://gre/modules/commonjs/sdk/core/promise.js:143
@resource:///modules/devtools/gDevTools.jsm:206
@resource:///modules/devtools/EventEmitter.jsm:56
EventEmitter_emit@resource:///modules/devtools/EventEmitter.jsm:100
@resource://gre/modules/devtools/Toolbox.jsm:478
effort@resource://gre/modules/commonjs/sdk/core/promise.js:55
resolved@resource://gre/modules/commonjs/sdk/core/promise.js:117
then@resource://gre/modules/commonjs/sdk/core/promise.js:37
resolve@resource://gre/modules/commonjs/sdk/core/promise.js:143
@resource://gre/modules/devtools/InspectorPanel.jsm:152
@resource:///modules/devtools/EventEmitter.jsm:56
EventEmitter_emit@resource:///modules/devtools/EventEmitter.jsm:100
InspectorPanel__onMarkupFrameLoad@resource://gre/modules/devtools/InspectorPanel.jsm:557
InspectorPanel_initMarkupPanel_onload@resource://gre/modules/devtools/InspectorPanel.jsm:539

Source File: resource:///modules/devtools/EventEmitter.jsm
Line: (null)
Assignee: nobody → mratcliffe
OS: Linux → All
Hardware: x86_64 → All
Attached patch PatchSplinter Review
Single line fix.

-    if (aAttr.name in this.attrs) {
+    if (this.attrs.indexOf(aAttr.name) !== -1) {

this.attrs is an array but array.filter is an array method. Searching for the filter node name using this method returned the filter method and throw an exception.

Using in to check if an array contains a value is never recommended.
Attachment #716531 - Flags: review?(fayearthur)
Whiteboard: [has-patch]
Attachment #716531 - Flags: review+
Attachment #716531 - Flags: review?(fayearthur)
Whiteboard: [has-patch] → [has-patch][land-in-fx-team]
Whiteboard: [has-patch][land-in-fx-team] → [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/6203e427cdd8
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/6203e427cdd8
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 22
No longer blocks: DevToolsPaperCuts
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.