chromium/third_party/blink/renderer/core/css/properties/css_property.h

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_CSS_PROPERTY_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_CSS_PROPERTY_H_

#include <memory>

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/css_property_name.h"
#include "third_party/blink/renderer/core/css/css_value.h"
#include "third_party/blink/renderer/core/css/properties/css_direction_aware_resolver.h"
#include "third_party/blink/renderer/core/css/properties/css_unresolved_property.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/text/writing_direction_mode.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

class ComputedStyle;
class CrossThreadStyleValue;
class ExecutionContext;
class LayoutObject;

// Determines how far to process a value requested from a computed style.
enum class CSSValuePhase {};

// For use in Get(Un)VisitedProperty(), although you could probably
// use them yourself if you wanted to; contains a mapping from each
// CSSPropertyID to its visited/unvisited counterpart, or kInvalid
// if none exists. They use small integer types (even though they
// actually contain CSSPropertyIDs) because they can be quite hot
// in the cache, e.g., during cascade expansion.
extern CORE_EXPORT const uint8_t kPropertyVisitedIDs[];
extern CORE_EXPORT const uint16_t kPropertyUnvisitedIDs[];

class CORE_EXPORT CSSProperty : public CSSUnresolvedProperty {};
static_assert;

template <>
struct DowncastTraits<CSSProperty> {};

CORE_EXPORT const CSSProperty& GetCSSPropertyVariable();

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_CSS_PROPERTY_H_