Meta: Enforce newlines around namespaces

This has come up several times during code review, so let's just enforce
it using a new clang-format 20 option.
This commit is contained in:
Timothy Flynn 2025-05-13 07:06:33 -04:00 committed by Andrew Kaster
commit 7280ed6312
Notes: github-actions[bot] 2025-05-14 08:06:48 +00:00
206 changed files with 448 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#include <LibWeb/DOM/Element.h>
namespace Web::CSS {
GC_DEFINE_ALLOCATOR(CascadedProperties);
CascadedProperties::CascadedProperties() = default;

View file

@ -70,4 +70,5 @@ constexpr bool is_greater_than_maximum_allowed_code_point(u32 code_point)
// The greatest code point defined by Unicode: U+10FFFF.
return code_point > 0x10FFFF;
}
}

View file

@ -10,6 +10,7 @@
#include <LibWeb/Forward.h>
namespace Web::CSS {
class Frequency {
public:
enum class Type {

View file

@ -37,4 +37,5 @@ private:
String m_media;
bool m_matches;
};
}

View file

@ -90,6 +90,7 @@ private:
double m_value { 0 };
Type m_type;
};
}
template<>

View file

@ -47,6 +47,7 @@ public:
private:
Variant<Token, Function, SimpleBlock> m_value;
};
}
template<>

View file

@ -41,6 +41,7 @@ namespace Web::CSS::Parser {
class PropertyDependencyNode;
namespace CalcParsing {
struct Operator {
char delim;
};
@ -61,6 +62,7 @@ struct InvertNode {
struct NegateNode {
Node child;
};
}
enum class ParsingMode {

View file

@ -106,4 +106,5 @@ private:
Token::Position m_position;
Token::Position m_prev_position;
};
}

View file

@ -52,4 +52,5 @@ private:
Type m_type;
double m_value { 0 };
};
}

View file

@ -105,10 +105,12 @@ struct FontFaceKey {
namespace AK {
namespace Detail {
template<>
inline constexpr bool IsHashCompatible<Web::CSS::FontFaceKey, Web::CSS::OwnFontFaceKey> = true;
template<>
inline constexpr bool IsHashCompatible<Web::CSS::OwnFontFaceKey, Web::CSS::FontFaceKey> = true;
}
template<>

View file

@ -29,6 +29,7 @@ struct StyleSheetIdentifier {
StringView style_sheet_identifier_type_to_string(StyleSheetIdentifier::Type);
Optional<StyleSheetIdentifier::Type> style_sheet_identifier_type_from_string(StringView);
}
namespace IPC {

View file

@ -10,6 +10,7 @@
#include "BackgroundSizeStyleValue.h"
namespace Web::CSS {
BackgroundSizeStyleValue::BackgroundSizeStyleValue(LengthPercentage size_x, LengthPercentage size_y)
: StyleValueWithDefaultOperators(Type::BackgroundSize)
, m_properties { .size_x = size_x, .size_y = size_y }

View file

@ -41,4 +41,5 @@ private:
bool operator==(Properties const&) const = default;
} m_properties;
};
}

View file

@ -31,4 +31,5 @@ Color mark_text(PreferredColorScheme);
Color selected_item(PreferredColorScheme);
Color selected_item_text(PreferredColorScheme);
Color visited_text(PreferredColorScheme);
}

View file

@ -39,4 +39,5 @@ private:
double m_elapsed_time {};
String m_pseudo_element {};
};
}

View file

@ -12,6 +12,7 @@
#include <LibWeb/CSS/Enums.h>
namespace Web::CSS {
// https://drafts.csswg.org/css-values-5/#request-url-modifiers
class RequestURLModifier {
public: