Index: third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h |
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h b/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..473270ec413d92d81537d3fad235f9d058782c66 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "core/CSSPropertyNames.h" |
+ |
+namespace blink { |
+ |
+class CSSValue; |
+class CSSParserTokenRange; |
+class CSSParserContext; |
+ |
+// Stores function pointers matching those declared in CSSPropertyAPI. |
+struct CSSPropertyDescriptor { |
+ const CSSValue* (*parseSingleValue)(CSSParserTokenRange&, |
+ const CSSParserContext&); |
+ CSSPropertyID id; |
+ |
+ // Stores whether or not this descriptor is for a valid property. Do not |
+ // access the contents of this descriptor unless this value is true. |
+ // TODO(aazzam): Remove this once the API has been implemented for all |
+ // properties. |
+ bool isValid; |
Z_DONOTUSE
2016/12/08 01:00:18
Same here. If this is temporary, let's make it cle
aazzam
2016/12/08 02:27:10
On second thoughts this isn't that temporary - eve
Z_DONOTUSE
2016/12/08 03:18:00
What are cases where we'd want to keep this? Sorry
aazzam
2016/12/08 04:16:36
Okay - for now, since we have properties which we
|
+ |
+ // Returns the corresponding CSSPropertyDescriptor for a given CSSPropertyID. |
+ // Use this function to access the API for a property. Returns a descriptor |
+ // with isValid set to false if no descriptor exists for this ID. |
+ static const CSSPropertyDescriptor& get(CSSPropertyID); |
+}; |
+ |
+} // namespace blink |