Skip to content

Commit

Permalink
SVG Painting: property parsing (#14114)
Browse files Browse the repository at this point in the history
Test that properties support the full grammar.
https://svgwg.org/svg2-draft/painting.html

The tests highlight a number of spec and implementation issues:-

Spec issues:

Blink/Edge/Firefox/Safari do not accept percentage fill-opacity/stroke-opacity
w3c/svgwg#403 (comment)

Browsers do not accept stroke-linejoin 'miter-clip' or 'arcs'
w3c/svgwg#592

Browsers accept numeric stroke-dashoffset and stroke-width
w3c/svgwg#534

Browser bugs:

Blink image-rendering does not accept 'optimizespeed' or 'optimizequality'
https://bugs.chromium.org/p/chromium/issues/detail?id=901669

Firefox rejects stroke-miterlimit less than 1
https://bugzilla.mozilla.org/show_bug.cgi?id=1508028

Edge serializes fill/stroke url() without quoting the url string.
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/16900961/

Edge accepts misformed numbers fill-opacity: 1.; stroke-miterlimit: 1.; stroke-opacity: 1.;
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19656838/

Edge accepts negative stroke-dasharray
Edge does not accept calc in stroke-dasharray
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19656979/

Edge accepts negative stroke-width values
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19656907/

Safari accepts negative stroke-width
https://bugs.webkit.org/show_bug.cgi?id=191804

Safari serializes color-interpolation, color-rendering, image-rendering, shape-rendering, text-rendering in mixed case
https://bugs.webkit.org/show_bug.cgi?id=190685

Edge serializes paint-order 'normal' as 'fill', unlike other browsers.

Firefox does not use shortest paint-order serialization, instead it uses 2 keywords when 1 would suffice

Browsers yet to implement properties:

Firefox does not support color-rendering

Edge does not support color-interpolation/color-rendering/image-rendering/shape-rendering/text-rendering
Note: When implementing, the keywords should serialize in lower case.
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19328562/

Browsers yet to implement keywords:

Blink/Edge/Safari do not accept fill/stroke 'context-fill' or 'context-stroke'
Firefox does support the keywords: https://jsfiddle.net/ericwilligers/8bhyafe1/
  • Loading branch information
ewilligers authored Nov 21, 2018
1 parent b448498 commit e502242
Show file tree
Hide file tree
Showing 38 changed files with 838 additions and 0 deletions.
20 changes: 20 additions & 0 deletions svg/painting/parsing/color-interpolation-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/color-interpolation-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/color-rendering-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/color-rendering-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions svg/painting/parsing/fill-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/fill-opacity-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions svg/painting/parsing/fill-opacity-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/fill-rule-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/fill-rule-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions svg/painting/parsing/fill-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/image-rendering-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/image-rendering-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/marker-end-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/marker-end-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/marker-mid-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/marker-mid-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions svg/painting/parsing/marker-start-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions svg/painting/parsing/marker-start-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e502242

Please sign in to comment.