Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 109224 CSS filters (-webkit-filter) not applied to SVG elements.
Starred by 25 users Project Member Reported by cos...@gmail.com, Jan 5 2012 Back to list
Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on: View detail
issue 532938
issue 533457



Sign in to add a comment
Chrome Version       : 18.0.996.0
OS Version: OS X 10.7.2
URLs (if applicable) : reduced test case attached
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5: FAIL
     WebKit N: FAIL  
  Firefox 4.x: FAIL
  Firefox 11.x: FAIL
     IE 7/8/9:

What steps will reproduce the problem?
1. Embed some SVG in HTML.
2. Use -webkit-filter in CSS to apply a filter, e.g. "webkit-filter: hue-rotate(120deg);"

What is the expected result?
The filter is applied.
In the attached test case, all 6 circles should be green.

What happens instead?
No filter is applied.
In the attached test case, circles 3 and 6 are red.

Please provide any additional information below. Attach a screenshot if
possible.

The CSS filters demo at http://html5-demos.appspot.com/static/css/filters/index.html works for me, so my flags should be set correctly.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.15 (KHTML, like Gecko) Chrome/18.0.996.0 Safari/535.15

 
svg_filter_css_bug.html
1.2 KB View Download
Comment 1 by tkent@chromium.org, Jan 5 2012
Labels: -Area-Undefined Area-WebKit WebKit-Rendering WebKit-SVG
Comment 2 by kareng@google.com, Jan 24 2012
mike these look like CSS please unassign urself if they are not.
Comment 3 by kareng@google.com, Jan 24 2012
Owner: mikelawther@chromium.org
Status: Assigned
mike these look like css, please unassign urself if they are not.
From my reading of the spec, http://www.w3.org/TR/SVG/styling.html, SVG supports only a restricted set of CSS2 styles on SVG elements.  The styles which are directly supported by the spec are listed on that page.  The "filter" property can be styled, but it is explicitly not a CSS2 property, and refers to an SVG filter in IRI format (your circles 2 and 5).  Once the vendor prefix drops from -webkit-filter, there will be no way to refer to it from an SVG element either, since that property will now refer to the SVG property instead.

Since the SVG filters are essentially a superset of the CSS filters (modulo some convenience functions, and custom()), I'd recommend using them to filter your SVG elements.  It is possible to apply a -webkit-filter to the SVG element at the HTML level, but obviously that applies to the whole SVG subtree, not individual elements.
Project Member Comment 5 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -WebKit-Rendering -WebKit-SVG Cr-Content Cr-Content-SVG Cr-Content-Rendering
Project Member Comment 6 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 7 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-Rendering Cr-Blink-Rendering
Project Member Comment 8 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-SVG Cr-Blink-SVG
Labels: Cr-Blink-CSS-Filters
Labels: -Cr-Blink-Rendering Cr-Blink-Layout
Migrate from Cr-Blink-Rendering to Cr-Blink-Layout
Comment 11 by e...@opera.com, Mar 10 2015
Here's another testcase: http://xn--dahlstrm-t4a.net/svg/clippath/css-clip-path-circle.svg (which sort of half works, the clip is correct in blink, and the filter is correct in gecko).

The spec to look at is: http://dev.w3.org/fxtf/filters/#FilterProperty (the shorthand css syntax does apply to svg elements as well as html elements).
Project Member Comment 12 by bugdroid1@chromium.org, Apr 21 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=194115

------------------------------------------------------------------
r194115 | fs@opera.com | 2015-04-21T11:51:42.710236Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SourceAlpha.h?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/LayoutSVGResourceFilter.cpp?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/ReferenceFilterBuilder.cpp?r1=194115&r2=194114&pathrev=194115
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/css3/filters/effect-reference-source-alpha-not-first-expected.html?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilterBuilder.h?r1=194115&r2=194114&pathrev=194115
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/css3/filters/effect-reference-source-alpha-not-first.html?r1=194115&r2=194114&pathrev=194115
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SourceAlpha.cpp?r1=194115&r2=194114&pathrev=194115

Derive the SourceAlpha filter input from SourceGraphic

Let the SourceAlpha FilterEffect wrap a FilterEffect rather than just
getting the SourceGraphic reference from the SkiaImageFilterBuilder.
This makes the DAG constructed for a url(...) reference within a
<filter-function-list> only have a single input - SourceGraphic.

Matches Gecko-behavior for 'filter'.

BUG=109224

Review URL: https://codereview.chromium.org/1056353003
-----------------------------------------------------------------
Comment 13 by cos...@gmail.com, Apr 21 2015
Thank you so much!
Comment 14 by f...@opera.com, Apr 21 2015
Not much to be thanking for (yet) TBH =)
Project Member Comment 15 by bugdroid1@chromium.org, Apr 27 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=194527

------------------------------------------------------------------
r194527 | fs@opera.com | 2015-04-27T16:56:04.078950Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp?r1=194527&r2=194526&pathrev=194527
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SkiaImageFilterBuilder.h?r1=194527&r2=194526&pathrev=194527
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=194527&r2=194526&pathrev=194527

Remove SourceGraphic reference from SkiaImageFilterBuilder

Only set, not read. (Last user was SourceAlpha.)

BUG=109224

Review URL: https://codereview.chromium.org/1108823002
-----------------------------------------------------------------
Project Member Comment 16 by bugdroid1@chromium.org, Apr 27 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=194545

------------------------------------------------------------------
r194545 | fs@opera.com | 2015-04-27T20:26:05.625377Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=194545&r2=194544&pathrev=194545
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/LayoutSVGResourceFilter.h?r1=194545&r2=194544&pathrev=194545

Replace FilterData::boundaries with Filter::filterRegion()

Stores the same value when Filter is an SVGFilter (which it always is
in SVGFilterPainter.)

BUG=109224

Review URL: https://codereview.chromium.org/1108763004
-----------------------------------------------------------------
Project Member Comment 17 by bugdroid1@chromium.org, Apr 30 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=194729

------------------------------------------------------------------
r194729 | fs@opera.com | 2015-04-30T11:18:29.065774Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/ReferenceFilterBuilder.h?r1=194729&r2=194728&pathrev=194729
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=194729&r2=194728&pathrev=194729
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/DeprecatedPaintLayer.cpp?r1=194729&r2=194728&pathrev=194729
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/FilterEffectBuilder.cpp?r1=194729&r2=194728&pathrev=194729
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/ReferenceFilterBuilder.cpp?r1=194729&r2=194728&pathrev=194729

Cleanup color space resolution for ReferenceFilterBuilder

There's some dodgy-looking code, used by ReferenceFilterBuilder::build
to compute a ColorSpace for each filter primitive. Convert it to
compute an EColorInterpolation instead, and then resolve the ColorSpace
from that similarly to how LayoutSVGResourceFilter::buildPrimitives
does it. Also try to make it "cascade" the value in a more proper way,
rather than just selecting the value from the filter or the primitive.
This moves the two code-paths a bit closer to each other.

Also convert ReferenceFilterBuilder::build(...) to take references as
arguments where it makes sense.

BUG=109224

Review URL: https://codereview.chromium.org/1106973004
-----------------------------------------------------------------
Project Member Comment 18 by bugdroid1@chromium.org, Apr 30 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=194753

------------------------------------------------------------------
r194753 | pdr@chromium.org | 2015-04-30T17:26:33.910875Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/virtual/slimmingpaint/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/virtual/slimmingpaint/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/virtual/slimmingpaint/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/virtual/slimmingpaint/css3/filters/effect-reference-external-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-hw-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/virtual/slimmingpaint/css3/filters/effect-reference-colorspace-expected.png?r1=194753&r2=194752&pathrev=194753

Auto-rebaseline for r194729

http://src.chromium.org/viewvc/blink?view=revision&revision=194729

BUG=109224
TBR=fs@opera.com

Review URL: https://codereview.chromium.org/1113123002
-----------------------------------------------------------------
Comment 19 by ed@chromium.org, Jun 4 2015
Issue 494947 has been merged into this issue.
Comment 20 by ed@chromium.org, Jun 4 2015
Labels: -OS-Mac OS-All
Project Member Comment 21 by bugdroid1@chromium.org, Sep 15 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=202273

------------------------------------------------------------------
r202273 | fs@opera.com | 2015-09-15T15:22:46.291814Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/FilterEffectBuilder.h?r1=202273&r2=202272&pathrev=202273
   A http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/Filter.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/ReferenceFilterBuilder.h?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/Filter.h?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/ImageFilterBuilderTest.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/DeprecatedPaintLayer.cpp?r1=202273&r2=202272&pathrev=202273
   D http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/ReferenceFilter.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.cpp?r1=202273&r2=202272&pathrev=202273
   D http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/ReferenceFilter.h?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/FilterOperation.h?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.h?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/FilterEffectBuilder.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/blink_platform.gypi?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/LayoutSVGResourceFilter.cpp?r1=202273&r2=202272&pathrev=202273
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/ReferenceFilterBuilder.cpp?r1=202273&r2=202272&pathrev=202273

Merge ReferenceFilter into Filter

The number of differences between the different subclasses of Filter is
decreasing. This brings in a sink and source reference into the
baseclass and makes use of that for users of the SVGFilter subclass too.
Instances of 'targetBoundingBox' is renamed to 'referenceBox' and the
absoluteFilterRegion() method is simplified.

BUG=109224

Review URL: https://codereview.chromium.org/1326183002
-----------------------------------------------------------------
Labels: -Cr-Blink -Cr-Blink-Layout
Owner: f...@opera.com
Marking fs@ as owner since he's been landing patches here.
Project Member Comment 23 by bugdroid1@chromium.org, Sep 16 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=202346

------------------------------------------------------------------
r202346 | fs@opera.com | 2015-09-16T15:10:45.359789Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.cpp?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/Filter.h?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.h?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/SVGLayoutTreeAsText.cpp?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SourceGraphic.cpp?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=202346&r2=202345&pathrev=202346
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/SourceGraphic.h?r1=202346&r2=202345&pathrev=202346

Specify the source rect on the SourceGraphic

Instead of carrying the source rectangle of the filter input (the
'SourceGraphic') in the Filter, specify it in the input FilterEffect
(SourceGraphic).
This allows for getting rid of the sourceImageRect() method on Filter
and implementations (it's only actually non-empty for SVGFilter and
related code-paths.)

BUG=109224

Review URL: https://codereview.chromium.org/1338753003
-----------------------------------------------------------------
Comment 24 by f...@opera.com, Sep 17 2015
Blockedon: chromium:532938
Project Member Comment 25 by bugdroid1@chromium.org, Sep 17 2015
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=202465

------------------------------------------------------------------
r202465 | fs@opera.com | 2015-09-17T19:55:58.843540Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/LayoutSVGResourceFilter.cpp?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/Filter.cpp?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/LayoutSVGResourceFilter.h?r1=202465&r2=202464&pathrev=202465
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.cpp?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/filters/Filter.h?r1=202465&r2=202464&pathrev=202465
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/graphics/filters/SVGFilter.h?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/svg/SVGLayoutTreeAsText.cpp?r1=202465&r2=202464&pathrev=202465
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/paint/SVGFilterPainter.cpp?r1=202465&r2=202464&pathrev=202465

Merge SVGFilter into Filter

This brings the handling for bbox-relative coordinates into the base
class and drops the empty shell that remains.

BUG=109224

Review URL: https://codereview.chromium.org/1348973004
-----------------------------------------------------------------
Comment 26 by f...@opera.com, Sep 18 2015
Blockedon: chromium:533457
Issue 109250 has been merged into this issue.
Project Member Comment 28 by bugdroid1@chromium.org, Oct 8 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e795c33a0120bf58d20fc324111c9108b3fc815e

commit e795c33a0120bf58d20fc324111c9108b3fc815e
Author: fs <fs@opera.com>
Date: Thu Oct 08 20:21:27 2015

Split SVGFilterbuilder into "builder" and "node map" parts

This separates the longer lived state (the LayoutObject->FilterEffect
and FilterEffect dependents maps) from the state that's only used/valid
while building a (sub)filter-graph. The former is moved to the new
class SVGFilterGraphNodeMap while the latter remain in
SVGFilterBuilder. SVGFilterBuilder can thus be converted to something
that is allocated on the stack and only kept for the building
operation. FilterData is changed to the keep a SVGFilterGraphNodeMap
instead of a builder.
The graph-building code in ReferenceFilterBuilder::build and
LayoutSVGResourceFilter::buildPrimitives is consolidated into
SVGFilterBuilder::buildGraph, with the more "relaxed" behavior of the
former kept. This should only result in a change in behavior for the
case where externally referenced filters are used.

BUG=109224, 533457 

Review URL: https://codereview.chromium.org/1382163003

Cr-Commit-Position: refs/heads/master@{#353125}

[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.h
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
[modify] http://crrev.com/e795c33a0120bf58d20fc324111c9108b3fc815e/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.h

Labels: Hotlist-Interop
Comment 31 by noel@chromium.org, May 20 2016
Cc: dstockwell@chromium.org senorblanco@chromium.org
Aside: wanted to ask some questions about unprefixing.

#11 ed@, > Here's another testcase: http://xn--dahlstrm-t4a.net/svg/clippath/css-clip-path-circle.svg (which sort of half works, the clip is correct in blink, and the filter is correct in gecko).

Does the test case work in a compatible way cross-browser?  Doesn't draw at all in Safari 9.1 for me, and Safari has unprefixed filter :)

>The spec to look at is: http://dev.w3.org/fxtf/filters/#FilterProperty (the shorthand css syntax does apply to svg elements as well as html elements).

Draft spec still, few implement it yet.  Stephen mentioned in #4, http://www.w3.org/TR/SVG/styling.html, where the filter property of SVG is restricted to the url() form, IIIC.  That seems to be what Safari implements after unprefixing filter.

For unprefixing filter: -webkit-filter and filter would become synonymous for HTML content.  But what todo about SVG filter?  The fact that the spec mentioned is draft, and given the Safari unprefixed case example, suggests to me that supporting the url() form of SVG filter only for now might be sensible for compat?

I had a quick look at that approach, refer to https://codereview.chromium.org/1987943002  Thoughts?
Comment 32 by f...@opera.com, May 20 2016
First I'd like to say that basing anything on something being "draft" or not, is not very relevant here - the only thing (spec) that isn't "draft" here is SVG 1.1 (SE), and it seems quite obvious that's not something that we should relate to at all.

I was saddened to see the WebKit cop-out, so personally I would have preferred to not follow their example. Pragmatically though I could settle for a move in direction though, because at least it's a step in the right direction - albeit a very small one. I wish there was a straight-forward way to feature-detect this (lack of) support though.
Project Member Comment 33 by bugdroid1@chromium.org, Jun 9 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20a5c045d0eb975be198b14204ce5eb6a5ab60e2

commit 20a5c045d0eb975be198b14204ce5eb6a5ab60e2
Author: fs <fs@opera.com>
Date: Thu Jun 09 13:59:36 2016

Move ReferenceFilterBuilder::build to FilterEffectBuilder

This function resolves a filter reference and then builds a filter
(sub)DAG for painting. Split it into the two fairly distinct parts,
leaving ReferenceFilterBuilder as a class that only does element
lookup/resolution, while the DAG-building takes place in
FilterEffectBuilder (with a little help from SVGFilterBuilder.)
Use the new function in SVGFilterPainter.

Also pass Element& to ReferenceFilterBuilder::build, and remove a
redundant null-check of ComputedStyle in
PaintLayer::updateOrRemoveFilterEffectBuilder (already checked by
paintsWithFilters and assumed later in the function.)

BUG=109224, 533457 

Review-Url: https://codereview.chromium.org/2044153002
Cr-Commit-Position: refs/heads/master@{#398866}

[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.h
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/FilterEffectBuilder.h
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp

Project Member Comment 34 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20a5c045d0eb975be198b14204ce5eb6a5ab60e2

commit 20a5c045d0eb975be198b14204ce5eb6a5ab60e2
Author: fs <fs@opera.com>
Date: Thu Jun 09 13:59:36 2016

Move ReferenceFilterBuilder::build to FilterEffectBuilder

This function resolves a filter reference and then builds a filter
(sub)DAG for painting. Split it into the two fairly distinct parts,
leaving ReferenceFilterBuilder as a class that only does element
lookup/resolution, while the DAG-building takes place in
FilterEffectBuilder (with a little help from SVGFilterBuilder.)
Use the new function in SVGFilterPainter.

Also pass Element& to ReferenceFilterBuilder::build, and remove a
redundant null-check of ComputedStyle in
PaintLayer::updateOrRemoveFilterEffectBuilder (already checked by
paintsWithFilters and assumed later in the function.)

BUG=109224, 533457 

Review-Url: https://codereview.chromium.org/2044153002
Cr-Commit-Position: refs/heads/master@{#398866}

[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.h
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/FilterEffectBuilder.h
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/20a5c045d0eb975be198b14204ce5eb6a5ab60e2/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp

Project Member Comment 35 by bugdroid1@chromium.org, Jun 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a0f0e2eb0abdd68fb377d5b789682acfe10757d

commit 7a0f0e2eb0abdd68fb377d5b789682acfe10757d
Author: fs <fs@opera.com>
Date: Mon Jun 20 19:59:36 2016

Unprefix the CSS 'filter' property

Parse 'filter' in the same way as '-webkit-filter', and make the latter
an alias of the former.
For SVG content, only the "url(...)" function is allowed still, with the
exception of the outermost <svg> (LayoutSVGRoot), since that "has a box".

Update tests to use 'filter' where reasonable and applicable.

Intent to Ship: https://groups.google.com/a/chromium.org/d/topic/blink-dev/ZVT2kxuFMaA/discussion

Based on https://codereview.chromium.org/1987943002 by noel@chromium.org.

BUG= 613441 , 618160 , 550249 , 535786 , 244295 ,109224

Review-Url: https://codereview.chromium.org/2065593002
Cr-Commit-Position: refs/heads/master@{#400752}

[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/animations/animated-filter-svg-element-expected.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/animations/animated-filter-svg-element.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/compositing/will-change/stacking-context-creation-expected.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/compositing/will-change/stacking-context-creation.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-expected.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-blur-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-blur.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-brightness-clamping-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-brightness-clamping.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-brightness-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-brightness.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-combined-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-combined.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-contrast-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-contrast.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-drop-shadow-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-drop-shadow.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-grayscale-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-grayscale.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-hue-rotate-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-hue-rotate.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-invert-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-invert.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-opacity-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-opacity.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference-composite-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference-composite.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference-ordering-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference-ordering.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-reference.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-saturate-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-saturate.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-sepia-hw.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/effect-sepia.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/fecomposite-non-zero-inoffset.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/feoffset-region-zoom-expected.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-property-computed-style.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-property-parsing-invalid.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-property-parsing.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-region-transformed-child-expected.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-repaint-blur.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/filter-repaint-shadow.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/css3/filters/unprefixed.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/filter-refresh-expected.txt
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-element-invalid-filter-expected.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-element-invalid-filter.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-filter-child-box-reflect-expected.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-filter-child-box-reflect.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-filter-root-box-reflect-expected.html
[add] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/svg/filters/svg-filter-root-box-reflect.html
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/DeferredLegacyStyleInterpolationTest.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/FilterListPropertyFunctions.h
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/CSSProperties.in
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/frame/UseCounter.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/SVGResources.h
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/style/SVGComputedStyle.h
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.h
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/7a0f0e2eb0abdd68fb377d5b789682acfe10757d/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp

Is this fixed now?
Comment 37 by f...@opera.com, Jul 22 2016
No, this is still TBD. (On my TODO, but not at the top yet.)
Project Member Comment 38 by bugdroid1@chromium.org, Sep 20
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/28dabf9ae1ddd829b228ca519f38f317aff7fc97

commit 28dabf9ae1ddd829b228ca519f38f317aff7fc97
Author: fs <fs@opera.com>
Date: Tue Sep 20 08:30:38 2016

Replace FilterData::filter with lastEffect

This brings the FilterData+SVGFilterPainter (etc)  "complex" closer to
the PaintLayer+PaintLayerFilterInfo structure by keep the last effect
in the chain and accessing the Filter through that when needed.
In general we want these two "complexes" to closely resemble each other
as possible - because they are supposed to implement the same thing, with
only a difference in the parametrization (like which bounding-box to use.)
This also brings one tiny (tiny tiny) step closer to being able to get
shorthand filters working in the SVG code-path.

Also try to reduce dependencies a bit in the surrounding code.

BUG= 439970 ,109224
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2350063002
Cr-Commit-Position: refs/heads/master@{#419700}

[modify] https://crrev.com/28dabf9ae1ddd829b228ca519f38f317aff7fc97/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
[modify] https://crrev.com/28dabf9ae1ddd829b228ca519f38f317aff7fc97/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceFilter.h
[modify] https://crrev.com/28dabf9ae1ddd829b228ca519f38f317aff7fc97/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
[modify] https://crrev.com/28dabf9ae1ddd829b228ca519f38f317aff7fc97/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.h

Project Member Comment 39 by bugdroid1@chromium.org, Sep 22
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/debded53b1df7614a159aff43e8041e0e25c9352

commit debded53b1df7614a159aff43e8041e0e25c9352
Author: fs <fs@opera.com>
Date: Thu Sep 22 18:07:31 2016

Fold DisplayItem creation into paintFilteredContent in SVGFilterPainter

Brings uses of any form of "filter bounds" closer together.
Rename |filterRegion| and |boundaries| to |filterBounds|.

BUG=109224
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2367463002
Cr-Commit-Position: refs/heads/master@{#420397}

[modify] https://crrev.com/debded53b1df7614a159aff43e8041e0e25c9352/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp

Sign in to add a comment