Bug 203770 - Fix the defaults of the SVGFEConvolveMatrixElement properties
Summary: Fix the defaults of the SVGFEConvolveMatrixElement properties
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2019-11-01 16:01 PDT by Said Abou-Hallawa
Modified: 2024-02-08 15:13 PST (History)
12 users (show)

See Also:


Attachments
test case (704 bytes, image/svg+xml)
2019-11-01 16:01 PDT, Said Abou-Hallawa
no flags Details
Patch (19.15 KB, patch)
2019-11-01 16:14 PDT, Said Abou-Hallawa
sabouhallawa: review?
Details | Formatted Diff | Diff
Safari 15.5 differs from other browsers (623.60 KB, image/png)
2022-05-31 13:53 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2019-11-01 16:01:54 PDT
Created attachment 382642 [details]
test case

Open the attached test case.

Expected results:

    Default value for feConvolveMatrix divisor property is: 1
    Default value for feConvolveMatrix orderX property is: 3
    Default value for feConvolveMatrix orderY property is: 3

The specs links are:

    https://www.w3.org/TR/SVG11/filters.html#feConvolveMatrixElementDivisorAttribute
    https://www.w3.org/TR/SVG11/filters.html#feConvolveMatrixElementOrderAttribute
Comment 1 Said Abou-Hallawa 2019-11-01 16:14:57 PDT
Created attachment 382647 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-11-13 16:30:36 PST
Comment on attachment 382647 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382647&action=review

> Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp:74
> +        if (parseNumberOptionalNumber(value, x, y) && (x < 1 || y < 1))
>              document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing order=\"" + value + "\". Filtered element will not be displayed.");
> +        m_orderX->setBaseValInternal(x);
> +        m_orderY->setBaseValInternal(y);

So we parse the values but set them anyway? Seems odd.

> Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp:121
> +        if (parseNumberOptionalNumber(value, x, y) && (x <= 0 || y <= 0))
>              document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing kernelUnitLength=\"" + value + "\". Filtered element will not be displayed.");
> +        
> +        m_kernelUnitLengthX->setBaseValInternal(x);
> +        m_kernelUnitLengthY->setBaseValInternal(y);

Ditto.
Comment 3 Ahmad Saleem 2022-05-31 13:53:19 PDT
Created attachment 459904 [details]
Safari 15.5 differs from other browsers

This issue is still present and reproducible in Safari 15.5 on macOS 12.4 while Chrome Canary 104 matches with Firefox Nightly 103. Thanks!
Comment 4 Radar WebKit Bug Importer 2024-02-08 15:13:54 PST
<rdar://problem/122586298>