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

Unified Diff: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h

Issue 2330893002: CSS Properties and Values API: Support more syntax strings (Closed)
Patch Set: move some syntax parsing logic into helpers Created 4 years, 3 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: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
diff --git a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
index fef230697c1665313462b4307adfa01461c6d839..2589f56e32caad8f040d11ba169b7b7fc10a69df 100644
--- a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
+++ b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
@@ -13,18 +13,33 @@ class CSSValue;
enum class CSSSyntaxType {
TokenStream,
+ Ident,
Length,
- // TODO(timloh): Add all the other types
+ Number,
+ Percentage,
+ LengthPercentage,
+ Color,
+ Image,
+ Url,
+ Integer,
+ Angle,
+ Time,
+ Resolution,
+ TransformFunction,
+ CustomIdent,
};
struct CSSSyntaxComponent {
- CSSSyntaxComponent(CSSSyntaxType type)
+ CSSSyntaxComponent(CSSSyntaxType type, const String& string, bool repeatable)
: m_type(type)
+ , m_string(string)
+ , m_repeatable(repeatable)
{
}
CSSSyntaxType m_type;
- // TODO(timloh): This will need to support arbitrary idents and list types
+ String m_string; // Only used when m_type is CSSSyntaxType::Ident
+ bool m_repeatable;
};
class CSSSyntaxDescriptor {

Powered by Google App Engine
This is Rietveld 408576698