summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleComputer.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.cpp10
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.h20
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp1
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.cpp24
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h37
10 files changed, 68 insertions, 29 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 704a848d3c..48217dc9f5 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -46,6 +46,7 @@
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Dump.h>
#include <LibWeb/Infra/Strings.h>
diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
index 4e83ea96a0..b59d14898c 100644
--- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
@@ -20,6 +20,7 @@
#include <LibWeb/CSS/StyleValues/ColorStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/Viewport.h>
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index ec409c6d00..c788351295 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -36,6 +36,7 @@
#include <LibWeb/CSS/StyleValues/FontStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/FontCache.h>
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 7eb8e86cf0..19190b23d2 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -12,6 +12,7 @@
#include <LibWeb/CSS/StyleValues/AngleStyleValue.h>
#include <LibWeb/CSS/StyleValues/ContentStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
#include <LibWeb/FontCache.h>
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/Node.h>
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
index 77ff38b4d9..638332b328 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
@@ -28,6 +28,7 @@
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Loader/LoadRequest.h>
@@ -1030,11 +1031,6 @@ CalculatedStyleValue::CalculationResult CalculatedStyleValue::CalcNumberSumPartW
return value->resolve(layout_node, percentage_basis);
}
-ErrorOr<String> GridTrackPlacementStyleValue::to_string() const
-{
- return m_grid_track_placement.to_string();
-}
-
ErrorOr<String> GridTrackSizeStyleValue::to_string() const
{
return m_grid_track_size_list.to_string();
@@ -1924,10 +1920,6 @@ ErrorOr<String> StyleValueList::to_string() const
return builder.to_string();
}
-ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue> GridTrackPlacementStyleValue::create(CSS::GridTrackPlacement grid_track_placement)
-{
- return adopt_ref(*new GridTrackPlacementStyleValue(grid_track_placement));
-}
ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> GridTrackSizeStyleValue::create(CSS::GridTrackSizeList grid_track_size_list)
{
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h
index affda99fd8..ee972535ac 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h
@@ -661,26 +661,6 @@ private:
NonnullOwnPtr<CalcSum> m_expression;
};
-class GridTrackPlacementStyleValue final : public StyleValueWithDefaultOperators<GridTrackPlacementStyleValue> {
-public:
- static ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue> create(CSS::GridTrackPlacement grid_track_placement);
- virtual ~GridTrackPlacementStyleValue() override = default;
-
- CSS::GridTrackPlacement const& grid_track_placement() const { return m_grid_track_placement; }
- virtual ErrorOr<String> to_string() const override;
-
- bool properties_equal(GridTrackPlacementStyleValue const& other) const { return m_grid_track_placement == other.m_grid_track_placement; };
-
-private:
- explicit GridTrackPlacementStyleValue(CSS::GridTrackPlacement grid_track_placement)
- : StyleValueWithDefaultOperators(Type::GridTrackPlacement)
- , m_grid_track_placement(grid_track_placement)
- {
- }
-
- CSS::GridTrackPlacement m_grid_track_placement;
-};
-
class GridTrackSizeStyleValue final : public StyleValueWithDefaultOperators<GridTrackSizeStyleValue> {
public:
static ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> create(CSS::GridTrackSizeList grid_track_size_list);
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
index bf9ad50c55..4b5ad35bc0 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
@@ -8,6 +8,7 @@
*/
#include "GridAreaShorthandStyleValue.h"
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
namespace Web::CSS {
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp
index 808387ead5..52e7713fc4 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp
@@ -8,6 +8,7 @@
*/
#include "GridTrackPlacementShorthandStyleValue.h"
+#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
namespace Web::CSS {
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.cpp
new file mode 100644
index 0000000000..ea5f8461f2
--- /dev/null
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
+ * Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
+ * Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include "GridTrackPlacementStyleValue.h"
+
+namespace Web::CSS {
+
+ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue> GridTrackPlacementStyleValue::create(CSS::GridTrackPlacement grid_track_placement)
+{
+ return adopt_ref(*new GridTrackPlacementStyleValue(grid_track_placement));
+}
+
+ErrorOr<String> GridTrackPlacementStyleValue::to_string() const
+{
+ return m_grid_track_placement.to_string();
+}
+
+}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h
new file mode 100644
index 0000000000..743ea62c4f
--- /dev/null
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
+ * Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
+ * Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <LibWeb/CSS/GridTrackPlacement.h>
+#include <LibWeb/CSS/StyleValue.h>
+
+namespace Web::CSS {
+
+class GridTrackPlacementStyleValue final : public StyleValueWithDefaultOperators<GridTrackPlacementStyleValue> {
+public:
+ static ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue> create(GridTrackPlacement grid_track_placement);
+ virtual ~GridTrackPlacementStyleValue() override = default;
+
+ GridTrackPlacement const& grid_track_placement() const { return m_grid_track_placement; }
+ virtual ErrorOr<String> to_string() const override;
+
+ bool properties_equal(GridTrackPlacementStyleValue const& other) const { return m_grid_track_placement == other.m_grid_track_placement; };
+
+private:
+ explicit GridTrackPlacementStyleValue(GridTrackPlacement grid_track_placement)
+ : StyleValueWithDefaultOperators(Type::GridTrackPlacement)
+ , m_grid_track_placement(grid_track_placement)
+ {
+ }
+
+ GridTrackPlacement m_grid_track_placement;
+};
+
+}