Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
| index c595c9ce65df225c11c2bd9ac0c7e474697ad047..52cbdb065660fb598dd8fdd649e93d9368a878f4 100644 |
| --- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
| +++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
| @@ -77,7 +77,11 @@ bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() |
| return true; |
| } |
| - applyCompositingIfNecessary(); |
| + bool isSVGRoot = m_object.isSVGRoot(); |
| + |
| + // Layer takes care of root opacity and blend mode. |
|
pdr.
2016/06/15 09:50:32
Can you assert that a layer is present? (Similarly
fs
2016/06/15 11:02:43
Added something along those lines.
fs
2016/06/15 22:02:09
Had to adjust this again, because while "has filte
fs
2016/06/20 10:47:07
Fixed up to something that passes trybots.
|
| + if (!isSVGRoot) |
| + applyCompositingIfNecessary(); |
| if (!applyClipIfNecessary(resources)) |
| return false; |
| @@ -85,7 +89,7 @@ bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() |
| if (!applyMaskIfNecessary(resources)) |
| return false; |
| - if (!applyFilterIfNecessary(resources)) |
| + if (!isSVGRoot && !applyFilterIfNecessary(resources)) |
| return false; |
| if (!isIsolationInstalled() && SVGLayoutSupport::isIsolationRequired(&m_object)) |
| @@ -98,10 +102,6 @@ void SVGPaintContext::applyCompositingIfNecessary() |
| { |
| ASSERT(!paintInfo().isRenderingClipPathAsMaskImage()); |
| - // Layer takes care of root opacity and blend mode. |
| - if (m_object.isSVGRoot()) |
| - return; |
| - |
| const ComputedStyle& style = m_object.styleRef(); |
| float opacity = style.opacity(); |
| WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed() ? |
| @@ -147,7 +147,7 @@ bool SVGPaintContext::applyMaskIfNecessary(SVGResources* resources) |
| bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources) |
| { |
| if (!resources) { |
| - if (m_object.style()->svgStyle().hasFilter()) |
| + if (m_object.style()->hasFilter()) |
| return false; |
| } else if (LayoutSVGResourceFilter* filter = resources->filter()) { |
| m_filterRecordingContext = adoptPtr(new SVGFilterRecordingContext(paintInfo().context)); |