-
Notifications
You must be signed in to change notification settings - Fork 218
Browser issues
Ahmad Saleem edited this page Aug 22, 2022
·
47 revisions
Developer reference. This page tries to gather limitations and issues with current browsers that make developing rasterizeHTML.js difficult at times. For outstanding browser bugs that limit the current use of the library see Limitations.
-
Background images need a workaround, https://bugzilla.mozilla.org/show_bug.cgi?id=789249Fixed in 17.0 -
Background images are quite often only shown after a reload of the page.Fixed in 17.0 -
The background image in example.html vanishes and re-appears in the phase of two keystrokes.Fixed in 17.0, Kind of broken in 18.0, Fixed in 19.0 - XMLSerializer has limited capabilities for HTML transformation (e.g. does not quote superfluous dashes in comments). Using our own implementation from http://cburgmer.github.io/xmlserializer/.
- Loading and parsing HTML documents via XHR2 does not work with local files, https://bugzilla.mozilla.org/show_bug.cgi?id=942138
- Documents loaded through XHR2 do not expose style sheets through CSSOM https://bugzilla.mozilla.org/show_bug.cgi?id=925493 (the negation is possibly a bug in WebKit instead).
-
The default font size (i.e. if none other set) seems to be around 0.001px (maybe https://code.google.com/p/chromium/issues/detail?id=348436 and https://bugs.webkit.org/show_bug.cgi?id=68090).fixed upstream - Margins collapse across
<foreignObject>
(Safari https://bugs.webkit.org/show_bug.cgi?id=23963) Workaround implemented -
Chrome & Safari seem to ignore the first style rule when rendering SVG. However this does not seem to affect the rasterized result.Does not apply anymore to the current implementation - The XMLSerializer interface does not require HTML documents to be serialized into XHTML and consequently this is not supported under Webkit (https://bugs.webkit.org/show_bug.cgi?id=47768). Using our own implementation from http://cburgmer.github.io/xmlserializer/.
Chrome can't parse abackgroundImage
URL on a dynamically created<style>
element: http://code.google.com/p/chromium/issues/detail?id=161644.Chrome can't set afont-face
URL on a dynamically created<style>
element: https://bugs.chromium.org/p/chromium/issues/detail?id=588129.Chrome can't set abackgroundImage
URL on a style rule: https://bugs.chromium.org/p/chromium/issues/detail?id=660663.- Reading from canvas after SVG from blob URL has been drawn fails (https://code.google.com/p/chromium/issues/detail?id=294129). Falling back to data:uri which has been made to work recently.
-
Media queries inworkaround provided and fixed upstream in the meantimeem
will not work and need to be expressed inpx
instead (https://code.google.com/p/chromium/issues/detail?id=404470).
-
Chrome is not able to read back from the canvas (when using data:uri)fixed upstream -
Thefixed upstreamsans-serif
font-family will not be applied and Chrome falls back to using theserif
font (https://code.google.com/p/chromium/issues/detail?id=167760)
-
Safari has issues rendering a <PRE> with line breaks (see e.g. section "API" on http://cburgmer.github.com/rasterizeHTML.js/)Fixed in 6.0.2 -
Safari so far seems not to be able to load & parse an HTML document via AJAX. Only XML is supported, breaking the rendering from SVG (https://developer.mozilla.org/en/HTML_in_XMLHttpRequest)Fixed in recent versions -
Fixed in recent versions such as Safari Technology Preview 151<style>
elements inside SVGs in Safari have theirsheet
attribute undefined (https://bugs.webkit.org/show_bug.cgi?id=163324, work around provided in https://github.com/cburgmer/rasterizeHTML.js/issues/158)