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

Side by Side Diff: Source/core/svg/SVGForeignObjectElement.cpp

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove debug print Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGlyphRefElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 #include "XLinkNames.h" 24 #include "XLinkNames.h"
25 #include "core/rendering/svg/RenderSVGForeignObject.h" 25 #include "core/rendering/svg/RenderSVGForeignObject.h"
26 #include "core/rendering/svg/RenderSVGResource.h" 26 #include "core/rendering/svg/RenderSVGResource.h"
27 #include "core/svg/SVGElementInstance.h" 27 #include "core/svg/SVGElementInstance.h"
28 #include "core/svg/SVGLength.h" 28 #include "core/svg/SVGLength.h"
29 #include "wtf/Assertions.h" 29 #include "wtf/Assertions.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 // Animated property definitions 33 // Animated property definitions
34 DEFINE_ANIMATED_STRING(SVGForeignObjectElement, XLinkNames::hrefAttr, Href, href )
35 34
36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement)
37 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
39 END_REGISTER_ANIMATED_PROPERTIES 37 END_REGISTER_ANIMATED_PROPERTIES
40 38
41 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) 39 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document)
42 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) 40 : SVGGraphicsElement(SVGNames::foreignObjectTag, document)
43 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len gthModeWidth))) 41 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len gthModeWidth)))
44 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len gthModeHeight))) 42 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len gthModeHeight)))
45 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(LengthModeWidth))) 43 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(LengthModeWidth)))
46 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(LengthModeHeight))) 44 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(LengthModeHeight)))
47 { 45 {
48 ScriptWrappable::init(this); 46 ScriptWrappable::init(this);
49 47
50 addToPropertyMap(m_x); 48 addToPropertyMap(m_x);
51 addToPropertyMap(m_y); 49 addToPropertyMap(m_y);
52 addToPropertyMap(m_width); 50 addToPropertyMap(m_width);
53 addToPropertyMap(m_height); 51 addToPropertyMap(m_height);
54
55 registerAnimatedPropertiesForSVGForeignObjectElement(); 52 registerAnimatedPropertiesForSVGForeignObjectElement();
56 } 53 }
57 54
58 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(Document& do cument) 55 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(Document& do cument)
59 { 56 {
60 return adoptRef(new SVGForeignObjectElement(document)); 57 return adoptRef(new SVGForeignObjectElement(document));
61 } 58 }
62 59
63 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName ) 60 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName )
64 { 61 {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 135
139 bool SVGForeignObjectElement::selfHasRelativeLengths() const 136 bool SVGForeignObjectElement::selfHasRelativeLengths() const
140 { 137 {
141 return m_x->currentValue()->isRelative() 138 return m_x->currentValue()->isRelative()
142 || m_y->currentValue()->isRelative() 139 || m_y->currentValue()->isRelative()
143 || m_width->currentValue()->isRelative() 140 || m_width->currentValue()->isRelative()
144 || m_height->currentValue()->isRelative(); 141 || m_height->currentValue()->isRelative();
145 } 142 }
146 143
147 } 144 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGlyphRefElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698