/src/serenity/Userland/Libraries/LibWeb/CSS/StyleValues/DisplayStyleValue.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2023, Emil Militzer <emil.militzer@posteo.de> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/CSS/CSSStyleValue.h> |
10 | | #include <LibWeb/CSS/Display.h> |
11 | | |
12 | | namespace Web::CSS { |
13 | | |
14 | | class DisplayStyleValue : public StyleValueWithDefaultOperators<DisplayStyleValue> { |
15 | | public: |
16 | | static ValueComparingNonnullRefPtr<DisplayStyleValue> create(Display const&); |
17 | | virtual ~DisplayStyleValue() override = default; |
18 | | |
19 | 0 | virtual String to_string() const override { return m_display.to_string(); } |
20 | | |
21 | 0 | Display display() const { return m_display; } |
22 | | |
23 | 0 | bool properties_equal(DisplayStyleValue const& other) const { return m_display == other.m_display; } |
24 | | |
25 | | private: |
26 | | explicit DisplayStyleValue(Display const& display) |
27 | 0 | : StyleValueWithDefaultOperators(Type::Display) |
28 | 0 | , m_display(display) |
29 | 0 | { |
30 | 0 | } |
31 | | |
32 | | Display m_display; |
33 | | }; |
34 | | |
35 | | } |