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

Unified Diff: Source/core/svg/SVGImageElement.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/SVGImageElement.cpp
diff --git a/Source/core/svg/SVGImageElement.cpp b/Source/core/svg/SVGImageElement.cpp
index c47d999c762ed579990d55b672b69bbaae5a0630..6a4ae7006e13d0adf64de8575ffaa750e2fd783a 100644
--- a/Source/core/svg/SVGImageElement.cpp
+++ b/Source/core/svg/SVGImageElement.cpp
@@ -50,12 +50,11 @@ BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGImageElement)
REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
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 SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* document)
- : SVGStyledTransformableElement(tagName, document)
+ : SVGGraphicsElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -93,13 +92,13 @@ bool SVGImageElement::isPresentationAttribute(const QualifiedName& name) const
{
if (name == SVGNames::widthAttr || name == SVGNames::heightAttr)
return true;
- return SVGStyledTransformableElement::isPresentationAttribute(name);
+ return SVGGraphicsElement::isPresentationAttribute(name);
}
void SVGImageElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
{
if (!isSupportedAttribute(name))
- SVGStyledTransformableElement::collectStyleForPresentationAttribute(name, value, style);
+ SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, style);
else if (name == SVGNames::widthAttr)
addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, value);
else if (name == SVGNames::heightAttr)
@@ -111,7 +110,7 @@ void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicStri
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)
@@ -137,7 +136,7 @@ void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicStri
void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (!isSupportedAttribute(attrName)) {
- SVGStyledTransformableElement::svgAttributeChanged(attrName);
+ SVGGraphicsElement::svgAttributeChanged(attrName);
return;
}
@@ -199,7 +198,7 @@ bool SVGImageElement::haveLoadedRequiredResources()
void SVGImageElement::attach(const AttachContext& context)
{
- SVGStyledTransformableElement::attach(context);
+ SVGGraphicsElement::attach(context);
if (RenderSVGImage* imageObj = toRenderSVGImage(renderer())) {
if (imageObj->imageResource()->hasImage())
@@ -211,7 +210,7 @@ void SVGImageElement::attach(const AttachContext& context)
Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent)
{
- SVGStyledTransformableElement::insertedInto(rootParent);
+ SVGGraphicsElement::insertedInto(rootParent);
if (!rootParent->inDocument())
return InsertionDone;
// Update image loader, as soon as we're living in the tree.
@@ -227,7 +226,7 @@ const AtomicString& SVGImageElement::imageSourceURL() const
void SVGImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
{
- SVGStyledTransformableElement::addSubresourceAttributeURLs(urls);
+ SVGGraphicsElement::addSubresourceAttributeURLs(urls);
addSubresourceURL(urls, document()->completeURL(href()));
}
@@ -235,7 +234,7 @@ void SVGImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
void SVGImageElement::didMoveToNewDocument(Document* oldDocument)
{
m_imageLoader.elementDidMoveToNewDocument();
- SVGStyledTransformableElement::didMoveToNewDocument(oldDocument);
+ SVGGraphicsElement::didMoveToNewDocument(oldDocument);
}
}

Powered by Google App Engine
This is Rietveld 408576698