summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/css/css_layout_function_value.h
blob: e3dc3760b7f30375e325207d374a193f7cdae3f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2018 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.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_LAYOUT_FUNCTION_VALUE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_LAYOUT_FUNCTION_VALUE_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/css/css_value.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"

namespace blink {

class CSSCustomIdentValue;

namespace cssvalue {

class CSSLayoutFunctionValue : public CSSValue {
 public:
  CSSLayoutFunctionValue(CSSCustomIdentValue* name, bool is_inline);
  ~CSSLayoutFunctionValue();

  String CustomCSSText() const;
  AtomicString GetName() const;
  bool IsInline() const { return is_inline_; }

  bool Equals(const CSSLayoutFunctionValue&) const;
  void TraceAfterDispatch(blink::Visitor*);

 private:
  Member<CSSCustomIdentValue> name_;
  bool is_inline_;
};

}  // namespace cssvalue

template <>
struct DowncastTraits<cssvalue::CSSLayoutFunctionValue> {
  static bool AllowFrom(const CSSValue& value) {
    return value.IsLayoutFunctionValue();
  }
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_LAYOUT_FUNCTION_VALUE_H_