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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h

Issue 2533673002: Added CSSPropertyAPI and CSS padding properties which implement this API (Closed)
Patch Set: renamed isValid to temporaryCanReadValue Created 4 years 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: 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..5d76e3247cd43283bd3c2169fb660c7708a76de2
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h
@@ -0,0 +1,28 @@
+// 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&);
+
+ // Stores whether or not this descriptor is for a valid property. Do not
+ // access the contents of this descriptor unless this value is true.
+ bool temporaryCanReadValue;
alancutter (OOO until 2018) 2016/12/11 23:31:15 TODO: Remove this once the switch in CSSPropertyPa
alancutter (OOO until 2018) 2016/12/11 23:37:04 Alternate idea: Make get() return a const CSSPrope
aazzam 2016/12/12 03:37:32 I've kept it as returning a reference rather than
Z_DONOTUSE 2016/12/12 05:50:18 I think Alan meant to add the TODO as a comment. W
+
+ // 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

Powered by Google App Engine
This is Rietveld 408576698