summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authormartinfalisse <martinmotteditfalisse@gmail.com>2023-04-29 17:59:07 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-30 05:56:10 +0200
commitbebf4363dbb7572f611713db57684794f44e5bf0 (patch)
tree79d5cfb2c379641fa7a7621b59a5028a00875343 /Userland
parent5236819f58b1ace2197d099c0d15bddd6a541cb4 (diff)
downloadserenity-bebf4363dbb7572f611713db57684794f44e5bf0.zip
LibWeb: Change name of GridTrackSizeListStyleValue
Change the name of GridTrackSizeStyleValue to GridTrackSizeListStyleValue which is more accurate.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/CMakeLists.txt2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp16
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.cpp29
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h (renamed from Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h)12
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.cpp29
-rw-r--r--Userland/Libraries/LibWeb/Forward.h2
11 files changed, 55 insertions, 55 deletions
diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt
index ae22ebcc08..df8c83d144 100644
--- a/Userland/Libraries/LibWeb/CMakeLists.txt
+++ b/Userland/Libraries/LibWeb/CMakeLists.txt
@@ -87,7 +87,7 @@ set(SOURCES
CSS/StyleValues/GridTemplateAreaStyleValue.cpp
CSS/StyleValues/GridTrackPlacementStyleValue.cpp
CSS/StyleValues/GridTrackPlacementShorthandStyleValue.cpp
- CSS/StyleValues/GridTrackSizeStyleValue.cpp
+ CSS/StyleValues/GridTrackSizeListStyleValue.cpp
CSS/StyleValues/IdentifierStyleValue.cpp
CSS/StyleValues/ImageStyleValue.cpp
CSS/StyleValues/LengthStyleValue.cpp
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 7266b3473e..4cd3326e2e 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -51,7 +51,7 @@
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
-#include <LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h>
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/ImageStyleValue.h>
#include <LibWeb/CSS/StyleValues/InheritStyleValue.h>
@@ -6269,7 +6269,7 @@ Optional<CSS::ExplicitGridTrack> Parser::parse_track_sizing_function(ComponentVa
}
}
-RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const& component_values)
+RefPtr<StyleValue> Parser::parse_grid_track_size_list(Vector<ComponentValue> const& component_values)
{
Vector<CSS::ExplicitGridTrack> track_list;
Vector<Vector<String>> line_names_list;
@@ -6279,11 +6279,11 @@ RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const&
auto token = tokens.next_token();
if (token.is_block()) {
if (last_object_was_line_names)
- return GridTrackSizeStyleValue::make_auto();
+ return GridTrackSizeListStyleValue::make_auto();
last_object_was_line_names = true;
Vector<String> line_names;
if (!token.block().is_square())
- return GridTrackSizeStyleValue::make_auto();
+ return GridTrackSizeListStyleValue::make_auto();
TokenStream block_tokens { token.block().values() };
while (block_tokens.has_next_token()) {
auto current_block_token = block_tokens.next_token();
@@ -6298,7 +6298,7 @@ RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const&
last_object_was_line_names = false;
auto track_sizing_function = parse_track_sizing_function(token);
if (!track_sizing_function.has_value())
- return GridTrackSizeStyleValue::make_auto();
+ return GridTrackSizeListStyleValue::make_auto();
// FIXME: Handle multiple repeat values (should combine them here, or remove
// any other ones if the first one is auto-fill, etc.)
track_list.append(track_sizing_function.value());
@@ -6306,7 +6306,7 @@ RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const&
}
while (line_names_list.size() <= track_list.size())
line_names_list.append({});
- return GridTrackSizeStyleValue::create(CSS::GridTrackSizeList(track_list, line_names_list));
+ return GridTrackSizeListStyleValue::create(CSS::GridTrackSizeList(track_list, line_names_list));
}
RefPtr<StyleValue> Parser::parse_grid_track_placement(Vector<ComponentValue> const& component_values)
@@ -6709,11 +6709,11 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::GridTemplateColumns:
- if (auto parsed_value = parse_grid_track_sizes(component_values))
+ if (auto parsed_value = parse_grid_track_size_list(component_values))
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::GridTemplateRows:
- if (auto parsed_value = parse_grid_track_sizes(component_values))
+ if (auto parsed_value = parse_grid_track_size_list(component_values))
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::ListStyle:
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
index ac2fbd9f2e..d369b8f434 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
@@ -318,7 +318,7 @@ private:
RefPtr<StyleValue> parse_text_decoration_line_value(TokenStream<ComponentValue>&);
RefPtr<StyleValue> parse_transform_value(Vector<ComponentValue> const&);
RefPtr<StyleValue> parse_transform_origin_value(Vector<ComponentValue> const&);
- RefPtr<StyleValue> parse_grid_track_sizes(Vector<ComponentValue> const&);
+ RefPtr<StyleValue> parse_grid_track_size_list(Vector<ComponentValue> const&);
RefPtr<StyleValue> parse_grid_track_placement(Vector<ComponentValue> const&);
RefPtr<StyleValue> parse_grid_track_placement_shorthand_value(Vector<ComponentValue> const&);
RefPtr<StyleValue> parse_grid_template_areas_value(Vector<ComponentValue> const&);
diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
index 0422efd542..0dd3e3e7ec 100644
--- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
@@ -23,7 +23,7 @@
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
-#include <LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h>
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/InitialStyleValue.h>
#include <LibWeb/CSS/StyleValues/LengthStyleValue.h>
@@ -485,9 +485,9 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
case CSS::PropertyID::GridRowStart:
return GridTrackPlacementStyleValue::create(layout_node.computed_values().grid_row_start());
case CSS::PropertyID::GridTemplateColumns:
- return GridTrackSizeStyleValue::create(layout_node.computed_values().grid_template_columns());
+ return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_columns());
case CSS::PropertyID::GridTemplateRows:
- return GridTrackSizeStyleValue::create(layout_node.computed_values().grid_template_rows());
+ return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_rows());
case CSS::PropertyID::Height:
return style_value_for_size(layout_node.computed_values().height());
case CSS::PropertyID::ImageRendering:
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 9d121cb76c..41bd3e3f40 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -13,7 +13,7 @@
#include <LibWeb/CSS/StyleValues/ContentStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
-#include <LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h>
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
#include <LibWeb/CSS/StyleValues/RectStyleValue.h>
#include <LibWeb/CSS/StyleValues/ShadowStyleValue.h>
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
index 22d1c32443..7d52033100 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
@@ -30,7 +30,7 @@
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
-#include <LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h>
+#include <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h>
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/ImageStyleValue.h>
#include <LibWeb/CSS/StyleValues/InheritStyleValue.h>
@@ -230,10 +230,10 @@ LengthStyleValue const& StyleValue::as_length() const
return static_cast<LengthStyleValue const&>(*this);
}
-GridTrackSizeStyleValue const& StyleValue::as_grid_track_size_list() const
+GridTrackSizeListStyleValue const& StyleValue::as_grid_track_size_list() const
{
VERIFY(is_grid_track_size_list());
- return static_cast<GridTrackSizeStyleValue const&>(*this);
+ return static_cast<GridTrackSizeListStyleValue const&>(*this);
}
LinearGradientStyleValue const& StyleValue::as_linear_gradient() const
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h
index f71a0af5ae..b6b203e39b 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h
@@ -208,7 +208,7 @@ public:
GridTemplateAreaStyleValue const& as_grid_template_area() const;
GridTrackPlacementShorthandStyleValue const& as_grid_track_placement_shorthand() const;
GridTrackPlacementStyleValue const& as_grid_track_placement() const;
- GridTrackSizeStyleValue const& as_grid_track_size_list() const;
+ GridTrackSizeListStyleValue const& as_grid_track_size_list() const;
IdentifierStyleValue const& as_identifier() const;
ImageStyleValue const& as_image() const;
InheritStyleValue const& as_inherit() const;
@@ -255,7 +255,7 @@ public:
GridTemplateAreaStyleValue& as_grid_template_area() { return const_cast<GridTemplateAreaStyleValue&>(const_cast<StyleValue const&>(*this).as_grid_template_area()); }
GridTrackPlacementShorthandStyleValue& as_grid_track_placement_shorthand() { return const_cast<GridTrackPlacementShorthandStyleValue&>(const_cast<StyleValue const&>(*this).as_grid_track_placement_shorthand()); }
GridTrackPlacementStyleValue& as_grid_track_placement() { return const_cast<GridTrackPlacementStyleValue&>(const_cast<StyleValue const&>(*this).as_grid_track_placement()); }
- GridTrackSizeStyleValue& as_grid_track_size_list() { return const_cast<GridTrackSizeStyleValue&>(const_cast<StyleValue const&>(*this).as_grid_track_size_list()); }
+ GridTrackSizeListStyleValue& as_grid_track_size_list() { return const_cast<GridTrackSizeListStyleValue&>(const_cast<StyleValue const&>(*this).as_grid_track_size_list()); }
IdentifierStyleValue& as_identifier() { return const_cast<IdentifierStyleValue&>(const_cast<StyleValue const&>(*this).as_identifier()); }
ImageStyleValue& as_image() { return const_cast<ImageStyleValue&>(const_cast<StyleValue const&>(*this).as_image()); }
InheritStyleValue& as_inherit() { return const_cast<InheritStyleValue&>(const_cast<StyleValue const&>(*this).as_inherit()); }
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.cpp
new file mode 100644
index 0000000000..be0cd8962a
--- /dev/null
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.cpp
@@ -0,0 +1,29 @@
+/*
+ * 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 "GridTrackSizeListStyleValue.h"
+
+namespace Web::CSS {
+
+ErrorOr<String> GridTrackSizeListStyleValue::to_string() const
+{
+ return m_grid_track_size_list.to_string();
+}
+
+ValueComparingNonnullRefPtr<GridTrackSizeListStyleValue> GridTrackSizeListStyleValue::create(CSS::GridTrackSizeList grid_track_size_list)
+{
+ return adopt_ref(*new GridTrackSizeListStyleValue(grid_track_size_list));
+}
+
+ValueComparingNonnullRefPtr<GridTrackSizeListStyleValue> GridTrackSizeListStyleValue::make_auto()
+{
+ return adopt_ref(*new GridTrackSizeListStyleValue(CSS::GridTrackSizeList()));
+}
+
+}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h
index f73a818878..26ac4c56a1 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h
@@ -14,21 +14,21 @@
namespace Web::CSS {
-class GridTrackSizeStyleValue final : public StyleValueWithDefaultOperators<GridTrackSizeStyleValue> {
+class GridTrackSizeListStyleValue final : public StyleValueWithDefaultOperators<GridTrackSizeListStyleValue> {
public:
- static ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> create(CSS::GridTrackSizeList grid_track_size_list);
- virtual ~GridTrackSizeStyleValue() override = default;
+ static ValueComparingNonnullRefPtr<GridTrackSizeListStyleValue> create(CSS::GridTrackSizeList grid_track_size_list);
+ virtual ~GridTrackSizeListStyleValue() override = default;
- static ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> make_auto();
+ static ValueComparingNonnullRefPtr<GridTrackSizeListStyleValue> make_auto();
CSS::GridTrackSizeList grid_track_size_list() const { return m_grid_track_size_list; }
virtual ErrorOr<String> to_string() const override;
- bool properties_equal(GridTrackSizeStyleValue const& other) const { return m_grid_track_size_list == other.m_grid_track_size_list; }
+ bool properties_equal(GridTrackSizeListStyleValue const& other) const { return m_grid_track_size_list == other.m_grid_track_size_list; }
private:
- explicit GridTrackSizeStyleValue(CSS::GridTrackSizeList grid_track_size_list)
+ explicit GridTrackSizeListStyleValue(CSS::GridTrackSizeList grid_track_size_list)
: StyleValueWithDefaultOperators(Type::GridTrackSizeList)
, m_grid_track_size_list(grid_track_size_list)
{
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.cpp
deleted file mode 100644
index 53eec27e0b..0000000000
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridTrackSizeStyleValue.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 "GridTrackSizeStyleValue.h"
-
-namespace Web::CSS {
-
-ErrorOr<String> GridTrackSizeStyleValue::to_string() const
-{
- return m_grid_track_size_list.to_string();
-}
-
-ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> GridTrackSizeStyleValue::create(CSS::GridTrackSizeList grid_track_size_list)
-{
- return adopt_ref(*new GridTrackSizeStyleValue(grid_track_size_list));
-}
-
-ValueComparingNonnullRefPtr<GridTrackSizeStyleValue> GridTrackSizeStyleValue::make_auto()
-{
- return adopt_ref(*new GridTrackSizeStyleValue(CSS::GridTrackSizeList()));
-}
-
-}
diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h
index eb75da5b53..d7d92e5999 100644
--- a/Userland/Libraries/LibWeb/Forward.h
+++ b/Userland/Libraries/LibWeb/Forward.h
@@ -105,7 +105,7 @@ class GridTrackPlacement;
class GridTrackPlacementShorthandStyleValue;
class GridTrackPlacementStyleValue;
class GridTrackSizeList;
-class GridTrackSizeStyleValue;
+class GridTrackSizeListStyleValue;
class IdentifierStyleValue;
class ImageStyleValue;
class InheritStyleValue;