Last Comment Bug 316564 - Inline SVG text will not display on Mac when after <h1> element. Testcase attached.
: Inline SVG text will not display on Mac when after <h1> element. Testcase att...
Status: RESOLVED WORKSFORME
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: 1.8 Branch
: PowerPC Mac OS X
: -- normal with 4 votes (vote)
: ---
Assigned To: General SVG Bugs
: Hixie (not reading bugmail)
Mentors:
Depends on:
Blocks: tibco
  Show dependency treegraph
 
Reported: 2005-11-15 10:20 PST by Toby
Modified: 2007-11-28 07:50 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase for SVG text bug. (469 bytes, application/xhtml+xml)
2005-11-15 10:21 PST, Toby
no flags Details
Amended testcase (690 bytes, application/xhtml+xml)
2005-11-15 11:16 PST, Toby
no flags Details
yet another test case for svg text bug (2.43 KB, application/xhtml+xml)
2006-02-26 17:00 PST, Frank Vercruesse
no flags Details
Simple testcase (10.49 KB, application/zip)
2006-12-15 12:26 PST, Amos Hayes
no flags Details

Description Toby 2005-11-15 10:20:16 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051107 Firefox/1.5
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051107 Firefox/1.5

The offending page is xhtml with inline SVG. When the first thing in the body of the document is the inline SVG, it is displayed correctly.

If it is preceded in the body by an xhtml <h1> element (or any of the <h?> header elements), then the SVG is all displayed - with the exception of any text which will not be shown. If the <h1> element follows the SVG, there is no problem.

This does not occur under Linux, but does under Mac OS X (I don't know about Windows.)

Reproducible: Always

Steps to Reproduce:
1. Load document
2. Look.
3.

Actual Results:  
SVG displayed without text

Expected Results:  
SVG displayed with text.

The offending document will be attached: comment out the "<h1></h1>", or move it to after the SVG and the document will be displayed correctly.
Comment 1 Toby 2005-11-15 10:21:22 PST
Created attachment 203141 [details]
testcase for SVG text bug.
Comment 2 Toby 2005-11-15 11:16:03 PST
Created attachment 203148 [details]
Amended testcase

In fact, further investigation reveals that it is not necessarily an <h?> tag that is necessary to trigger the bug - it is an xhtml element whose style includes a non-zero margin.

An amended file is attached - if the margin is set to zero, the text in the SVG will appear; if the margin is greater than zero, then the text will not appear.
Comment 3 Frank Vercruesse 2006-02-26 17:00:20 PST
Created attachment 213267 [details]
yet another test case for svg text bug

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

yet another test case (involves some drag&drop javascript code) regarding svg-text not being displayed properly. the text is drawn correctly at first, but when dragging the parent div around it isn't (always) redrawn. console says:

Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGBitmapContextCreate: unsupported parameter combination: 2 integer bits/component; 8 bits/pixel; 3-component colorspace; kCGImageAlphaPremultipliedFirst.
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextConcatCTM: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextConcatCTM: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextSetFont: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextSetFontSize: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextSetTextMatrix: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextSetRGBFillColor: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Feb 27 01:41:14 G3 /Applications/Firefox.app/Contents/MacOS/firefox-bin: CGContextShowGlyphsAtPoint: invalid context
Comment 4 Frank Vercruesse 2006-02-28 04:51:49 PST
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060227 Firefox/1.6a1

it seems the bug is fixed in the current nightly build. all attached test cases pass now. thanks!
Comment 5 Martin Hejral 2006-03-01 06:30:27 PST
(In reply to comment #2)
> In fact, further investigation reveals that it is not necessarily an <h?> tag
> that is necessary to trigger the bug - it is an xhtml element whose style
> includes a non-zero margin.

Yes, it does not matter, where the inline SVG is placed.

see also bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=317759
Comment 6 Martin Hejral 2006-03-01 06:34:50 PST
uncorrectly written text-size 

(font-szie="24px")

in attachment "Amended testcase"
Comment 7 Peter Seibel 2006-03-03 22:29:04 PST
Something similar seems to happen if a file contains multiple svg elements. text elements in the first svg is rendered but text elements in subsequent svg elements is not.
Comment 8 Peter Seibel 2006-03-03 22:33:13 PST
Regarding my earlier comment: my sample renders correctly in 1.6a1.
Comment 9 Amos Hayes 2006-12-15 12:26:27 PST
Created attachment 248762 [details]
Simple testcase

This testcase fails on:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

but not on:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a1) Gecko/20061204 GranParadiso/3.0a1
Comment 10 Adam Ratcliffe 2006-12-19 13:56:16 PST
I see this same problem under: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010
Firefox/2.0

However the problem seems to be related to the text element's fill not being rendered.  If I specify a stroke for the text element it is rendered as 'outlined' text.

Comment 11 Adam Ratcliffe 2006-12-19 14:00:53 PST
Further to my previous post, the problem can clearly be seen to be related to the element's fill by modifying Amos' failure test case so that the text element looks like this:

                <svg:text x="0" y="20" font-size="16" stroke="blue">SVG</svg:text>
Comment 12 Sebastian Schaffert 2007-06-08 04:07:14 PDT
I can confirm that this bug is still unsolved, although the issue has been reported 1,5 years ago. It still exists in Firefox 2.0.0.4. It also exists in Camino.
Comment 13 Jesse Costello-Good 2007-08-20 15:28:17 PDT
This is fixed in 3a7
Comment 14 Jonathan Watt [:jwatt] (back in October - email directly if necessary) 2007-11-26 07:28:39 PST
This bug will not be fixed in Firefox 2. It should be fixed in Firefox 3 however. Can anyone else on Mac confirm that this is fixed using an date trunk build from http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ to test?
Comment 15 Jonathan Watt [:jwatt] (back in October - email directly if necessary) 2007-11-28 07:50:58 PST
Managed to borrow a Mac to test myself. Confirming this is now worksforme in trunk builds.

Note You need to log in before you can comment on or make changes to this bug.