Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: Source/core/layout/svg/LayoutSVGResourceFilter.cpp

Issue 1326183002: Merge ReferenceFilter into Filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Touchups; Rebase. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/layout/svg/ReferenceFilterBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGResourceFilter.cpp
diff --git a/Source/core/layout/svg/LayoutSVGResourceFilter.cpp b/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
index 674e266267b1f2c2fd78e84d500c1c1e4cfc9ef1..506f7faa62bd71e623f6e1b7c4a4cb6e8f16cdf6 100644
--- a/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
@@ -102,10 +102,10 @@ void LayoutSVGResourceFilter::removeClientFromCache(LayoutObject* client, bool m
PassRefPtrWillBeRawPtr<SVGFilterBuilder> LayoutSVGResourceFilter::buildPrimitives(SVGFilter* filter)
{
SVGFilterElement* filterElement = toSVGFilterElement(element());
- FloatRect targetBoundingBox = filter->targetBoundingBox();
+ FloatRect referenceBox = filter->referenceBox();
// Add effects to the builder
- RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(SourceGraphic::create(filter));
+ RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(filter->sourceGraphic());
for (SVGElement* element = Traversal<SVGElement>::firstChild(*filterElement); element; element = Traversal<SVGElement>::nextSibling(*element)) {
if (!element->isFilterEffect() || !element->layoutObject())
continue;
@@ -118,11 +118,12 @@ PassRefPtrWillBeRawPtr<SVGFilterBuilder> LayoutSVGResourceFilter::buildPrimitive
}
builder->appendEffectToEffectReferences(effect, effectElement->layoutObject());
effectElement->setStandardAttributes(effect.get());
- effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->currentValue()->enumValue(), targetBoundingBox));
+ effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->currentValue()->enumValue(), referenceBox));
effect->setOperatingColorSpace(
effectElement->layoutObject()->style()->svgStyle().colorInterpolationFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
builder->add(AtomicString(effectElement->result()->currentValue()->value()), effect);
}
+ filter->setLastEffect(builder->lastEffect());
return builder.release();
}
« no previous file with comments | « no previous file | Source/core/layout/svg/ReferenceFilterBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698