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

Unified Diff: Source/core/svg/properties/SVGAnimatedPropertyMacros.h

Issue 141793002: Allow determining if an SVG value has been specified (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again. Created 6 years, 11 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
« no previous file with comments | « Source/core/svg/properties/NewSVGAnimatedProperty.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/SVGAnimatedPropertyMacros.h
diff --git a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
index 74e377f6e6bf33a00d8143a75daed7c18ca86e00..b6658a8e3509d33f78a0d508b93da58c0278825f 100644
--- a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
@@ -103,6 +103,14 @@ const SVGPropertyInfo* OwnerType::LowerProperty##PropertyInfo() { \
&OwnerType::lookupOrCreate##UpperProperty##Wrapper)); \
return &s_propertyInfo; \
} \
+bool OwnerType::LowerProperty##Specified() const \
+{ \
+ if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType>(this, LowerProperty##PropertyInfo())) { \
+ if (wrapper->isAnimating()) \
+ return true; \
+ } \
+ return hasAttribute(SVGDOMAttributeIdentifier); \
+} \
PropertyType& OwnerType::LowerProperty##CurrentValue() const \
{ \
if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType>(this, LowerProperty##PropertyInfo())) { \
@@ -161,6 +169,7 @@ public: \
#define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
public: \
static const SVGPropertyInfo* LowerProperty##PropertyInfo(); \
+ bool LowerProperty##Specified() const; \
PropertyType& LowerProperty##CurrentValue() const; \
PropertyType& LowerProperty##BaseValue() const; \
void set##UpperProperty##BaseValue(const PropertyType& type); \
« no previous file with comments | « Source/core/svg/properties/NewSVGAnimatedProperty.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698