some XUL features don't work in XML documents (i.e. when served as text/xml)

NEW
Unassigned

Status

()

Core
XUL
16 years ago
9 years ago

People

(Reporter: Erich 'Ricky' Iseli, Unassigned)

Tracking

(Depends on: 1 bug, {meta})

Trunk
Future
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(6 attachments)

(Reporter)

Description

16 years ago
If a file has the extension .xml (instead of .xul), the label of the menu
element won't display. The menu items pop up correctly and have the label
displayed as well.

When loading the page, there is a javascript error:

Error: this.childNodes[i].getAttribute is not a function
Source File: chrome://global/content/bindings/toolbar.xml#toolbox.init()
Line: 2

This happens both if the file is a valid xul file but with the extension xml,
and if the file is a valid xhtml file, with the xul namespace defined, and
served as xml.

Gonna attach the testcase.

Comment 1

16 years ago
this is some kind of namespace issue, it seems. I got an assertion when going 
to Erich's page.
(Reporter)

Comment 2

16 years ago
Created attachment 50414 [details]
Served with xul mime type: works
(Reporter)

Updated

16 years ago
Attachment #50414 - Attachment description: Save this file as menu.xul and load it locally. It will work → Served with xul mime type: works
(Reporter)

Comment 3

16 years ago
Created attachment 50416 [details]
xhtml file served as text/xml: doesn't work
(Reporter)

Updated

16 years ago
Attachment #50416 - Attachment description: Served as text/xml → xhtml file served as text/xml: doesn't work
(Reporter)

Comment 4

16 years ago
Adding URL to which hwaara refers.
(Reporter)

Comment 5

16 years ago
Created attachment 50417 [details]
xhtml served as application/xml: doesn't work
(Reporter)

Updated

16 years ago
Attachment #50417 - Attachment description: xhtml served as application/xml → xhtml served as application/xml: doesn't work
(Reporter)

Comment 6

16 years ago
Created attachment 50418 [details]
xhtml served as xhtml: doesn't work
(Reporter)

Updated

16 years ago
Attachment #50418 - Attachment description: xhtml served as xhtml → xhtml served as xhtml: doesn't work
(Reporter)

Comment 7

16 years ago
Created attachment 50419 [details]
xul served as xml: doesn't work
(Reporter)

Updated

16 years ago
Attachment #50419 - Attachment description: xul served as xml → xul served as xml: doesn't work
(Reporter)

Comment 8

16 years ago
Ok, so it looks like this bug appears whenever the document is not served as xul
file (mime type  application/vnd.mozilla.xul+xml)
(Reporter)

Comment 9

16 years ago
Created attachment 50420 [details]
Minimal testcase. Serving as text/xml, but any other non-xul mime type should repro this too
(Reporter)

Updated

16 years ago
Keywords: testcase
(Reporter)

Comment 10

16 years ago
Hm... not that easy. Now there's no javascript error on loading. However if you
click on the toolbar-grippy, you get this new js error:

Error: toolbox.collapseToolbar is not a function
Source File:
chrome://global/content/bindings/toolbar.xml#toolbargrippy.grippyTriggered()
Line: 6

Updated

16 years ago
OS: Windows 98 → All

Updated

16 years ago
QA Contact: bsharma → moied

Comment 11

16 years ago
CCing heikki.
You are going to have problems if you try to load a XUL file with a wrong mime
type. Most people know that if they serve their HTML documents as text/plain, it
won't work. This is the same thing. We shouldn't crash or leak memory or do
anything terminally bad if served a wrong mime type, of course, but XUL-specific
things just not working is different. Use the correct mime type.

Someone may argue that XUL is just XML, and another namespace, and therefore it
should work. Our implementation does not think so: the mime type triggers
completely different code for XUL. XUL also has an officially declared mime
type, so I would really like you to use it.

In my opinion this is wontfix, or perhaps future.

Comment 13

16 years ago
This bug has been marked "future" because the original netscape engineer working 
on this is over-burdened. If you feel this is an error, that you or another
known resource will be working on this bug,or if it blocks your work in some way 
-- please attach your concern to the bug for reconsideration -----

Target Milestone: --- → Future
->XML
Assignee: harishd → heikki
Component: Parser → XML
QA Contact: moied → ashishbhatt
Summary: Label of xul menu element doesn't display and a javascript error occurs → XUL doesn't work when served as XML

Comment 15

13 years ago
WFM.

Comment 16

13 years ago
Because this bug is really old and no one is responding resolving WFM.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 17

13 years ago
Anne, with all my respects, but WFM is not the right resolution. Wontfix would
be the more appropriate resolution, as per comment 12.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
(Reporter)

Comment 18

13 years ago
resolving wontfix as per comment 12.
Status: REOPENED → RESOLVED
Last Resolved: 13 years ago13 years ago
Resolution: --- → WONTFIX

Comment 19

13 years ago
Erich, when I try to load a XUL file with a 'text/xml' or 'application/xml' MIME
type it works fine. I think people from mozilla.org switched minds since 2001 ;-).
(Reporter)

Comment 20

13 years ago
(In reply to comment #19)
> Erich, when I try to load a XUL file with a 'text/xml' or 'application/xml' MIME
> type it works fine. I think people from mozilla.org switched minds since 2001

Anne, how did you do that? Maybe my testcases are broken then? If you look at
the attached testcases above, all drop-down menus indeed work, but the menu-bar
has no text, except of course if it is served as a xul document. So is <xul:menu
id="file-menu" label="File"> the cause of all this trouble? Is there a new way
to label a menu item?

Comment 21

13 years ago
Never mind. I was just seeing the style sheets being applied and I thought no
functionality was lost as well.

-> VERIFIED
Status: RESOLVED → VERIFIED

Comment 22

9 years ago
> Someone may argue that XUL is just XML, and another namespace, and therefore it
> should work. Our implementation does not think so: the mime type triggers
> completely different code for XUL.

That's not a valid reason for wontfix, and wontfixing is supposed to be done by module owners. This is not to say that fixing this bug was ever a priority, but it may still be a valid bug.

I'm reopening this bug to make it easier to find and turning it into a meta bug.
Status: VERIFIED → REOPENED
Depends on: 432720
Keywords: testcase → meta
Resolution: WONTFIX → ---
Summary: XUL doesn't work when served as XML → some XUL features don't work in XML documents (i.e. when served as text/xml)

Updated

9 years ago
Assignee: hjtoi-bugzilla → nobody
Status: REOPENED → NEW
Component: XML → XP Toolkit/Widgets: XUL
QA Contact: ashshbhatt → xptoolkit.xul
(Reporter)

Comment 23

9 years ago
removing URL of testcase hosted on my site because it's no longer there. The attached testcases should be enough, I guess.

Updated

9 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.