WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
5351
SVG: Safari ignores <title> elements
https://bugs.webkit.org/show_bug.cgi?id=5351
Summary
SVG: Safari ignores <title> elements
Nicholas Shanks
Reported
2005-10-12 09:08:35 PDT
An SVG document can contain an image title encoded in a <title> element just as it is in HTML. One would expect these to alter the title bar of a window if the SVG is the root document, however this does not currently happen. For SVG documents loaded via HTML <image/> or <object/> elements, if they do not already have a title, this should be substituted.
Attachments
Proposed patch
(564 bytes, patch)
2005-10-28 09:01 PDT
,
Julien Palmas
eric
: review-
Details
Formatted Diff
Diff
Set the title for svg too
(3.61 KB, patch)
2006-03-15 02:36 PST
,
Rob Buis
eric
: review-
Details
Formatted Diff
Diff
Set the window caption for svg <title>
(2.88 KB, patch)
2006-03-16 00:52 PST
,
Rob Buis
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2005-10-12 11:06:12 PDT
http://www.w3.org/TR/SVG/struct.html#TitleElement
is the section covering this. This basically just involves extending the KDOMDocumentWrapper object to set the DOM::DocumentImpl::title() property, after parsing. Passing this down into an <img> or <object> tag might be harder... but possible.
Nicholas Shanks
Comment 2
2005-10-13 04:06:28 PDT
Yeah, <img/>, that's what I meant. I'm not going mad am I?
Julien Palmas
Comment 3
2005-10-28 09:01:58 PDT
Created
attachment 4509
[details]
Proposed patch Like eric said, just set the DocumentImpl title with the svgDoc->title in KDOMTokenizer::finish()
Eric Seidel (no email)
Comment 4
2005-11-09 01:39:05 PST
Comment on
attachment 4509
[details]
Proposed patch Thanks for the great patch. Unfortunatley (or fortunately?) this is no longer needed after the DOM merger, which I am preparing to land.
Rob Buis
Comment 5
2006-03-15 02:36:06 PST
Created
attachment 7081
[details]
Set the title for svg too The patch works for standalone svg documents. When embedded in xhtml any title tag in the xhtml "wins". Note that the patch may lack some optimizations, also svg handling seems a bit different since when the svg title element is inserted by the parser the title text is not processed yet, unlike with the html parser.
Eric Seidel (no email)
Comment 6
2006-03-15 12:52:13 PST
Comment on
attachment 7081
[details]
Set the title for svg too Rob and I discussed several fixes on IRC. textContent() should be used in place of a m_title. There were some tabs in these files. Also we use if ( instead of if(
Rob Buis
Comment 7
2006-03-16 00:52:31 PST
Created
attachment 7109
[details]
Set the window caption for svg <title> Now uses String instead of DOMString, no tabs, uses if ( and textContent(). Cheers, Rob.
Darin Adler
Comment 8
2006-03-16 01:02:31 PST
Comment on
attachment 7109
[details]
Set the window caption for svg <title> Is there a way we can share the code instead of having to copy the HTML title element code?
Darin Adler
Comment 9
2006-03-16 08:50:56 PST
Comment on
attachment 7109
[details]
Set the window caption for svg <title> r=me
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug