#include "core/rendering/svg/RenderSVGResourceLinearGradient.h"
#include "core/svg/LinearGradientAttributes.h"
-#include "core/svg/SVGElementInstance.h"
#include "core/svg/SVGLength.h"
#include "core/svg/SVGTransformList.h"
-namespace WebCore {
+namespace blink {
inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document)
: SVGGradientElement(SVGNames::linearGradientTag, document)
, m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(LengthModeWidth), AllowNegativeLengths))
, m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(LengthModeHeight), AllowNegativeLengths))
{
- ScriptWrappable::init(this);
-
// Spec: If the x2 attribute is not specified, the effect is as if a value of "100%" were specified.
m_x2->setDefaultValueAsString("100%");
addToPropertyMap(m_y2);
}
-PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(Document& document)
-{
- return adoptRef(new SVGLinearGradientElement(document));
-}
+DEFINE_NODE_FACTORY(SVGLinearGradientElement)
bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrName)
{
if (!renderer())
return false;
- HashSet<SVGGradientElement*> processedGradients;
+ WillBeHeapHashSet<RawPtrWillBeMember<SVGGradientElement> > processedGradients;
SVGGradientElement* current = this;
setGradientAttributes(current, attributes);
|| m_y2->currentValue()->isRelative();
}
-}
+} // namespace blink