Bug 128771

Summary: SVG - Filtered element will be upscaled with low filterRes value
Product: WebKit Reporter: Adenilson Cavalcanti Silva <savagobr>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: commit-queue, dino, d-r, esprehn+autocc, fmalita, glenn, gyuyoung.kim, kondapallykalyan, krit, pdr, schenney, sergio, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 68469    
Attachments:
Description Flags
PoC: should appear as a single green rectangle
none
Patch none

Description Adenilson Cavalcanti Silva 2014-02-13 15:11:02 PST
Should appear as a green rectangle, will display 2 rectangles (one being red at the background).
Comment 1 Adenilson Cavalcanti Silva 2014-02-13 15:11:40 PST
Created attachment 224117 [details]
PoC: should appear as a single green rectangle
Comment 2 Adenilson Cavalcanti Silva 2014-02-19 13:33:08 PST
Created attachment 224668 [details]
Patch
Comment 3 WebKit Commit Bot 2014-02-19 13:34:40 PST
Attachment 224668 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:12:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dirk Schulze 2014-02-19 13:36:29 PST
Comment on attachment 224668 [details]
Patch

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

> Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:171
> +    // If the scale factor is way too low, it will deform/upscale the
> +    // element size.

filterRes is used by internal code as well to make sure we do nor create to big buffers. Does the issue happen for internal code as well? If not, we should rather remove the API from SVGFitlerElement. It already was removed from Fitler Effects specification.
Comment 5 Adenilson Cavalcanti Silva 2014-02-19 16:59:28 PST
Dirk

Thanks for the review.

When you mentioned "internal code" and "big buffers", are you referring to that function that tests for maximumImageSize (i.e. bool RenderSVGResourceFilter::fitsInMaximumImageSize(const FloatSize& size, FloatSize& scale)? If so, scale factor is not tested there.

Or are you talking about other code path?
Comment 6 Adenilson Cavalcanti Silva 2014-02-27 14:44:38 PST
Dirk

As you have pointed, the spec will drop the filterRes parameter and it seems that FF has dropped it already.

Should I instead created a new bug to propose removal of this feature?
Comment 7 Dirk Schulze 2014-02-27 22:16:13 PST
(In reply to comment #6)
> Dirk
> 
> As you have pointed, the spec will drop the filterRes parameter and it seems that FF has dropped it already.
> 
> Should I instead created a new bug to propose removal of this feature?

yes please. :)
Comment 8 Adenilson Cavalcanti Silva 2014-03-01 17:31:43 PST
The followup bug:
https://bugs.webkit.org/show_bug.cgi?id=129565
Comment 9 Dirk Schulze 2014-03-02 08:33:36 PST
Can we close this bug now?
Comment 10 Csaba Osztrogonác 2014-06-04 00:50:07 PDT
Comment on attachment 224668 [details]
Patch

Cleared review? from attachment 224668 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).