Closed
Bug 53615
Opened 25 years ago
Closed 25 years ago
XHTML title element content not appearing in window title bar
Categories
(Core :: XML, defect, P3)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla0.8
People
(Reporter: chrispetersen, Assigned: hjtoi-bugzilla)
Details
(Keywords: xhtml, Whiteboard: [fixinhand])
Attachments
(5 files)
|
277 bytes,
text/xml
|
Details | |
|
270 bytes,
text/xml
|
Details | |
|
233 bytes,
text/xml
|
Details | |
|
5.60 KB,
patch
|
Details | Diff | Splinter Review | |
|
8.85 KB,
patch
|
Details | Diff | Splinter Review |
Build: 2000092108
Platforms: All
Expected results: Title content should displayed as window's title
What I got: Title is not displayed in window title bar.
Steps to reproduce:
1) Open attached test cases (title.xml) in N6.
2) Window's title show say "Hello XHTML" but doesn't.
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 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.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 4•25 years ago
|
||
I am already owner of related things, taking.
Assignee: nisheeth → heikki
Status: ASSIGNED → NEW
| Reporter | ||
Comment 5•25 years ago
|
||
Noticed that the TITLE element's content is displayed in the browser window now.
Tested with the 2001010908 build.
| Reporter | ||
Comment 6•25 years ago
|
||
| Assignee | ||
Comment 7•25 years ago
|
||
Yes, but the bug is that the title does not appear in the title bar. Could you
whip up a minimal regular XML file which has only the title element from the
XHTML namespace?
| Reporter | ||
Comment 8•25 years ago
|
||
Oops, pilot error .. Forget about the issue of the title's content being
displayed in the window. I misspelled namespace as "xnlns" in the root element.
When this was corrected to "xmlns", the text is no longer appearing in the browser.
| Reporter | ||
Comment 9•25 years ago
|
||
| Reporter | ||
Comment 10•25 years ago
|
||
Using xhtml namespace, the title element is not rendered correctly either. Title
of window is using contents of title element.
| Assignee | ||
Comment 11•25 years ago
|
||
Hmm, this is actually a dupe...
*** This bug has been marked as a duplicate of 36790 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 12•25 years ago
|
||
36790 is about <style> elements in XHTML documents, this is about <title> elements. They may be related and/or dependent, but a duplicate?
| Assignee | ||
Comment 13•25 years ago
|
||
*blush* I knew something weird had happened. I LOST this bug. I guess I must
have read title=style. I'll reopen. Thanks, Robin!
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Target Milestone: Future → mozilla0.9
| Assignee | ||
Comment 14•25 years ago
|
||
| Assignee | ||
Comment 15•25 years ago
|
||
I basically copied the way we do the title for HTML documents. It is simpler
than in the HTML case, though (for example we do not save the title in the
document - I do not see a reason for it yet). Basically when we find an XHTML
title element, we start collecting the text and when we see the title close we
set the title for the document (which in turn sets it for the window). This
works even if the title element contains newlines, multiple spaces (whitespace
compressed) and even subelements. The first title element in the document wins
(this should mimic the HTML case).
Whiteboard: [fixinhand]
Target Milestone: mozilla0.9 → mozilla0.8
| Assignee | ||
Comment 16•25 years ago
|
||
Comment 17•25 years ago
|
||
patch looks good. r=harishd
Comment 18•25 years ago
|
||
Suggested (but not necessary changes):
1) Consider moving the SetTitle method to nsIDocument. If that doesn't seem like
the right place, consider sharing the implementation for nsXMLDocument and
nsHTMLDocument.
2) Consider using the text node created as a child of TITLE and TEXTAREA
elements rather than accumulating separately in the XML content sink.
Otherwise, sr=vidur.
--Vidur
| Assignee | ||
Comment 19•25 years ago
|
||
1) I don't want to move SetTitle() to nsIDocument because not all documents will
want to try and set the window title. Sharing the code between XML and HTML
world does not happen currently - I think it is better to do it in one big
overhaul with content sink refactoring etc. to catch XUL and possibly other
cases as well.
2) The problem with the title/textare child node approach is that it becomes
more difficult if the elements contain subelements/several child nodes. Right,
we do use a little more memory now than we could, but I consider the advantage
of simpler code in this case to win.
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 20•25 years ago
|
||
Verified fixed in the Feb 05 build (2001020513).
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•