summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGFEFloodElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGFEFloodElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGFEFloodElement.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/WebCore/svg/SVGFEFloodElement.cpp b/Source/WebCore/svg/SVGFEFloodElement.cpp
index 22e216a20..561694924 100644
--- a/Source/WebCore/svg/SVGFEFloodElement.cpp
+++ b/Source/WebCore/svg/SVGFEFloodElement.cpp
@@ -19,11 +19,8 @@
*/
#include "config.h"
-
-#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFEFloodElement.h"
-#include "Attribute.h"
#include "RenderStyle.h"
#include "SVGNames.h"
#include "SVGRenderStyle.h"
@@ -36,12 +33,11 @@ inline SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Docume
ASSERT(hasTagName(SVGNames::feFloodTag));
}
-PassRefPtr<SVGFEFloodElement> SVGFEFloodElement::create(const QualifiedName& tagName, Document& document)
+Ref<SVGFEFloodElement> SVGFEFloodElement::create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new SVGFEFloodElement(tagName, document));
+ return adoptRef(*new SVGFEFloodElement(tagName, document));
}
-
bool SVGFEFloodElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
RenderObject* renderer = this->renderer();
@@ -58,20 +54,18 @@ bool SVGFEFloodElement::setFilterEffectAttribute(FilterEffect* effect, const Qua
return false;
}
-PassRefPtr<FilterEffect> SVGFEFloodElement::build(SVGFilterBuilder*, Filter* filter)
+RefPtr<FilterEffect> SVGFEFloodElement::build(SVGFilterBuilder*, Filter& filter)
{
RenderObject* renderer = this->renderer();
if (!renderer)
- return 0;
+ return nullptr;
const SVGRenderStyle& svgStyle = renderer->style().svgStyle();
- Color color = svgStyle.floodColor();
+ const Color& color = svgStyle.floodColor();
float opacity = svgStyle.floodOpacity();
return FEFlood::create(filter, color, opacity);
}
}
-
-#endif // ENABLE(SVG) && ENABLE(FILTERS)