svgedit/archive/from-old-wiki/BrowserBugs.md

152 lines
6.2 KiB
Markdown
Raw Normal View History

- Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented - Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention) - Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor) - Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js" - Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js" - Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js" - Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css" - Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name) - Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js" - Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js" - Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg) - Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency - Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency - Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary) - Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js` - Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential) - Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n - Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways). - Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name - Breaking change: Have `readLang` return lang and data but do not call `setLang` - Fix: Have general locales load first so extensions may use - Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded - Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG - Fix: Wrong name for moinsave - Update: Update WebAppFind per new API changes - Enhancement: Make `setStrings` public on editor for late setting (used by `ext-shapes.js`) - Enhancement: Add `extensions_added` event - Enhancement: Add `message` event (Relay messages including those which have been been received prior to extension load) - Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers - Enhancement: Allow avoiding "name" in extension export (just extract out of file name) - Enhancement: Add stack blur to canvg by default (and refactoring it) - Enhancement: Return `Promise` for `embedImage` (as with some other loading methods) - Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading - Enhancement: Recover if an extension fails to load (just log and otherwise ignore) - Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too - Enhancement: Allowing importing of locales within `addLangData` - npm: Update devDeps - Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved - Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements - Docs: Add Edtior doc file for help to general users - Docs: Clarify/simplify install instructions - npm/Docs (JSDoc): Add script to check for overly generic types - Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc) - Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names) - Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns` - Docs (JSDoc): Add our own layout template to support overflow - Docs (JSDoc): Use cleverLinks and disallow unknown tags - Docs (JSDoc): Insist on "pedantic" flag; put output directory in config - Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object - Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens` - Docs: Generally update/improve docs (fixes #92) - Docs: Update links to `latest` path (Avoid needing to update such references upon each release) - Docs: 80 chars max - Refactoring: Drop code for extension as function (already requiring export to be an object) - Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names - Refactoring: Add a `Command` base class - Refactoring: Simplify svgicons `callback` ready detection - Refactoring: Put `let` or `const` closer to scope - Refactoring: Remove unneeded `delimiter` from regex escaping utility - Refactoring: Clearer variable names - Refactoring: Use (non-deprecated) Event constructors - Testing: Use new Sinon
2018-06-06 07:26:20 +00:00
Introduction
While working on SVG-edit, a number of SVG-related browser bugs were encountered. This page serves to highlight these bugs so they can hopefully be fixed in future versions by the browser makers.
Bugs
Firefox
SVG Files in data: cannot reference elements internally
If you click 'Save' in the browser-based editor, Firefox will show all gradients as black and all markers will be invisible. This is because Firefox doesn't support fragment URIs within a data: URI.
Version(s): 4.0-
Bug Report: https://bugzilla.mozilla.org/show_bug.cgi?id=308590
Workaround in SVG-edit: None. This is now only a problem for obsolete versions of Firefox.
Symbol elements cannot reference elements internally
Importing an image with a symbol element that includes gradients results in all the gradient-filled elements being black.
Version(s): 4.0-
Bug Report: https://bugzilla.mozilla.org/show_bug.cgi?id=353575
Workaround in SVG-edit: None yet
Group Opacity has terrible performance
Problem: When an image has many elements with the opacity attribute set to values less than 1.0, the image (and the editor) cause Firefox to become very slow.
Version(s): 3.5-
Bug Report: https://bugzilla.mozilla.org/show_bug.cgi?id=309782
Other bugs related to Bug 309782: * https://bugzilla.mozilla.org/show_bug.cgi?id=523481 * https://bugzilla.mozilla.org/show_bug.cgi?id=524089
Workaround in SVG-edit: Not really. One option is to avoid using the group_opacity control and change the stroke-opacity and fill-opacity instead.
Rotating text element with gradient
Problem: When a text element has a gradient set and is rotated, the individual glyphs are incorrectly repositioned.
Version(s): All, but only on Mac OSX 10.5 (10.6 is fine)
Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=519472
Workaround in SVG-edit: No, does not appear possible.
BBoxes for groups and symbols ignore horizontal/vertical lines
Problem: When a group or symbol element contains a horizontal or vertical line, getBBox() ignores the line and thus provides an incorrect rectangle.
Version(s): All
Bug report: None yet
Workaround in SVG-edit: Resource-heavy workaround script (for 2.6)
Opera
Does not support the W3C File API
Problem: Cannot open local files in the browser version of SVG-edit in Opera.
Workaround: Use the widget version.
Webkit
Path Segments and Points Normalized
Problem: Webkit internally normalizes path segments and point lists and does not provide the original string.
Version(s): All, Safari & Chrome
Bug reports: * https://bugs.webkit.org/show_bug.cgi?id=26487 * https://bugs.webkit.org/show_bug.cgi?id=29870
Workaround in SVG-edit: Handle all path segment types and check if commas are present in the point list.
Relative Path Segments Cannot be Added/Removed
Problem: Manipulating segments using insertItemBefore, removeItem, etc fail to actually affect path elements made of relative segments.
Version(s): All, Safari & Chrome
Bug reports: * https://bugs.webkit.org/show_bug.cgi?id=30219
Workaround in SVG-edit: Convert all paths to use absolute segments.
@transform value is unreliable (Safari only)
Problem: WebKit fails to update the value of the @transform attribute after changes are made to its transformlist.
Version(s): Safari (should be fixed in next version after 5)
Bug reports: * None yet, related bug here: https://bugs.webkit.org/show_bug.cgi?id=31119
Workaround in SVG-edit: Implement our own "shim" version of SVGTransformList
getBBox on paths with curves includes control points
Problem: Calling getBBox() on a path with curves returns a box that is too big, as the control points are incorrectly included in the size.
Version(s): All, Safari & Chrome
Bug reports: * https://bugs.webkit.org/show_bug.cgi?id=53512
Workaround in SVG-edit: Implement our own "shim" version of getBBox for paths.
USE element is not repositioned when moved to x=0 y=0 through script
Problem: Attempting to set any USE element (like when importing SVGs) to position 0,0 has no visible effect. This may occur by doing undo after moving it or by setting the values as attributes.
Version(s): All, Safari & Chrome
Bug reports: * https://bugs.webkit.org/show_bug.cgi?id=53767
Workaround in SVG-edit: Removing then re-adding the element seems to take care of this.
Failure to detect camelCase elements
Problem: WebKit is unable to detect elements like linearGradient using querySelectorAll or getElementsByTagName.
Bug reports: * https://bugs.webkit.org/show_bug.cgi?id=46800
Workaround in SVG-edit: Search through all elements, then check their tagName value
Data URL page cannot be saved (Chrome only)
Problem: When using the default save handler, the SVG image is opened in a new tab, but there is no method to save the file.
Version(s): Chrome 5+
Bug reports: * http://code.google.com/p/chromium/issues/detail?id=46735
Workaround in SVG-edit: Open the source editor instead, advising user to copy & paste from there
Does not support the W3C File API (Safari only)
Problem: Cannot open local files in browser-based version of SVG-edit
Bug Reports: * https://bugs.webkit.org/show_bug.cgi?id=32624
Workaround: Copy contents of file and paste in via SVG-edit source editor
BBoxes for groups and symbols ignore horizontal/vertical lines
Problem: When a group or symbol element contains a horizontal or vertical line, getBBox() ignores the line and thus provides an incorrect rectangle.
Version(s): All
Bug report: None yet
Workaround in SVG-edit: Resource-heavy workaround script (for 2.6)
Missing SVG support desired in SVG-edit
Internet Explorer
Feature: Native support of SVG, Version(s): IE8-, Workaround: For all versions prior to IE9, use the Google Chrome Frame plugin. IE9 supported in SVG-edit 2.6
Firefox
Feature: SMIL (animation), Version(s): All, Workaround: None
Feature: SVG Text Selection, Version(s): All, Workaround: None
Webkit
Feature: SVG Filters, Version(s): Safari 5-, Chrome 4-, Workaround: Wait, SVG Filters are now implemented in the WebKit trunk
Feature: Save as SVG in Safari, Version: Windows, Workaround: None, https://bugs.webkit.org/show_bug.cgi?id=25265
Feature: Non-Scaling-Stroke, Version(s): Safari 5- Workaround: Re-calculate stroke manually, wait until Safari is updated (fixed in WebKit trunk)