Closed Bug 268426 Opened 20 years ago Closed 20 years ago

Implement the DOM interfaces for the title, desc and metadata elements

Categories

(Core :: SVG, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jay, Assigned: jwatt)

Details

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041102
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041102

text contained within title elements will be used by many documents to present
tooltip or label information. This necessitates title being part of the DOM

Reproducible: Always
Steps to Reproduce:
1.load file
2.mouseover '?'
3.

Actual Results:  
nothing

Expected Results:  
The text changes from love to help

the attachment file is only intended to show the type of use to which title text
might be put. eg ".getNodeName() == "title") "

my apologies that the script isn't shorter, can't figure what's redundant :-(

INTERNATIONALISATION

please note that 'switch' according to the spec? is only supported for text.

THIS IS AN ERROR.

switch needs to be supported for title and desc.

a workaround to demonstrate possible use is here:
http://www.peepo.co.uk/launch/index.svg

please note this uses for french for instance: systemLanguage="fr"
to ensure frenchOS users get french tooltips, 

but doesn't use title as switch isn't supported :-(
I should pester WG, remind me.
well it should be svg, but this isn't an option?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee: general → jonathan.watt
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
Here's the code I've written so far. My testcase didn't work and actually
crashed Mozilla once (in the event handler part), so this needs some more work.
I'll investigate later.
Comment on attachment 167167 [details] [diff] [review]
patch

Actually I was experiencing the onload crasher. This patch won't any more
though.
Attachment #167167 - Attachment description: broken in progress code → patch
Attached patch patch updated to tip (obsolete) — Splinter Review
patch that will apply
Attachment #167167 - Attachment is obsolete: true
OS: MacOS X → All
Hardware: Macintosh → All
Attachment #168431 - Flags: review?(alex)
Patch looks good. The 'IsAttributeMapped' function can be removed, because all
they do is forward to the baseclass.

Before r=ing this, I'd like to get tor's opinion on whether we should implement
this as 3 classes and 3 empty dom interfaces as in the patch, or whether we
should save on code bloat by instantiating a generic nsSVGElement for all three
tags and not implement the dom interfaces (seeing that they are empty anyway).
(In reply to comment #5)
> Before r=ing this, I'd like to get tor's opinion on whether we should
implement
> this as 3 classes and 3 empty dom interfaces as in the patch, or whether we
> should save on code bloat by instantiating a generic nsSVGElement for all
three
> tags and not implement the dom interfaces (seeing that they are empty
anyway).

It may be better to have that generic element implementation, but note that
SVGMetadataElement is different from SVGDescElement and SVGTitleElement. The
former only inherits the SVGElement interface, whereas the latter two also
inherit SVGLangSpace and SVGStylable. tor?
Attachment #168431 - Attachment is obsolete: true
Attachment #171865 - Flags: review?(alex)
Attachment #168431 - Flags: review?(alex)
Comment on attachment 171865 [details] [diff] [review]
patch updated to tip with IsAttributeMapped removed

I'm fine with doing it as three elements for now - make it work in
the straightforward way first, optimize for size and speed later if
it turns out to be a problem.  sr=tor on the shared mozilla files.
Attachment #171865 - Flags: superreview+
Attachment #171865 - Flags: review?(alex) → review+
Summary: Accessibility: title, desc and metadata should be part of the DOM → Implement the DOM interfaces for the title, desc and metadata elements
Checked in by tor:
http://bonsai.mozilla.org/cvsquery.cgi?who=tor%25cs.brown.edu&date=explicit&mindate=2005-01-24+09%3A42&maxdate=2005-01-24+09%3A42
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: