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

Unified Diff: Source/core/animation/css/CSSTransitionData.h

Issue 298043007: Support unknown property strings in transition-property (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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/animation/css/CSSTransitionData.h
diff --git a/Source/core/animation/css/CSSTransitionData.h b/Source/core/animation/css/CSSTransitionData.h
index ab52220f6e12f0977c75ac74e119fc066be05466..c23239af3c69f2e9db345eaf87597be9165103de 100644
--- a/Source/core/animation/css/CSSTransitionData.h
+++ b/Source/core/animation/css/CSSTransitionData.h
@@ -16,12 +16,11 @@ public:
enum TransitionPropertyType {
TransitionNone,
TransitionSingleProperty,
+ TransitionUnknown,
TransitionAll
};
- // FIXME: This is incorrect as per CSS3 Transitions, we should allow the
- // user to specify unknown properties and keep them in the list (crbug.com/304020).
- // Also, we shouldn't allow 'none' to be used alongside other properties.
+ // FIXME: We shouldn't allow 'none' to be used alongside other properties.
struct TransitionProperty {
TransitionProperty(CSSPropertyID id)
: propertyType(TransitionSingleProperty)
@@ -30,17 +29,25 @@ public:
ASSERT(id != CSSPropertyInvalid);
}
+ TransitionProperty(const String& string)
+ : propertyType(TransitionUnknown)
+ , propertyId(CSSPropertyInvalid)
+ , propertyString(string)
+ {
+ }
+
TransitionProperty(TransitionPropertyType type)
: propertyType(type)
, propertyId(CSSPropertyInvalid)
{
- ASSERT(type != TransitionSingleProperty);
+ ASSERT(type == TransitionNone || type == TransitionAll);
}
- bool operator==(const TransitionProperty& other) const { return propertyType == other.propertyType && propertyId == other.propertyId; }
+ bool operator==(const TransitionProperty& other) const { return propertyType == other.propertyType && propertyId == other.propertyId && propertyString == other.propertyString; }
TransitionPropertyType propertyType;
CSSPropertyID propertyId;
+ String propertyString;
};
static PassOwnPtrWillBeRawPtr<CSSTransitionData> create()

Powered by Google App Engine
This is Rietveld 408576698