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

Unified Diff: Source/core/svg/SVGUseElement.cpp

Issue 18053005: Introduce SVGGraphicsElement IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
Index: Source/core/svg/SVGUseElement.cpp
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp
index 1bb59dc7936972d9feee51e98d6c858b1166e22f..856cb8de4089b37266a56c558470025edd6fda48 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -67,12 +67,11 @@ BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGUseElement)
REGISTER_LOCAL_ANIMATED_PROPERTY(height)
REGISTER_LOCAL_ANIMATED_PROPERTY(href)
REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
- REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement)
- REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
+ REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
END_REGISTER_ANIMATED_PROPERTIES
inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* document, bool wasInsertedByParser)
- : SVGStyledTransformableElement(tagName, document)
+ : SVGGraphicsElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -142,7 +141,7 @@ void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString
SVGParsingError parseError = NoError;
if (!isSupportedAttribute(name))
- SVGStyledTransformableElement::parseAttribute(name, value);
+ SVGGraphicsElement::parseAttribute(name, value);
else if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
@@ -171,7 +170,7 @@ static inline bool isWellFormedDocument(Document* document)
Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* rootParent)
{
// This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied.
- SVGStyledTransformableElement::insertedInto(rootParent);
+ SVGGraphicsElement::insertedInto(rootParent);
if (!rootParent->inDocument())
return InsertionDone;
ASSERT(!m_targetElementInstance || !isWellFormedDocument(document()));
@@ -184,7 +183,7 @@ Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* ro
void SVGUseElement::removedFrom(ContainerNode* rootParent)
{
- SVGStyledTransformableElement::removedFrom(rootParent);
+ SVGGraphicsElement::removedFrom(rootParent);
if (rootParent->inDocument())
clearResourceReferences();
}
@@ -211,7 +210,7 @@ Document* SVGUseElement::externalDocument() const
void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (!isSupportedAttribute(attrName)) {
- SVGStyledTransformableElement::svgAttributeChanged(attrName);
+ SVGGraphicsElement::svgAttributeChanged(attrName);
return;
}
@@ -549,12 +548,12 @@ void SVGUseElement::toClipPath(Path& path)
if (!n)
return;
- if (n->isSVGElement() && toSVGElement(n)->isStyledTransformable()) {
+ if (n->isSVGElement() && toSVGElement(n)->isSVGGraphicsElement()) {
if (!isDirectReference(n))
// Spec: Indirect references are an error (14.3.5)
document()->accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>");
else {
- toSVGStyledTransformableElement(n)->toClipPath(path);
+ toSVGGraphicsElement(n)->toClipPath(path);
// FIXME: Avoid manual resolution of x/y here. Its potentially harmful.
SVGLengthContext lengthContext(this);
path.translate(FloatSize(x().value(lengthContext), y().value(lengthContext)));
@@ -974,7 +973,7 @@ bool SVGUseElement::instanceTreeIsLoading(SVGElementInstance* targetElementInsta
void SVGUseElement::finishParsingChildren()
{
- SVGStyledTransformableElement::finishParsingChildren();
+ SVGGraphicsElement::finishParsingChildren();
SVGExternalResourcesRequired::finishParsingChildren();
if (m_wasInsertedByParser) {
buildPendingResource();

Powered by Google App Engine
This is Rietveld 408576698