WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
73153
Generic font families and font sizes broken in <foreignObject> in SVG-in-img
https://bugs.webkit.org/show_bug.cgi?id=73153
Summary
Generic font families and font sizes broken in <foreignObject> in SVG-in-img
Eli Grey (:sephr)
Reported
2011-11-25 17:55:33 PST
The generic font family, "serif", is not the default font (defaulting to monospace) for HTML in a <foreignObject>, and is also not able to be used manually with font-family: serif; The font size keyword, medium, is also not the default font size (defaulting to 1px), also has no effect when used manually. None of the other font size keywords (xx-/x-/small, medium, xx-/x-/large) work when used manually either. This behavior breaks my DOM screenshot library, which puts DOM nodes into an SVG and then loads the SVG in an image and draws it to canvas.
Attachments
Testcase
(662 bytes, application/xhtml+xml)
2012-05-22 18:13 PDT
,
Eli Grey (:sephr)
no flags
Details
Testcase
(677 bytes, application/xhtml+xml)
2012-05-22 18:16 PDT
,
Eli Grey (:sephr)
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2012-05-22 11:33:00 PDT
Could you please attach a test case? See also:
bug 68090
,
bug 87069
.
Cameron McCormack (:heycam)
Comment 2
2012-05-22 16:54:08 PDT
***
Bug 87069
has been marked as a duplicate of this bug. ***
Cameron McCormack (:heycam)
Comment 3
2012-05-22 16:58:04 PDT
Here's a small test that should show sans-serif text.
Cameron McCormack (:heycam)
Comment 4
2012-05-22 16:58:44 PDT
I'll put it here, so it doesn't break the layout of Bugzilla: data:text/html;base64,PCFET0NUWVBFIGh0bWw%2BDQo8aW1nIHNyYz0iZGF0YTppbWFnZS9zdmcreG1sLDxzdmcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48dGV4dCB4PScyMCcgeT0nMjAnIGZvbnQtc2l6ZT0nMjBweCcgZm9udC1mYW1pbHk9J3NhbnMtc2VyaWYnPmhlbGxvPC90ZXh0Pjwvc3ZnPiI%2BDQo%3D
Cameron McCormack (:heycam)
Comment 5
2012-05-22 16:59:32 PDT
(Sigh, that of course broke the layout anyway and made all the comments really wide. Sorry!)
Eli Grey (:sephr)
Comment 6
2012-05-22 18:13:02 PDT
Created
attachment 143422
[details]
Testcase Threw together a quick testcase from dom2canvas code. If you don't see anything, your browser fails the testcase.
Eli Grey (:sephr)
Comment 7
2012-05-22 18:16:20 PDT
Created
attachment 143424
[details]
Testcase Firefox had an issue with <script>-in-<img>
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