chromium/third_party/blink/renderer/build/scripts/core/css/templates/css_value_keywords.h.tmpl

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef {{header_guard}}
#define {{header_guard}}

#include <string.h>
#include <stdint.h>

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_mode.h"

namespace blink {

enum class CSSValueID {
  kInvalid = 0,
{% for keyword in value_keywords %}
  {{keyword.enum_name}} = {{keyword.enum_value}},
{% endfor %}
};

const int numCSSValueKeywords = {{value_keywords_count}};
const size_t maxCSSValueKeywordLength = {{max_value_keyword_length}};

inline bool IsValidCSSValueID(CSSValueID id)
{
    return id != CSSValueID::kInvalid;
}

CORE_EXPORT const char* getValueName(CSSValueID);
bool isValueAllowedInMode(CSSValueID id, CSSParserMode mode);

}  // namespace blink

#endif  // {{header_guard}}