Closed Bug 383160 Opened 17 years ago Closed 17 years ago

Need to have localName in dom viewer

Categories

(Other Applications :: DOM Inspector, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: Mook)

References

Details

Attachments

(1 file, 1 obsolete file)

STEPS TO REPRODUCE:

1)  Load a page.
2)  Open DOM Inspector on it.
3)  Click on an Element node in the tree
4)  Look at the top of the right-hand pane

EXPECTED RESULTS:  Shows the localName of the node (a lot more useful than the nodeName, which is always visible in the tree anyway).

ACTUAL RESULTS:  Shows the nodeName.
Use localName instead - note that I'm not sure /why/ localName is better than nodeName (since, as far as I can tell, localName is just the second half of the nodeName... excluding #document, where localName is just missing)

The patch as-is breaks the build due to missing fr and ru locales.
Assignee: nobody → mook.moz+mozbz
Status: NEW → ASSIGNED
Attachment #267841 - Flags: review?(sdwilsh)
> since, as far as I can tell, localName is just the second half of the nodeName

Try:

  data:text/html,<XUL:HBOX>test</XUL:HBOX>

In this case the localName and nodeName are equal...  But if this were XML and the "XUL" namespace prefix were defined they wouldn't be.

More to the point, the nodeName doesn't matter for semantic purposes (and hence for what we do with the node); what matter are the localName and namespace URI.  So it makes more sense to show those.
bz,
Should the bug be updated to show both of those?
Both of which?
Never mind, I just realized that the namespace URI is already displayed.
Comment on attachment 267841 [details] [diff] [review]
use localName instead of nodeName

Just need the makefile changes for the locales.  I'd suggest getting sr from neil@httl when you are ready.
Attachment #267841 - Flags: review?(sdwilsh) → review+
carrying forward r+ from sdwilsh; requesting sr.
Attachment #267841 - Attachment is obsolete: true
Attachment #267882 - Flags: superreview?(neil)
Attachment #267882 - Flags: review+
Attachment #267882 - Flags: superreview?(neil) → superreview+
Checking in extensions/inspector/resources/content/viewers/domNode/domNode.js;
new revision: 1.26; previous revision: 1.25
Checking in extensions/inspector/resources/content/viewers/domNode/domNode.xul;
new revision: 1.19; previous revision: 1.18
Checking in extensions/inspector/resources/locale/en-US/viewers/domNode.dtd;
new revision: 1.8; previous revision: 1.7
Checking in extensions/inspector/resources/Makefile.in;
new revision: 1.34; previous revision: 1.33
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 384243
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: