Bug 71335 - feColorMatrix can't parse leading space in the values list
Summary: feColorMatrix can't parse leading space in the values list
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://granite.sru.edu/~ddailey/svg/f...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-11-01 15:50 PDT by Tim Horton
Modified: 2011-12-15 11:46 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2011-11-01 15:50:29 PDT
http://granite.sru.edu/~ddailey/svg/feComponentTransfer2.svg

The leading space in the values attribute of <feColorMatrix> is causing the filter not to draw.

There's a marginally related bug where it looked like the spec doesn't allow leading whitespace, but I'm not sure it applies here: https://bugs.webkit.org/show_bug.cgi?id=62546
Comment 1 Radar WebKit Bug Importer 2011-11-01 15:52:51 PDT
<rdar://problem/10380036>
Comment 2 Dirk Schulze 2011-11-01 16:26:23 PDT
Do you mean kernelMatrix? That is a really good question. I'd expect the following rule counts, even if it is not specified in SVG Filters directly:

<list-of-Ts>
(Where T is a type other than <string> and <family-name>.) A list consists of a separated sequence of values. Unless explicitly described differently, lists within SVG's XML attributes can be either comma-separated, with optional white space before or after the comma, or white space-separated.

White space in lists is defined as one or more of the following consecutive characters: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D) and "form-feed" (U+000C).

The following is a template for an EBNF grammar describing the <list-of-Ts> syntax:

list-of-Ts ::= T
               | T comma-wsp list-of-Ts
comma-wsp  ::= (wsp+ ","? wsp*) | ("," wsp*)
wsp        ::= (#x20 | #x9 | #xD | #xA)
Within the SVG DOM, values of a <list-of-Ts> type are represented by an interface specific for the particular type T. For example, a <list-of-lengths> is represented in the SVG DOM using an SVGLengthList or SVGAnimatedLengthList object.

http://www.w3.org/TR/SVG/types.html#DataTypeNumber

So yes, I think leading spaces are not allowed for kernelMatrix as well.
Comment 3 Tim Horton 2011-11-01 16:41:36 PDT
(In reply to comment #2)
> Do you mean kernelMatrix?

No, I mean the "values" attribute of feColorMatrix.

> So yes, I think leading spaces are not allowed for kernelMatrix as well.

I think this probably applies, regardless. So we should probably close this.