diff options
Diffstat (limited to 'Userland/Libraries/LibWeb')
154 files changed, 597 insertions, 597 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h index 7b579f2805..04a662b5b0 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h @@ -42,11 +42,11 @@ public: LocationObject* location_object() { return m_location_object; } LocationObject const* location_object() const { return m_location_object; } - JS::Object* web_prototype(const String& class_name) { return m_prototypes.get(class_name).value_or(nullptr); } - JS::NativeFunction* web_constructor(const String& class_name) { return m_constructors.get(class_name).value_or(nullptr); } + JS::Object* web_prototype(String const& class_name) { return m_prototypes.get(class_name).value_or(nullptr); } + JS::NativeFunction* web_constructor(String const& class_name) { return m_constructors.get(class_name).value_or(nullptr); } template<typename T> - JS::Object& ensure_web_prototype(const String& class_name) + JS::Object& ensure_web_prototype(String const& class_name) { auto it = m_prototypes.find(class_name); if (it != m_prototypes.end()) @@ -57,7 +57,7 @@ public: } template<typename T> - JS::NativeFunction& ensure_web_constructor(const String& class_name) + JS::NativeFunction& ensure_web_constructor(String const& class_name) { auto it = m_constructors.find(class_name); if (it != m_constructors.end()) diff --git a/Userland/Libraries/LibWeb/Bindings/Wrappable.h b/Userland/Libraries/LibWeb/Bindings/Wrappable.h index 36a581f399..26d2fbcc1d 100644 --- a/Userland/Libraries/LibWeb/Bindings/Wrappable.h +++ b/Userland/Libraries/LibWeb/Bindings/Wrappable.h @@ -19,7 +19,7 @@ public: void set_wrapper(Wrapper&); Wrapper* wrapper() { return m_wrapper; } - const Wrapper* wrapper() const { return m_wrapper; } + Wrapper const* wrapper() const { return m_wrapper; } private: WeakPtr<Wrapper> m_wrapper; diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h index 37c219005e..667887d697 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h @@ -32,8 +32,8 @@ public: bool has_import_result() const { return !m_style_sheet.is_null(); } RefPtr<CSSStyleSheet> loaded_style_sheet() { return m_style_sheet; } - const RefPtr<CSSStyleSheet> loaded_style_sheet() const { return m_style_sheet; } - void set_style_sheet(const RefPtr<CSSStyleSheet>& style_sheet) { m_style_sheet = style_sheet; } + RefPtr<CSSStyleSheet> const loaded_style_sheet() const { return m_style_sheet; } + void set_style_sheet(RefPtr<CSSStyleSheet> const& style_sheet) { m_style_sheet = style_sheet; } virtual StringView class_name() const override { return "CSSImportRule"; }; virtual Type type() const override { return Type::Import; }; diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h index fcf5ff116a..31897d477d 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h @@ -69,9 +69,9 @@ public: virtual Optional<StyleProperty> property(PropertyID) const override; virtual bool set_property(PropertyID, StringView css_text) override; - const Vector<StyleProperty>& properties() const { return m_properties; } - const HashMap<String, StyleProperty>& custom_properties() const { return m_custom_properties; } - Optional<StyleProperty> custom_property(const String& custom_property_name) const { return m_custom_properties.get(custom_property_name); } + Vector<StyleProperty> const& properties() const { return m_properties; } + HashMap<String, StyleProperty> const& custom_properties() const { return m_custom_properties; } + Optional<StyleProperty> custom_property(String const& custom_property_name) const { return m_custom_properties.get(custom_property_name); } size_t custom_property_count() const { return m_custom_properties.size(); } virtual String serialized() const final override; diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h index 23f8c1564c..5f61504a57 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h @@ -29,8 +29,8 @@ public: virtual ~CSSStyleRule() override = default; - const NonnullRefPtrVector<Selector>& selectors() const { return m_selectors; } - const CSSStyleDeclaration& declaration() const { return m_declaration; } + NonnullRefPtrVector<Selector> const& selectors() const { return m_selectors; } + CSSStyleDeclaration const& declaration() const { return m_declaration; } virtual StringView class_name() const override { return "CSSStyleRule"; }; virtual Type type() const override { return Type::Style; }; diff --git a/Userland/Libraries/LibWeb/CSS/ComputedValues.h b/Userland/Libraries/LibWeb/CSS/ComputedValues.h index 88779b1626..3462c152bd 100644 --- a/Userland/Libraries/LibWeb/CSS/ComputedValues.h +++ b/Userland/Libraries/LibWeb/CSS/ComputedValues.h @@ -152,10 +152,10 @@ public: const CSS::LengthBox& margin() const { return m_noninherited.margin; } const CSS::LengthBox& padding() const { return m_noninherited.padding; } - const BorderData& border_left() const { return m_noninherited.border_left; } - const BorderData& border_top() const { return m_noninherited.border_top; } - const BorderData& border_right() const { return m_noninherited.border_right; } - const BorderData& border_bottom() const { return m_noninherited.border_bottom; } + BorderData const& border_left() const { return m_noninherited.border_left; } + BorderData const& border_top() const { return m_noninherited.border_top; } + BorderData const& border_right() const { return m_noninherited.border_right; } + BorderData const& border_bottom() const { return m_noninherited.border_bottom; } const CSS::LengthPercentage& border_bottom_left_radius() const { return m_noninherited.border_bottom_left_radius; } const CSS::LengthPercentage& border_bottom_right_radius() const { return m_noninherited.border_bottom_right_radius; } @@ -267,12 +267,12 @@ public: void set_font_size(float font_size) { m_inherited.font_size = font_size; } void set_font_weight(int font_weight) { m_inherited.font_weight = font_weight; } void set_font_variant(CSS::FontVariant font_variant) { m_inherited.font_variant = font_variant; } - void set_color(const Color& color) { m_inherited.color = color; } + void set_color(Color const& color) { m_inherited.color = color; } void set_content(ContentData const& content) { m_noninherited.content = content; } void set_cursor(CSS::Cursor cursor) { m_inherited.cursor = cursor; } void set_image_rendering(CSS::ImageRendering value) { m_inherited.image_rendering = value; } void set_pointer_events(CSS::PointerEvents value) { m_inherited.pointer_events = value; } - void set_background_color(const Color& color) { m_noninherited.background_color = color; } + void set_background_color(Color const& color) { m_noninherited.background_color = color; } void set_background_layers(Vector<BackgroundLayerData>&& layers) { m_noninherited.background_layers = move(layers); } void set_float(CSS::Float value) { m_noninherited.float_ = value; } void set_clear(CSS::Clear value) { m_noninherited.clear = value; } diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp index 237fd4d4d9..724315c55e 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.cpp +++ b/Userland/Libraries/LibWeb/CSS/Length.cpp @@ -118,7 +118,7 @@ String Length::to_string() const return String::formatted("{}{}", m_value, unit_name()); } -const char* Length::unit_name() const +char const* Length::unit_name() const { switch (m_type) { case Type::Cm: diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h index 57ae881f76..97663b95fd 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.h +++ b/Userland/Libraries/LibWeb/CSS/Length.h @@ -116,14 +116,14 @@ public: String to_string() const; - bool operator==(const Length& other) const + bool operator==(Length const& other) const { if (is_calculated()) return m_calculated_style == other.m_calculated_style; return m_type == other.m_type && m_value == other.m_value; } - bool operator!=(const Length& other) const + bool operator!=(Length const& other) const { return !(*this == other); } @@ -131,7 +131,7 @@ public: float relative_length_to_px(Gfx::IntRect const& viewport_rect, Gfx::FontPixelMetrics const& font_metrics, float font_size, float root_font_size) const; private: - const char* unit_name() const; + char const* unit_name() const; Type m_type; float m_value { 0 }; diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 5e2a33d63b..0ae1e192b6 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -28,7 +28,7 @@ #include <LibWeb/DOM/Document.h> #include <LibWeb/Dump.h> -static void log_parse_error(const SourceLocation& location = SourceLocation::current()) +static void log_parse_error(SourceLocation const& location = SourceLocation::current()) { dbgln_if(CSS_PARSER_DEBUG, "Parse error (CSS) {}", location); } diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp index b4d1d3d6ca..45cfb6f077 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp @@ -17,7 +17,7 @@ #define REPLACEMENT_CHARACTER 0xFFFD static constexpr u32 TOKENIZER_EOF = 0xFFFFFFFF; -static inline void log_parse_error(const SourceLocation& location = SourceLocation::current()) +static inline void log_parse_error(SourceLocation const& location = SourceLocation::current()) { dbgln_if(CSS_TOKENIZER_DEBUG, "Parse error (css tokenization) {} ", location); } @@ -192,7 +192,7 @@ static inline bool is_E(u32 code_point) namespace Web::CSS { -Tokenizer::Tokenizer(StringView input, const String& encoding) +Tokenizer::Tokenizer(StringView input, String const& encoding) { auto* decoder = TextCodec::decoder_for(encoding); VERIFY(decoder); diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h index 6521e74eb2..39eb09d923 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h @@ -60,7 +60,7 @@ public: class Tokenizer { public: - explicit Tokenizer(StringView input, const String& encoding); + explicit Tokenizer(StringView input, String const& encoding); [[nodiscard]] Vector<Token> parse(); diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.cpp b/Userland/Libraries/LibWeb/CSS/Ratio.cpp index f6285dfa45..b2a46b766a 100644 --- a/Userland/Libraries/LibWeb/CSS/Ratio.cpp +++ b/Userland/Libraries/LibWeb/CSS/Ratio.cpp @@ -27,7 +27,7 @@ String Ratio::to_string() const return String::formatted("{} / {}", m_first_value, m_second_value); } -auto Ratio::operator<=>(const Ratio& other) const +auto Ratio::operator<=>(Ratio const& other) const { return value() - other.value(); } diff --git a/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp b/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp index 4bfc3562d3..43794e2f6b 100644 --- a/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp +++ b/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp @@ -114,7 +114,7 @@ static inline bool matches_attribute(CSS::Selector::SimpleSelector::Attribute co return !attribute.value.is_empty() && element.attribute(attribute.name).contains(attribute.value, case_sensitivity); case CSS::Selector::SimpleSelector::Attribute::MatchType::StartsWithSegment: { - const auto element_attr_value = element.attribute(attribute.name); + auto const element_attr_value = element.attribute(attribute.name); if (element_attr_value.is_empty()) { // If the attribute value on element is empty, the selector is true // if the match value is also empty and false otherwise. diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index bf1a4cbb4d..4ae796ec1a 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -862,7 +862,7 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele float font_size_in_px = 10; if (font_size->is_identifier()) { - switch (static_cast<const IdentifierStyleValue&>(*font_size).id()) { + switch (static_cast<IdentifierStyleValue const&>(*font_size).id()) { case CSS::ValueID::XxSmall: case CSS::ValueID::XSmall: case CSS::ValueID::Small: diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index b320bc1dfe..9856396e74 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -15,7 +15,7 @@ namespace Web::CSS { -StyleProperties::StyleProperties(const StyleProperties& other) +StyleProperties::StyleProperties(StyleProperties const& other) : m_property_values(other.m_property_values) { if (other.m_font) { @@ -412,7 +412,7 @@ Optional<CSS::Position> StyleProperties::position() const } } -bool StyleProperties::operator==(const StyleProperties& other) const +bool StyleProperties::operator==(StyleProperties const& other) const { if (m_property_values.size() != other.m_property_values.size()) return false; diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 82c0f1f932..ef34a95e1b 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -20,7 +20,7 @@ class StyleProperties : public RefCounted<StyleProperties> { public: StyleProperties() = default; - explicit StyleProperties(const StyleProperties&); + explicit StyleProperties(StyleProperties const&); static NonnullRefPtr<StyleProperties> create() { return adopt_ref(*new StyleProperties); } @@ -92,10 +92,10 @@ public: m_font = move(font); } - float line_height(const Layout::Node&) const; + float line_height(Layout::Node const&) const; - bool operator==(const StyleProperties&) const; - bool operator!=(const StyleProperties& other) const { return !(*this == other); } + bool operator==(StyleProperties const&) const; + bool operator!=(StyleProperties const& other) const { return !(*this == other); } Optional<CSS::Position> position() const; Optional<int> z_index() const; diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index b90fe67ba0..970c9b74a3 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -941,7 +941,7 @@ public: { if (type() != other.type()) return false; - return m_color == static_cast<const ColorStyleValue&>(other).m_color; + return m_color == static_cast<ColorStyleValue const&>(other).m_color; } private: @@ -1151,7 +1151,7 @@ public: { if (type() != other.type()) return false; - return m_id == static_cast<const IdentifierStyleValue&>(other).m_id; + return m_id == static_cast<IdentifierStyleValue const&>(other).m_id; } private: diff --git a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp index 7044d67d6d..fd06e2949b 100644 --- a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp +++ b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp @@ -27,7 +27,7 @@ static void on_secure_attribute(ParsedCookie& parsed_cookie); static void on_http_only_attribute(ParsedCookie& parsed_cookie); static Optional<Core::DateTime> parse_date_time(StringView date_string); -Optional<ParsedCookie> parse_cookie(const String& cookie_string) +Optional<ParsedCookie> parse_cookie(String const& cookie_string) { // https://tools.ietf.org/html/rfc6265#section-5.2 @@ -293,7 +293,7 @@ Optional<Core::DateTime> parse_date_time(StringView date_string) bool found_month = false; bool found_year = false; - for (const auto& date_token : date_tokens) { + for (auto const& date_token : date_tokens) { if (!found_time && parse_time(date_token)) { found_time = true; } else if (!found_day_of_month && parse_day_of_month(date_token)) { @@ -333,7 +333,7 @@ Optional<Core::DateTime> parse_date_time(StringView date_string) } -bool IPC::encode(IPC::Encoder& encoder, const Web::Cookie::ParsedCookie& cookie) +bool IPC::encode(IPC::Encoder& encoder, Web::Cookie::ParsedCookie const& cookie) { encoder << cookie.name; encoder << cookie.value; diff --git a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h index 6a8bb72551..2d293c3fa2 100644 --- a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h +++ b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h @@ -24,13 +24,13 @@ struct ParsedCookie { bool http_only_attribute_present { false }; }; -Optional<ParsedCookie> parse_cookie(const String& cookie_string); +Optional<ParsedCookie> parse_cookie(String const& cookie_string); } namespace IPC { -bool encode(IPC::Encoder&, const Web::Cookie::ParsedCookie&); +bool encode(IPC::Encoder&, Web::Cookie::ParsedCookie const&); ErrorOr<void> decode(IPC::Decoder&, Web::Cookie::ParsedCookie&); } diff --git a/Userland/Libraries/LibWeb/Crypto/Crypto.cpp b/Userland/Libraries/LibWeb/Crypto/Crypto.cpp index 277fec25b5..b6008f9aca 100644 --- a/Userland/Libraries/LibWeb/Crypto/Crypto.cpp +++ b/Userland/Libraries/LibWeb/Crypto/Crypto.cpp @@ -62,27 +62,27 @@ String Crypto::random_uuid() const bytes[8] |= 1 << 7; bytes[8] &= ~(1 << 6); - /* 5. Return the string concatenation of - « + /* 5. Return the string concatenation of + « hexadecimal representation of bytes[0], - hexadecimal representation of bytes[1], + hexadecimal representation of bytes[1], hexadecimal representation of bytes[2], hexadecimal representation of bytes[3], - "-", - hexadecimal representation of bytes[4], + "-", + hexadecimal representation of bytes[4], hexadecimal representation of bytes[5], "-", - hexadecimal representation of bytes[6], + hexadecimal representation of bytes[6], hexadecimal representation of bytes[7], "-", - hexadecimal representation of bytes[8], + hexadecimal representation of bytes[8], hexadecimal representation of bytes[9], "-", - hexadecimal representation of bytes[10], - hexadecimal representation of bytes[11], - hexadecimal representation of bytes[12], - hexadecimal representation of bytes[13], - hexadecimal representation of bytes[14], + hexadecimal representation of bytes[10], + hexadecimal representation of bytes[11], + hexadecimal representation of bytes[12], + hexadecimal representation of bytes[13], + hexadecimal representation of bytes[14], hexadecimal representation of bytes[15] ». */ diff --git a/Userland/Libraries/LibWeb/DOM/AbstractRange.h b/Userland/Libraries/LibWeb/DOM/AbstractRange.h index 0547879aa8..0407de68f2 100644 --- a/Userland/Libraries/LibWeb/DOM/AbstractRange.h +++ b/Userland/Libraries/LibWeb/DOM/AbstractRange.h @@ -20,11 +20,11 @@ public: virtual ~AbstractRange() override = default; Node* start_container() { return m_start_container; } - const Node* start_container() const { return m_start_container; } + Node const* start_container() const { return m_start_container; } unsigned start_offset() const { return m_start_offset; } Node* end_container() { return m_end_container; } - const Node* end_container() const { return m_end_container; } + Node const* end_container() const { return m_end_container; } unsigned end_offset() const { return m_end_offset; } // https://dom.spec.whatwg.org/#range-collapsed diff --git a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp index dec8901baf..2b17e0955e 100644 --- a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp +++ b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp @@ -10,7 +10,7 @@ namespace Web::DOM { -CharacterData::CharacterData(Document& document, NodeType type, const String& data) +CharacterData::CharacterData(Document& document, NodeType type, String const& data) : Node(document, type) , m_data(data) { diff --git a/Userland/Libraries/LibWeb/DOM/CharacterData.h b/Userland/Libraries/LibWeb/DOM/CharacterData.h index 0b38ec92a0..d72d5bdfc4 100644 --- a/Userland/Libraries/LibWeb/DOM/CharacterData.h +++ b/Userland/Libraries/LibWeb/DOM/CharacterData.h @@ -22,7 +22,7 @@ public: virtual ~CharacterData() override = default; - const String& data() const { return m_data; } + String const& data() const { return m_data; } void set_data(String); unsigned length() const { return m_data.length(); } @@ -31,7 +31,7 @@ public: ExceptionOr<void> replace_data(size_t offset, size_t count, String const&); protected: - explicit CharacterData(Document&, NodeType, const String&); + explicit CharacterData(Document&, NodeType, String const&); private: String m_data; diff --git a/Userland/Libraries/LibWeb/DOM/Comment.cpp b/Userland/Libraries/LibWeb/DOM/Comment.cpp index 8b70cf501b..9e79dd5869 100644 --- a/Userland/Libraries/LibWeb/DOM/Comment.cpp +++ b/Userland/Libraries/LibWeb/DOM/Comment.cpp @@ -10,7 +10,7 @@ namespace Web::DOM { -Comment::Comment(Document& document, const String& data) +Comment::Comment(Document& document, String const& data) : CharacterData(document, NodeType::COMMENT_NODE, data) { } diff --git a/Userland/Libraries/LibWeb/DOM/Comment.h b/Userland/Libraries/LibWeb/DOM/Comment.h index 7f34f43a13..9696a31137 100644 --- a/Userland/Libraries/LibWeb/DOM/Comment.h +++ b/Userland/Libraries/LibWeb/DOM/Comment.h @@ -15,7 +15,7 @@ class Comment final : public CharacterData { public: using WrapperType = Bindings::CommentWrapper; - explicit Comment(Document&, const String&); + explicit Comment(Document&, String const&); virtual ~Comment() override = default; virtual FlyString node_name() const override { return "#comment"; } diff --git a/Userland/Libraries/LibWeb/DOM/CustomEvent.h b/Userland/Libraries/LibWeb/DOM/CustomEvent.h index ed549d87d7..6ecbd83950 100644 --- a/Userland/Libraries/LibWeb/DOM/CustomEvent.h +++ b/Userland/Libraries/LibWeb/DOM/CustomEvent.h @@ -23,7 +23,7 @@ public: { return adopt_ref(*new CustomEvent(event_name, event_init)); } - static NonnullRefPtr<CustomEvent> create_with_global_object(Bindings::WindowObject&, const FlyString& event_name, CustomEventInit const& event_init) + static NonnullRefPtr<CustomEvent> create_with_global_object(Bindings::WindowObject&, FlyString const& event_name, CustomEventInit const& event_init) { return CustomEvent::create(event_name, event_init); } diff --git a/Userland/Libraries/LibWeb/DOM/DOMException.h b/Userland/Libraries/LibWeb/DOM/DOMException.h index 6e555536bf..95475e2829 100644 --- a/Userland/Libraries/LibWeb/DOM/DOMException.h +++ b/Userland/Libraries/LibWeb/DOM/DOMException.h @@ -78,7 +78,7 @@ namespace Web::DOM { __ENUMERATE(OperationError) \ __ENUMERATE(NotAllowedError) -static u16 get_legacy_code_for_name(const FlyString& name) +static u16 get_legacy_code_for_name(FlyString const& name) { #define __ENUMERATE(ErrorName, code) \ if (name == #ErrorName) \ @@ -95,23 +95,23 @@ class DOMException final public: using WrapperType = Bindings::DOMExceptionWrapper; - static NonnullRefPtr<DOMException> create(const FlyString& name, const FlyString& message) + static NonnullRefPtr<DOMException> create(FlyString const& name, FlyString const& message) { return adopt_ref(*new DOMException(name, message)); } // JS constructor has message first, name second - static NonnullRefPtr<DOMException> create_with_global_object(Bindings::WindowObject&, const FlyString& message, const FlyString& name) + static NonnullRefPtr<DOMException> create_with_global_object(Bindings::WindowObject&, FlyString const& message, FlyString const& name) { return adopt_ref(*new DOMException(name, message)); } - const FlyString& name() const { return m_name; } - const FlyString& message() const { return m_message; } + FlyString const& name() const { return m_name; } + FlyString const& message() const { return m_message; } u16 code() const { return get_legacy_code_for_name(m_name); } protected: - DOMException(const FlyString& name, const FlyString& message) + DOMException(FlyString const& name, FlyString const& message) : m_name(name) , m_message(message) { @@ -125,7 +125,7 @@ private: #define __ENUMERATE(ErrorName) \ class ErrorName final { \ public: \ - static NonnullRefPtr<DOMException> create(const FlyString& message) \ + static NonnullRefPtr<DOMException> create(FlyString const& message) \ { \ return DOMException::create(#ErrorName, message); \ } \ diff --git a/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp b/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp index 08ae8d5de2..3da0c63c1a 100644 --- a/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp +++ b/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp @@ -20,7 +20,7 @@ DOMImplementation::DOMImplementation(Document& document) } // https://dom.spec.whatwg.org/#dom-domimplementation-createdocument -ExceptionOr<NonnullRefPtr<Document>> DOMImplementation::create_document(const String& namespace_, const String& qualified_name, RefPtr<DocumentType> doctype) const +ExceptionOr<NonnullRefPtr<Document>> DOMImplementation::create_document(String const& namespace_, String const& qualified_name, RefPtr<DocumentType> doctype) const { // FIXME: This should specifically be an XML document. auto xml_document = Document::create(); @@ -51,7 +51,7 @@ ExceptionOr<NonnullRefPtr<Document>> DOMImplementation::create_document(const St } // https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument -NonnullRefPtr<Document> DOMImplementation::create_html_document(const String& title) const +NonnullRefPtr<Document> DOMImplementation::create_html_document(String const& title) const { // FIXME: This should specifically be a HTML document. auto html_document = Document::create(); diff --git a/Userland/Libraries/LibWeb/DOM/DOMImplementation.h b/Userland/Libraries/LibWeb/DOM/DOMImplementation.h index 74948243be..1c8d828696 100644 --- a/Userland/Libraries/LibWeb/DOM/DOMImplementation.h +++ b/Userland/Libraries/LibWeb/DOM/DOMImplementation.h @@ -28,7 +28,7 @@ public: } ExceptionOr<NonnullRefPtr<Document>> create_document(String const&, String const&, RefPtr<DocumentType>) const; - NonnullRefPtr<Document> create_html_document(const String& title) const; + NonnullRefPtr<Document> create_html_document(String const& title) const; ExceptionOr<NonnullRefPtr<DocumentType>> create_document_type(String const& qualified_name, String const& public_id, String const& system_id); // https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 929042dc74..d91d6c1e44 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -307,7 +307,7 @@ Origin Document::origin() const return { m_url.protocol(), m_url.host(), m_url.port_or_default() }; } -void Document::set_origin(const Origin& origin) +void Document::set_origin(Origin const& origin) { m_url.set_protocol(origin.protocol()); m_url.set_host(origin.host()); @@ -328,7 +328,7 @@ void Document::schedule_layout_update() m_layout_update_timer->start(); } -bool Document::is_child_allowed(const Node& node) const +bool Document::is_child_allowed(Node const& node) const { switch (node.type()) { case NodeType::DOCUMENT_NODE: @@ -350,7 +350,7 @@ Element* Document::document_element() return first_child_of_type<Element>(); } -const Element* Document::document_element() const +Element const* Document::document_element() const { return first_child_of_type<Element>(); } @@ -432,7 +432,7 @@ String Document::title() const return builder.to_string(); } -void Document::set_title(const String& title) +void Document::set_title(String const& title) { auto* head_element = const_cast<HTML::HTMLHeadElement*>(head()); if (!head_element) @@ -651,9 +651,9 @@ void Document::set_visited_link_color(Color color) m_visited_link_color = color; } -const Layout::InitialContainingBlock* Document::layout_node() const +Layout::InitialContainingBlock const* Document::layout_node() const { - return static_cast<const Layout::InitialContainingBlock*>(Node::layout_node()); + return static_cast<Layout::InitialContainingBlock const*>(Node::layout_node()); } Layout::InitialContainingBlock* Document::layout_node() @@ -935,12 +935,12 @@ NonnullRefPtr<DocumentFragment> Document::create_document_fragment() return adopt_ref(*new DocumentFragment(*this)); } -NonnullRefPtr<Text> Document::create_text_node(const String& data) +NonnullRefPtr<Text> Document::create_text_node(String const& data) { return adopt_ref(*new Text(*this, data)); } -NonnullRefPtr<Comment> Document::create_comment(const String& data) +NonnullRefPtr<Comment> Document::create_comment(String const& data) { return adopt_ref(*new Comment(*this, data)); } @@ -951,7 +951,7 @@ NonnullRefPtr<Range> Document::create_range() } // https://dom.spec.whatwg.org/#dom-document-createevent -NonnullRefPtr<Event> Document::create_event(const String& interface) +NonnullRefPtr<Event> Document::create_event(String const& interface) { auto interface_lowercase = interface.to_lowercase(); RefPtr<Event> event; @@ -1101,12 +1101,12 @@ ExceptionOr<NonnullRefPtr<Node>> Document::adopt_node_binding(NonnullRefPtr<Node return node; } -const DocumentType* Document::doctype() const +DocumentType const* Document::doctype() const { return first_child_of_type<DocumentType>(); } -const String& Document::compat_mode() const +String const& Document::compat_mode() const { static String back_compat = "BackCompat"; static String css1_compat = "CSS1Compat"; @@ -1192,12 +1192,12 @@ Page* Document::page() return m_browsing_context ? m_browsing_context->page() : nullptr; } -const Page* Document::page() const +Page const* Document::page() const { return m_browsing_context ? m_browsing_context->page() : nullptr; } -EventTarget* Document::get_parent(const Event& event) +EventTarget* Document::get_parent(Event const& event) { if (event.type() == HTML::EventNames::load) return nullptr; diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 7b1ca335c7..4412efd5e9 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -68,7 +68,7 @@ public: AK::URL url() const { return m_url; } Origin origin() const; - void set_origin(const Origin& origin); + void set_origin(Origin const& origin); AK::URL parse_url(String const&) const; @@ -84,14 +84,14 @@ public: void set_hovered_node(Node*); Node* hovered_node() { return m_hovered_node; } - const Node* hovered_node() const { return m_hovered_node; } + Node const* hovered_node() const { return m_hovered_node; } void set_inspected_node(Node*); Node* inspected_node() { return m_inspected_node; } - const Node* inspected_node() const { return m_inspected_node; } + Node const* inspected_node() const { return m_inspected_node; } Element* document_element(); - const Element* document_element() const; + Element const* document_element() const; HTML::HTMLHtmlElement* html_element(); HTML::HTMLHeadElement* head(); @@ -115,7 +115,7 @@ public: ExceptionOr<void> set_body(HTML::HTMLElement* new_body); String title() const; - void set_title(const String&); + void set_title(String const&); void attach_to_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&); void detach_from_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&); @@ -124,9 +124,9 @@ public: HTML::BrowsingContext const* browsing_context() const { return m_browsing_context.ptr(); } Page* page(); - const Page* page() const; + Page const* page() const; - Color background_color(const Gfx::Palette&) const; + Color background_color(Gfx::Palette const&) const; Vector<CSS::BackgroundLayerData> const* background_layers() const; Color link_color() const; @@ -148,9 +148,9 @@ public: void invalidate_layout(); void invalidate_stacking_context_tree(); - virtual bool is_child_allowed(const Node&) const override; + virtual bool is_child_allowed(Node const&) const override; - const Layout::InitialContainingBlock* layout_node() const; + Layout::InitialContainingBlock const* layout_node() const; Layout::InitialContainingBlock* layout_node(); void schedule_style_update(); @@ -168,8 +168,8 @@ public: NonnullRefPtr<HTMLCollection> forms(); NonnullRefPtr<HTMLCollection> scripts(); - const String& source() const { return m_source; } - void set_source(const String& source) { m_source = source; } + String const& source() const { return m_source; } + void set_source(String const& source) { m_source = source; } HTML::EnvironmentSettingsObject& relevant_settings_object(); JS::Realm& realm(); @@ -177,13 +177,13 @@ public: JS::Value run_javascript(StringView source, StringView filename = "(unknown)"); - ExceptionOr<NonnullRefPtr<Element>> create_element(const String& tag_name); - ExceptionOr<NonnullRefPtr<Element>> create_element_ns(const String& namespace_, const String& qualified_name); + ExceptionOr<NonnullRefPtr<Element>> create_element(String const& tag_name); + ExceptionOr<NonnullRefPtr<Element>> create_element_ns(String const& namespace_, String const& qualified_name); NonnullRefPtr<DocumentFragment> create_document_fragment(); - NonnullRefPtr<Text> create_text_node(const String& data); - NonnullRefPtr<Comment> create_comment(const String& data); + NonnullRefPtr<Text> create_text_node(String const& data); + NonnullRefPtr<Comment> create_comment(String const& data); NonnullRefPtr<Range> create_range(); - NonnullRefPtr<Event> create_event(const String& interface); + NonnullRefPtr<Event> create_event(String const& interface); void set_pending_parsing_blocking_script(Badge<HTML::HTMLScriptElement>, HTML::HTMLScriptElement*); HTML::HTMLScriptElement* pending_parsing_blocking_script() { return m_pending_parsing_blocking_script; } @@ -205,18 +205,18 @@ public: void adopt_node(Node&); ExceptionOr<NonnullRefPtr<Node>> adopt_node_binding(NonnullRefPtr<Node>); - const DocumentType* doctype() const; - const String& compat_mode() const; + DocumentType const* doctype() const; + String const& compat_mode() const; void set_editable(bool editable) { m_editable = editable; } virtual bool is_editable() const final; Element* focused_element() { return m_focused_element; } - const Element* focused_element() const { return m_focused_element; } + Element const* focused_element() const { return m_focused_element; } void set_focused_element(Element*); - const Element* active_element() const { return m_active_element; } + Element const* active_element() const { return m_active_element; } void set_active_element(Element*); @@ -224,7 +224,7 @@ public: void set_created_for_appropriate_template_contents(bool value) { m_created_for_appropriate_template_contents = value; } Document* associated_inert_template_document() { return m_associated_inert_template_document; } - const Document* associated_inert_template_document() const { return m_associated_inert_template_document; } + Document const* associated_inert_template_document() const { return m_associated_inert_template_document; } void set_associated_inert_template_document(Document& document) { m_associated_inert_template_document = document; } String ready_state() const; @@ -253,13 +253,13 @@ public: HTML::Window* default_view() { return m_window; } - const String& content_type() const { return m_content_type; } - void set_content_type(const String& content_type) { m_content_type = content_type; } + String const& content_type() const { return m_content_type; } + void set_content_type(String const& content_type) { m_content_type = content_type; } bool has_encoding() const { return m_encoding.has_value(); } - const Optional<String>& encoding() const { return m_encoding; } + Optional<String> const& encoding() const { return m_encoding; } String encoding_or_default() const { return m_encoding.value_or("UTF-8"); } - void set_encoding(const Optional<String>& encoding) { m_encoding = encoding; } + void set_encoding(Optional<String> const& encoding) { m_encoding = encoding; } // NOTE: These are intended for the JS bindings String character_set() const { return encoding_or_default(); } @@ -280,7 +280,7 @@ public: void increment_ignore_destructive_writes_counter() { m_ignore_destructive_writes_counter++; } void decrement_ignore_destructive_writes_counter() { m_ignore_destructive_writes_counter--; } - virtual EventTarget* get_parent(const Event&) override; + virtual EventTarget* get_parent(Event const&) override; String dump_dom_tree_as_json() const; diff --git a/Userland/Libraries/LibWeb/DOM/DocumentType.h b/Userland/Libraries/LibWeb/DOM/DocumentType.h index 0e8a9eedd0..89816ef0ea 100644 --- a/Userland/Libraries/LibWeb/DOM/DocumentType.h +++ b/Userland/Libraries/LibWeb/DOM/DocumentType.h @@ -28,14 +28,14 @@ public: virtual FlyString node_name() const override { return "#doctype"; } - const String& name() const { return m_name; } - void set_name(const String& name) { m_name = name; } + String const& name() const { return m_name; } + void set_name(String const& name) { m_name = name; } - const String& public_id() const { return m_public_id; } - void set_public_id(const String& public_id) { m_public_id = public_id; } + String const& public_id() const { return m_public_id; } + void set_public_id(String const& public_id) { m_public_id = public_id; } - const String& system_id() const { return m_system_id; } - void set_system_id(const String& system_id) { m_system_id = system_id; } + String const& system_id() const { return m_system_id; } + void set_system_id(String const& system_id) { m_system_id = system_id; } private: String m_name; diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 4068fa5160..6bce81f358 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -51,7 +51,7 @@ Element::Element(Document& document, DOM::QualifiedName qualified_name) Element::~Element() = default; // https://dom.spec.whatwg.org/#dom-element-getattribute -String Element::get_attribute(const FlyString& name) const +String Element::get_attribute(FlyString const& name) const { // 1. Let attr be the result of getting an attribute given qualifiedName and this. auto const* attribute = m_attributes->get_attribute(name); @@ -65,7 +65,7 @@ String Element::get_attribute(const FlyString& name) const } // https://dom.spec.whatwg.org/#dom-element-setattribute -ExceptionOr<void> Element::set_attribute(const FlyString& name, const String& value) +ExceptionOr<void> Element::set_attribute(FlyString const& name, String const& value) { // 1. If qualifiedName does not match the Name production in XML, then throw an "InvalidCharacterError" DOMException. // FIXME: Proper name validation @@ -156,7 +156,7 @@ ExceptionOr<void> Element::set_attribute_ns(FlyString const& namespace_, FlyStri } // https://dom.spec.whatwg.org/#dom-element-removeattribute -void Element::remove_attribute(const FlyString& name) +void Element::remove_attribute(FlyString const& name) { m_attributes->remove_attribute(name); @@ -167,7 +167,7 @@ void Element::remove_attribute(const FlyString& name) } // https://dom.spec.whatwg.org/#dom-element-hasattribute -bool Element::has_attribute(const FlyString& name) const +bool Element::has_attribute(FlyString const& name) const { return m_attributes->get_attribute(name) != nullptr; } @@ -232,7 +232,7 @@ Vector<String> Element::get_attribute_names() const return names; } -bool Element::has_class(const FlyString& class_name, CaseSensitivity case_sensitivity) const +bool Element::has_class(FlyString const& class_name, CaseSensitivity case_sensitivity) const { return any_of(m_classes, [&](auto& it) { return case_sensitivity == CaseSensitivity::CaseSensitive @@ -291,7 +291,7 @@ RefPtr<Layout::Node> Element::create_layout_node_for_display_type(DOM::Document& TODO(); } -void Element::parse_attribute(const FlyString& name, const String& value) +void Element::parse_attribute(FlyString const& name, String const& value) { if (name == HTML::AttributeNames::class_) { auto new_classes = value.split_view(is_ascii_space); diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index 8746a69f6f..5608534806 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -36,27 +36,27 @@ public: Element(Document&, DOM::QualifiedName); virtual ~Element() override; - const String& qualified_name() const { return m_qualified_name.as_string(); } - const String& html_uppercased_qualified_name() const { return m_html_uppercased_qualified_name; } + String const& qualified_name() const { return m_qualified_name.as_string(); } + String const& html_uppercased_qualified_name() const { return m_html_uppercased_qualified_name; } virtual FlyString node_name() const final { return html_uppercased_qualified_name(); } - const FlyString& local_name() const { return m_qualified_name.local_name(); } + FlyString const& local_name() const { return m_qualified_name.local_name(); } // NOTE: This is for the JS bindings - const String& tag_name() const { return html_uppercased_qualified_name(); } + String const& tag_name() const { return html_uppercased_qualified_name(); } - const FlyString& prefix() const { return m_qualified_name.prefix(); } - const FlyString& namespace_() const { return m_qualified_name.namespace_(); } + FlyString const& prefix() const { return m_qualified_name.prefix(); } + FlyString const& namespace_() const { return m_qualified_name.namespace_(); } // NOTE: This is for the JS bindings - const FlyString& namespace_uri() const { return namespace_(); } + FlyString const& namespace_uri() const { return namespace_(); } - bool has_attribute(const FlyString& name) const; + bool has_attribute(FlyString const& name) const; bool has_attributes() const { return !m_attributes->is_empty(); } - String attribute(const FlyString& name) const { return get_attribute(name); } - String get_attribute(const FlyString& name) const; - ExceptionOr<void> set_attribute(const FlyString& name, const String& value); + String attribute(FlyString const& name) const { return get_attribute(name); } + String get_attribute(FlyString const& name) const; + ExceptionOr<void> set_attribute(FlyString const& name, String const& value); ExceptionOr<void> set_attribute_ns(FlyString const& namespace_, FlyString const& qualified_name, String const& value); - void remove_attribute(const FlyString& name); + void remove_attribute(FlyString const& name); DOM::ExceptionOr<bool> toggle_attribute(FlyString const& name, Optional<bool> force); size_t attribute_list_size() const { return m_attributes->length(); } NonnullRefPtr<NamedNodeMap> const& attributes() const { return m_attributes; } @@ -81,11 +81,11 @@ public: } } - bool has_class(const FlyString&, CaseSensitivity = CaseSensitivity::CaseSensitive) const; - const Vector<FlyString>& class_names() const { return m_classes; } + bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const; + Vector<FlyString> const& class_names() const { return m_classes; } virtual void apply_presentational_hints(CSS::StyleProperties&) const { } - virtual void parse_attribute(const FlyString& name, const String& value); + virtual void parse_attribute(FlyString const& name, String const& value); virtual void did_remove_attribute(FlyString const&); enum class NeedsRelayout { @@ -95,7 +95,7 @@ public: NeedsRelayout recompute_style(); Layout::NodeWithStyle* layout_node() { return static_cast<Layout::NodeWithStyle*>(Node::layout_node()); } - const Layout::NodeWithStyle* layout_node() const { return static_cast<const Layout::NodeWithStyle*>(Node::layout_node()); } + Layout::NodeWithStyle const* layout_node() const { return static_cast<Layout::NodeWithStyle const*>(Node::layout_node()); } String name() const { return attribute(HTML::AttributeNames::name); } @@ -116,7 +116,7 @@ public: NonnullRefPtr<HTMLCollection> get_elements_by_class_name(FlyString const&); ShadowRoot* shadow_root() { return m_shadow_root; } - const ShadowRoot* shadow_root() const { return m_shadow_root; } + ShadowRoot const* shadow_root() const { return m_shadow_root; } void set_shadow_root(RefPtr<ShadowRoot>); void set_custom_properties(HashMap<FlyString, CSS::StyleProperty> custom_properties) { m_custom_properties = move(custom_properties); } diff --git a/Userland/Libraries/LibWeb/DOM/Event.cpp b/Userland/Libraries/LibWeb/DOM/Event.cpp index 16ef6055f3..dc16bad15b 100644 --- a/Userland/Libraries/LibWeb/DOM/Event.cpp +++ b/Userland/Libraries/LibWeb/DOM/Event.cpp @@ -37,7 +37,7 @@ void Event::set_cancelled_flag() } // https://dom.spec.whatwg.org/#concept-event-initialize -void Event::initialize(const String& type, bool bubbles, bool cancelable) +void Event::initialize(String const& type, bool bubbles, bool cancelable) { m_initialized = true; m_stop_propagation = false; @@ -51,7 +51,7 @@ void Event::initialize(const String& type, bool bubbles, bool cancelable) } // https://dom.spec.whatwg.org/#dom-event-initevent -void Event::init_event(const String& type, bool bubbles, bool cancelable) +void Event::init_event(String const& type, bool bubbles, bool cancelable) { if (m_dispatch) return; diff --git a/Userland/Libraries/LibWeb/DOM/Event.h b/Userland/Libraries/LibWeb/DOM/Event.h index 23d25f040e..698b65250b 100644 --- a/Userland/Libraries/LibWeb/DOM/Event.h +++ b/Userland/Libraries/LibWeb/DOM/Event.h @@ -47,11 +47,11 @@ public: using Path = Vector<PathEntry>; - static NonnullRefPtr<Event> create(const FlyString& event_name, EventInit const& event_init = {}) + static NonnullRefPtr<Event> create(FlyString const& event_name, EventInit const& event_init = {}) { return adopt_ref(*new Event(event_name, event_init)); } - static NonnullRefPtr<Event> create_with_global_object(Bindings::WindowObject&, const FlyString& event_name, EventInit const& event_init) + static NonnullRefPtr<Event> create_with_global_object(Bindings::WindowObject&, FlyString const& event_name, EventInit const& event_init) { return Event::create(event_name, event_init); } @@ -60,7 +60,7 @@ public: double time_stamp() const; - const FlyString& type() const { return m_type; } + FlyString const& type() const { return m_type; } void set_type(StringView type) { m_type = type; } RefPtr<EventTarget> target() const { return m_target; } @@ -111,7 +111,7 @@ public: void append_to_path(EventTarget&, RefPtr<EventTarget>, RefPtr<EventTarget>, TouchTargetList&, bool); Path& path() { return m_path; } - const Path& path() const { return m_path; } + Path const& path() const { return m_path; } void clear_path() { m_path.clear(); } void set_touch_target_list(TouchTargetList& touch_target_list) { m_touch_target_list = touch_target_list; } @@ -142,7 +142,7 @@ public: m_stop_immediate_propagation = true; } - void init_event(const String&, bool, bool); + void init_event(String const&, bool, bool); void set_time_stamp(double time_stamp) { m_time_stamp = time_stamp; } @@ -163,7 +163,7 @@ protected: { } - void initialize(const String&, bool, bool); + void initialize(String const&, bool, bool); private: FlyString m_type; diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.h b/Userland/Libraries/LibWeb/DOM/EventTarget.h index 75586c3d36..c0098efc47 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.h +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.h @@ -41,7 +41,7 @@ public: virtual JS::Object* create_wrapper(JS::GlobalObject&) = 0; - virtual EventTarget* get_parent(const Event&) { return nullptr; } + virtual EventTarget* get_parent(Event const&) { return nullptr; } void add_an_event_listener(NonnullRefPtr<DOMEventListener>); void remove_an_event_listener(DOMEventListener&); @@ -50,7 +50,7 @@ public: auto& event_listener_list() { return m_event_listener_list; } auto const& event_listener_list() const { return m_event_listener_list; } - Function<void(const Event&)> activation_behavior; + Function<void(Event const&)> activation_behavior; // NOTE: These only exist for checkbox and radio input elements. virtual void legacy_pre_activation_behavior() { } diff --git a/Userland/Libraries/LibWeb/DOM/ExceptionOr.h b/Userland/Libraries/LibWeb/DOM/ExceptionOr.h index e741cbceba..bef730ff68 100644 --- a/Userland/Libraries/LibWeb/DOM/ExceptionOr.h +++ b/Userland/Libraries/LibWeb/DOM/ExceptionOr.h @@ -39,7 +39,7 @@ public: { } - ExceptionOr(const ValueType& result) + ExceptionOr(ValueType const& result) : m_result(result) { } @@ -65,7 +65,7 @@ public: } ExceptionOr(ExceptionOr&& other) = default; - ExceptionOr(const ExceptionOr& other) = default; + ExceptionOr(ExceptionOr const& other) = default; ~ExceptionOr() = default; ValueType& value() requires(!IsSame<ValueType, Empty>) diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index ad6773e4e3..c12ed76f78 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -95,7 +95,7 @@ const HTML::HTMLElement* Node::enclosing_html_element() const return first_ancestor_of_type<HTML::HTMLElement>(); } -const HTML::HTMLElement* Node::enclosing_html_element_with_attribute(const FlyString& attribute) const +const HTML::HTMLElement* Node::enclosing_html_element_with_attribute(FlyString const& attribute) const { for (auto* node = this; node; node = node->parent()) { if (is<HTML::HTMLElement>(*node) && verify_cast<HTML::HTMLElement>(*node).has_attribute(attribute)) @@ -162,7 +162,7 @@ String Node::node_value() const } // https://dom.spec.whatwg.org/#ref-for-dom-node-nodevalue%E2%91%A0 -void Node::set_node_value(const String& value) +void Node::set_node_value(String const& value) { if (is<Attribute>(this)) { @@ -249,7 +249,7 @@ Element* Node::parent_element() return verify_cast<Element>(parent()); } -const Element* Node::parent_element() const +Element const* Node::parent_element() const { if (!parent() || !is<Element>(parent())) return nullptr; @@ -650,7 +650,7 @@ void Node::set_layout_node(Badge<Layout::Node>, Layout::Node* layout_node) const m_layout_node = nullptr; } -EventTarget* Node::get_parent(const Event&) +EventTarget* Node::get_parent(Event const&) { // FIXME: returns the node’s assigned slot, if node is assigned, and node’s parent otherwise. return parent(); @@ -746,7 +746,7 @@ u16 Node::compare_document_position(RefPtr<Node> other) } // https://dom.spec.whatwg.org/#concept-tree-host-including-inclusive-ancestor -bool Node::is_host_including_inclusive_ancestor_of(const Node& other) const +bool Node::is_host_including_inclusive_ancestor_of(Node const& other) const { if (is_inclusive_ancestor_of(other)) return true; diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h index 44d63efb96..ffc513642b 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.h +++ b/Userland/Libraries/LibWeb/DOM/Node.h @@ -50,7 +50,7 @@ public: using TreeNode<Node>::unref; ParentNode* parent_or_shadow_host(); - const ParentNode* parent_or_shadow_host() const { return const_cast<Node*>(this)->parent_or_shadow_host(); } + ParentNode const* parent_or_shadow_host() const { return const_cast<Node*>(this)->parent_or_shadow_host(); } // ^EventTarget virtual void ref_event_target() final { ref(); } @@ -121,24 +121,24 @@ public: void set_node_value(String const&); Document& document() { return *m_document; } - const Document& document() const { return *m_document; } + Document const& document() const { return *m_document; } RefPtr<Document> owner_document() const; const HTML::HTMLAnchorElement* enclosing_link_element() const; const HTML::HTMLElement* enclosing_html_element() const; - const HTML::HTMLElement* enclosing_html_element_with_attribute(const FlyString&) const; + const HTML::HTMLElement* enclosing_html_element_with_attribute(FlyString const&) const; String child_text_content() const; Node& root(); - const Node& root() const + Node const& root() const { return const_cast<Node*>(this)->root(); } Node& shadow_including_root(); - const Node& shadow_including_root() const + Node const& shadow_including_root() const { return const_cast<Node*>(this)->shadow_including_root(); } @@ -146,10 +146,10 @@ public: bool is_connected() const; Node* parent_node() { return parent(); } - const Node* parent_node() const { return parent(); } + Node const* parent_node() const { return parent(); } Element* parent_element(); - const Element* parent_element() const; + Element const* parent_element() const; virtual void inserted(); virtual void removed_from(Node*) { } @@ -157,7 +157,7 @@ public: virtual void adopted_from(Document&) { } virtual void cloned(Node&, bool) {}; - const Layout::Node* layout_node() const { return m_layout_node; } + Layout::Node const* layout_node() const { return m_layout_node; } Layout::Node* layout_node() { return m_layout_node; } Painting::PaintableBox const* paint_box() const; @@ -165,7 +165,7 @@ public: void set_layout_node(Badge<Layout::Node>, Layout::Node*) const; - virtual bool is_child_allowed(const Node&) const { return true; } + virtual bool is_child_allowed(Node const&) const { return true; } bool needs_style_update() const { return m_needs_style_update; } void set_needs_style_update(bool); @@ -179,14 +179,14 @@ public: void set_document(Badge<Document>, Document&); - virtual EventTarget* get_parent(const Event&) override; + virtual EventTarget* get_parent(Event const&) override; template<typename T> bool fast_is() const = delete; ExceptionOr<void> ensure_pre_insertion_validity(NonnullRefPtr<Node> node, RefPtr<Node> child) const; - bool is_host_including_inclusive_ancestor_of(const Node&) const; + bool is_host_including_inclusive_ancestor_of(Node const&) const; bool is_scripting_enabled() const; bool is_scripting_disabled() const; diff --git a/Userland/Libraries/LibWeb/DOM/NonDocumentTypeChildNode.h b/Userland/Libraries/LibWeb/DOM/NonDocumentTypeChildNode.h index 3929382b7c..37a4fde5bd 100644 --- a/Userland/Libraries/LibWeb/DOM/NonDocumentTypeChildNode.h +++ b/Userland/Libraries/LibWeb/DOM/NonDocumentTypeChildNode.h @@ -51,10 +51,10 @@ public: return nullptr; } - const Element* previous_element_sibling() const { return const_cast<NonDocumentTypeChildNode*>(this)->previous_element_sibling(); } - const Element* previous_element_in_pre_order() const { return const_cast<NonDocumentTypeChildNode*>(this)->previous_element_in_pre_order(); } - const Element* next_element_sibling() const { return const_cast<NonDocumentTypeChildNode*>(this)->next_element_sibling(); } - const Element* next_element_in_pre_order() const { return const_cast<NonDocumentTypeChildNode*>(this)->next_element_in_pre_order(); } + Element const* previous_element_sibling() const { return const_cast<NonDocumentTypeChildNode*>(this)->previous_element_sibling(); } + Element const* previous_element_in_pre_order() const { return const_cast<NonDocumentTypeChildNode*>(this)->previous_element_in_pre_order(); } + Element const* next_element_sibling() const { return const_cast<NonDocumentTypeChildNode*>(this)->next_element_sibling(); } + Element const* next_element_in_pre_order() const { return const_cast<NonDocumentTypeChildNode*>(this)->next_element_in_pre_order(); } protected: NonDocumentTypeChildNode() = default; diff --git a/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h b/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h index 4b8605d4bd..59c1ef65cb 100644 --- a/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h +++ b/Userland/Libraries/LibWeb/DOM/NonElementParentNode.h @@ -16,10 +16,10 @@ namespace Web::DOM { template<typename NodeType> class NonElementParentNode { public: - RefPtr<Element> get_element_by_id(const FlyString& id) const + RefPtr<Element> get_element_by_id(FlyString const& id) const { RefPtr<Element> found_element; - static_cast<const NodeType*>(this)->template for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) { + static_cast<NodeType const*>(this)->template for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) { if (element.attribute(HTML::AttributeNames::id) == id) { found_element = &element; return IterationDecision::Break; @@ -28,9 +28,9 @@ public: }); return found_element; } - RefPtr<Element> get_element_by_id(const FlyString& id) + RefPtr<Element> get_element_by_id(FlyString const& id) { - return const_cast<const NonElementParentNode*>(this)->get_element_by_id(id); + return const_cast<NonElementParentNode const*>(this)->get_element_by_id(id); } protected: diff --git a/Userland/Libraries/LibWeb/DOM/Position.h b/Userland/Libraries/LibWeb/DOM/Position.h index a4fe55a57e..45ef6768a7 100644 --- a/Userland/Libraries/LibWeb/DOM/Position.h +++ b/Userland/Libraries/LibWeb/DOM/Position.h @@ -21,7 +21,7 @@ public: bool is_valid() const { return m_node; } Node* node() { return m_node; } - const Node* node() const { return m_node; } + Node const* node() const { return m_node; } unsigned offset() const { return m_offset; } bool offset_is_at_end_of_node() const; @@ -29,12 +29,12 @@ public: bool increment_offset(); bool decrement_offset(); - bool operator==(const Position& other) const + bool operator==(Position const& other) const { return m_node == other.m_node && m_offset == other.m_offset; } - bool operator!=(const Position& other) const + bool operator!=(Position const& other) const { return !(*this == other); } diff --git a/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.cpp b/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.cpp index c1cc2f2dce..66cb7a56bc 100644 --- a/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.cpp +++ b/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.cpp @@ -9,7 +9,7 @@ namespace Web::DOM { -ProcessingInstruction::ProcessingInstruction(Document& document, const String& data, const String& target) +ProcessingInstruction::ProcessingInstruction(Document& document, String const& data, String const& target) : CharacterData(document, NodeType::PROCESSING_INSTRUCTION_NODE, data) , m_target(target) { diff --git a/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.h b/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.h index 087960ca3c..5bc6706daf 100644 --- a/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.h +++ b/Userland/Libraries/LibWeb/DOM/ProcessingInstruction.h @@ -15,12 +15,12 @@ class ProcessingInstruction final : public CharacterData { public: using WrapperType = Bindings::ProcessingInstructionWrapper; - ProcessingInstruction(Document&, const String& data, const String& target); + ProcessingInstruction(Document&, String const& data, String const& target); virtual ~ProcessingInstruction() override = default; virtual FlyString node_name() const override { return m_target; } - const String& target() const { return m_target; } + String const& target() const { return m_target; } private: String m_target; diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp b/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp index 98965b475d..01a312ee65 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp @@ -19,7 +19,7 @@ ShadowRoot::ShadowRoot(Document& document, Element& host) } // https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6 -EventTarget* ShadowRoot::get_parent(const Event& event) +EventTarget* ShadowRoot::get_parent(Event const& event) { if (!event.composed()) { auto& events_first_invocation_target = verify_cast<Node>(*event.path().first().invocation_target); diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.h b/Userland/Libraries/LibWeb/DOM/ShadowRoot.h index f550c0e5cb..b4306c4461 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.h +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.h @@ -23,7 +23,7 @@ public: void set_available_to_element_internals(bool available_to_element_internals) { m_available_to_element_internals = available_to_element_internals; } // ^EventTarget - virtual EventTarget* get_parent(const Event&) override; + virtual EventTarget* get_parent(Event const&) override; // NOTE: This is intended for the JS bindings. String mode() const { return m_closed ? "closed" : "open"; } diff --git a/Userland/Libraries/LibWeb/DOM/Text.cpp b/Userland/Libraries/LibWeb/DOM/Text.cpp index 83b21fcdd7..d2ea61a2bb 100644 --- a/Userland/Libraries/LibWeb/DOM/Text.cpp +++ b/Userland/Libraries/LibWeb/DOM/Text.cpp @@ -12,7 +12,7 @@ namespace Web::DOM { -Text::Text(Document& document, const String& data) +Text::Text(Document& document, String const& data) : CharacterData(document, NodeType::TEXT_NODE, data) { } diff --git a/Userland/Libraries/LibWeb/DOM/Text.h b/Userland/Libraries/LibWeb/DOM/Text.h index 2d839cb63a..bccfc2024e 100644 --- a/Userland/Libraries/LibWeb/DOM/Text.h +++ b/Userland/Libraries/LibWeb/DOM/Text.h @@ -16,7 +16,7 @@ class Text final : public CharacterData { public: using WrapperType = Bindings::TextWrapper; - explicit Text(Document&, const String&); + explicit Text(Document&, String const&); virtual ~Text() override = default; static NonnullRefPtr<Text> create_with_global_object(Bindings::WindowObject& window, String const& data); diff --git a/Userland/Libraries/LibWeb/DOMTreeModel.h b/Userland/Libraries/LibWeb/DOMTreeModel.h index 94b7606a62..2d971a1384 100644 --- a/Userland/Libraries/LibWeb/DOMTreeModel.h +++ b/Userland/Libraries/LibWeb/DOMTreeModel.h @@ -36,14 +36,14 @@ public: private: DOMTreeModel(JsonObject, GUI::TreeView&); - ALWAYS_INLINE JsonObject const* get_parent(const JsonObject& o) const + ALWAYS_INLINE JsonObject const* get_parent(JsonObject const& o) const { auto parent_node = m_dom_node_to_parent_map.get(&o); VERIFY(parent_node.has_value()); return *parent_node; } - ALWAYS_INLINE static JsonArray const* get_children(const JsonObject& o) + ALWAYS_INLINE static JsonArray const* get_children(JsonObject const& o) { if (auto const* maybe_children = o.get_ptr("children"); maybe_children) return &maybe_children->as_array(); diff --git a/Userland/Libraries/LibWeb/FontCache.cpp b/Userland/Libraries/LibWeb/FontCache.cpp index 12edddc2d4..7350049dd3 100644 --- a/Userland/Libraries/LibWeb/FontCache.cpp +++ b/Userland/Libraries/LibWeb/FontCache.cpp @@ -13,7 +13,7 @@ FontCache& FontCache::the() return cache; } -RefPtr<Gfx::Font> FontCache::get(const FontSelector& font_selector) const +RefPtr<Gfx::Font> FontCache::get(FontSelector const& font_selector) const { auto cached_font = m_fonts.get(font_selector); if (cached_font.has_value()) @@ -21,7 +21,7 @@ RefPtr<Gfx::Font> FontCache::get(const FontSelector& font_selector) const return nullptr; } -void FontCache::set(const FontSelector& font_selector, NonnullRefPtr<Gfx::Font> font) +void FontCache::set(FontSelector const& font_selector, NonnullRefPtr<Gfx::Font> font) { m_fonts.set(font_selector, move(font)); } diff --git a/Userland/Libraries/LibWeb/FontCache.h b/Userland/Libraries/LibWeb/FontCache.h index f36411570f..647e6b6813 100644 --- a/Userland/Libraries/LibWeb/FontCache.h +++ b/Userland/Libraries/LibWeb/FontCache.h @@ -18,7 +18,7 @@ struct FontSelector { int weight { 0 }; int slope { 0 }; - bool operator==(const FontSelector& other) const + bool operator==(FontSelector const& other) const { return family == other.family && point_size == other.point_size && weight == other.weight && slope == other.slope; } @@ -27,15 +27,15 @@ struct FontSelector { namespace AK { template<> struct Traits<FontSelector> : public GenericTraits<FontSelector> { - static unsigned hash(const FontSelector& key) { return pair_int_hash(pair_int_hash(key.family.hash(), key.weight), key.point_size); } + static unsigned hash(FontSelector const& key) { return pair_int_hash(pair_int_hash(key.family.hash(), key.weight), key.point_size); } }; } class FontCache { public: static FontCache& the(); - RefPtr<Gfx::Font> get(const FontSelector&) const; - void set(const FontSelector&, NonnullRefPtr<Gfx::Font>); + RefPtr<Gfx::Font> get(FontSelector const&) const; + void set(FontSelector const&, NonnullRefPtr<Gfx::Font>); private: FontCache() = default; diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h index 8d44b124c6..78b6071d9c 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h @@ -16,7 +16,7 @@ public: virtual ~BrowsingContextContainer() override; BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; } - const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; } + BrowsingContext const* nested_browsing_context() const { return m_nested_browsing_context; } const DOM::Document* content_document() const; DOM::Document const* content_document_without_origin_check() const; diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp index 806cae33cc..d3994da800 100644 --- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp +++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp @@ -207,7 +207,7 @@ void CanvasRenderingContext2D::rotate(float radians) m_drawing_state.transform.rotate_radians(radians); } -void CanvasRenderingContext2D::did_draw(const Gfx::FloatRect&) +void CanvasRenderingContext2D::did_draw(Gfx::FloatRect const&) { // FIXME: Make use of the rect to reduce the invalidated area when possible. if (!m_element) @@ -230,7 +230,7 @@ OwnPtr<Gfx::Painter> CanvasRenderingContext2D::painter() return make<Gfx::Painter>(*m_element->bitmap()); } -void CanvasRenderingContext2D::fill_text(const String& text, float x, float y, Optional<double> max_width) +void CanvasRenderingContext2D::fill_text(String const& text, float x, float y, Optional<double> max_width) { if (max_width.has_value() && max_width.value() <= 0) return; @@ -383,7 +383,7 @@ void CanvasRenderingContext2D::fill(Gfx::Painter::WindingRule winding) did_draw(m_path.bounding_box()); } -void CanvasRenderingContext2D::fill(const String& fill_rule) +void CanvasRenderingContext2D::fill(String const& fill_rule) { if (fill_rule == "evenodd") return fill(Gfx::Painter::WindingRule::EvenOdd); @@ -439,7 +439,7 @@ DOM::ExceptionOr<RefPtr<ImageData>> CanvasRenderingContext2D::get_image_data(int return image_data; } -void CanvasRenderingContext2D::put_image_data(const ImageData& image_data, float x, float y) +void CanvasRenderingContext2D::put_image_data(ImageData const& image_data, float x, float y) { auto painter = this->painter(); if (!painter) diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h index ceacd1b5c8..f7465670b0 100644 --- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h +++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h @@ -72,16 +72,16 @@ public: void rect(float x, float y, float width, float height); void stroke(); - void fill_text(const String&, float x, float y, Optional<double> max_width); + void fill_text(String const&, float x, float y, Optional<double> max_width); void stroke_text(String const&, float x, float y, Optional<double> max_width); // FIXME: We should only have one fill(), really. Fix the wrapper generator! void fill(Gfx::Painter::WindingRule); - void fill(const String& fill_rule); + void fill(String const& fill_rule); RefPtr<ImageData> create_image_data(int width, int height) const; DOM::ExceptionOr<RefPtr<ImageData>> get_image_data(int x, int y, int width, int height) const; - void put_image_data(const ImageData&, float x, float y); + void put_image_data(ImageData const&, float x, float y); void save(); void restore(); @@ -112,7 +112,7 @@ private: Gfx::IntRect bounding_box; }; - void did_draw(const Gfx::FloatRect&); + void did_draw(Gfx::FloatRect const&); PreparedText prepare_text(String const& text, float max_width = INFINITY); OwnPtr<Gfx::Painter> painter(); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp index 5d75290daa..ad0d688c6f 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp @@ -37,7 +37,7 @@ void HTMLBodyElement::apply_presentational_hints(CSS::StyleProperties& style) co }); } -void HTMLBodyElement::parse_attribute(const FlyString& name, const String& value) +void HTMLBodyElement::parse_attribute(FlyString const& name, String const& value) { HTMLElement::parse_attribute(name, value); if (name.equals_ignoring_case("link")) { diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h index 9bbb48ec2f..2aef6df4d5 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h @@ -17,7 +17,7 @@ public: HTMLBodyElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLBodyElement() override; - virtual void parse_attribute(const FlyString&, const String&) override; + virtual void parse_attribute(FlyString const&, String const&) override; virtual void apply_presentational_hints(CSS::StyleProperties&) const override; private: diff --git a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp index 2f132faff9..1244c3dfc0 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp @@ -59,7 +59,7 @@ CanvasRenderingContext2D* HTMLCanvasElement::get_context(String type) return m_context; } -static Gfx::IntSize bitmap_size_for_canvas(const HTMLCanvasElement& canvas) +static Gfx::IntSize bitmap_size_for_canvas(HTMLCanvasElement const& canvas) { auto width = canvas.width(); auto height = canvas.height(); @@ -94,7 +94,7 @@ bool HTMLCanvasElement::create_bitmap() return m_bitmap; } -String HTMLCanvasElement::to_data_url(const String& type, [[maybe_unused]] Optional<double> quality) const +String HTMLCanvasElement::to_data_url(String const& type, [[maybe_unused]] Optional<double> quality) const { if (!m_bitmap) return {}; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.h b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.h index d242c12adf..b6bda5884c 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.h @@ -19,7 +19,7 @@ public: HTMLCanvasElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLCanvasElement() override; - const Gfx::Bitmap* bitmap() const { return m_bitmap; } + Gfx::Bitmap const* bitmap() const { return m_bitmap; } Gfx::Bitmap* bitmap() { return m_bitmap; } bool create_bitmap(); @@ -31,7 +31,7 @@ public: void set_width(unsigned); void set_height(unsigned); - String to_data_url(const String& type, Optional<double> quality) const; + String to_data_url(String const& type, Optional<double> quality) const; private: virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp index b9523d51cf..748d85fc5e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -78,7 +78,7 @@ String HTMLElement::content_editable() const } // https://html.spec.whatwg.org/multipage/interaction.html#contenteditable -DOM::ExceptionOr<void> HTMLElement::set_content_editable(const String& content_editable) +DOM::ExceptionOr<void> HTMLElement::set_content_editable(String const& content_editable) { if (content_editable.equals_ignoring_case("inherit")) { remove_attribute(HTML::AttributeNames::contenteditable); @@ -112,7 +112,7 @@ String HTMLElement::inner_text() if (!layout_node()) return text_content(); - Function<void(const Layout::Node&)> recurse = [&](auto& node) { + Function<void(Layout::Node const&)> recurse = [&](auto& node) { for (auto* child = node.first_child(); child; child = child->next_sibling()) { if (is<Layout::TextNode>(child)) builder.append(verify_cast<Layout::TextNode>(*child).text_for_rendering()); @@ -168,7 +168,7 @@ bool HTMLElement::cannot_navigate() const return !is<HTML::HTMLAnchorElement>(this) && !is_connected(); } -void HTMLElement::parse_attribute(const FlyString& name, const String& value) +void HTMLElement::parse_attribute(FlyString const& name, String const& value) { Element::parse_attribute(name, value); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.h b/Userland/Libraries/LibWeb/HTML/HTMLElement.h index 6e6239c56e..c4f0ba8bfc 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.h @@ -26,7 +26,7 @@ public: virtual bool is_editable() const final; String content_editable() const; - DOM::ExceptionOr<void> set_content_editable(const String&); + DOM::ExceptionOr<void> set_content_editable(String const&); String inner_text(); void set_inner_text(StringView); @@ -50,7 +50,7 @@ public: virtual bool is_labelable() const { return false; } protected: - virtual void parse_attribute(const FlyString& name, const String& value) override; + virtual void parse_attribute(FlyString const& name, String const& value) override; private: // ^HTML::GlobalEventHandlers diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.h b/Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.h index cb3427e697..1cb3a6c06c 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLFieldSetElement.h @@ -22,7 +22,7 @@ public: HTMLFieldSetElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLFieldSetElement() override; - const String& type() const + String const& type() const { static String fieldset = "fieldset"; return fieldset; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index 5879b7b4cf..163a457553 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -25,7 +25,7 @@ RefPtr<Layout::Node> HTMLIFrameElement::create_layout_node(NonnullRefPtr<CSS::St return adopt_ref(*new Layout::FrameBox(document(), *this, move(style))); } -void HTMLIFrameElement::parse_attribute(const FlyString& name, const String& value) +void HTMLIFrameElement::parse_attribute(FlyString const& name, String const& value) { HTMLElement::parse_attribute(name, value); if (name == HTML::AttributeNames::src) @@ -56,7 +56,7 @@ void HTMLIFrameElement::removed_from(DOM::Node* node) discard_nested_browsing_context(); } -void HTMLIFrameElement::load_src(const String& value) +void HTMLIFrameElement::load_src(String const& value) { if (!m_nested_browsing_context) return; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h index 1276480fc9..34149e50ed 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h @@ -22,9 +22,9 @@ public: private: virtual void inserted() override; virtual void removed_from(Node*) override; - virtual void parse_attribute(const FlyString& name, const String& value) override; + virtual void parse_attribute(FlyString const& name, String const& value) override; - void load_src(const String&); + void load_src(String const&); }; void run_iframe_load_event_steps(HTML::HTMLIFrameElement&); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp index bf05d8983e..17fdca1b91 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -70,7 +70,7 @@ void HTMLImageElement::apply_presentational_hints(CSS::StyleProperties& style) c }); } -void HTMLImageElement::parse_attribute(const FlyString& name, const String& value) +void HTMLImageElement::parse_attribute(FlyString const& name, String const& value) { HTMLElement::parse_attribute(name, value); @@ -83,7 +83,7 @@ RefPtr<Layout::Node> HTMLImageElement::create_layout_node(NonnullRefPtr<CSS::Sty return adopt_ref(*new Layout::ImageBox(document(), *this, move(style), m_image_loader)); } -const Gfx::Bitmap* HTMLImageElement::bitmap() const +Gfx::Bitmap const* HTMLImageElement::bitmap() const { return m_image_loader.bitmap(m_image_loader.current_frame_index()); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h index e488e96f58..c7b46db958 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -26,12 +26,12 @@ public: HTMLImageElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLImageElement() override; - virtual void parse_attribute(const FlyString& name, const String& value) override; + virtual void parse_attribute(FlyString const& name, String const& value) override; String alt() const { return attribute(HTML::AttributeNames::alt); } String src() const { return attribute(HTML::AttributeNames::src); } - const Gfx::Bitmap* bitmap() const; + Gfx::Bitmap const* bitmap() const; unsigned width() const; void set_width(unsigned); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index b1f835e43b..acebc098f8 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -53,7 +53,7 @@ void HTMLLinkElement::inserted() } } -void HTMLLinkElement::parse_attribute(const FlyString& name, const String& value) +void HTMLLinkElement::parse_attribute(FlyString const& name, String const& value) { if (name == HTML::AttributeNames::rel) { m_relationship = 0; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h index 9a5153f9db..f033b27d0a 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -29,7 +29,7 @@ public: String href() const { return attribute(HTML::AttributeNames::href); } private: - void parse_attribute(const FlyString&, const String&) override; + void parse_attribute(FlyString const&, String const&) override; // ^ResourceClient virtual void resource_did_fail() override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 0b324c3f05..8c59e43d23 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -23,7 +23,7 @@ HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName HTMLObjectElement::~HTMLObjectElement() = default; -void HTMLObjectElement::parse_attribute(const FlyString& name, const String& value) +void HTMLObjectElement::parse_attribute(FlyString const& name, String const& value) { BrowsingContextContainer::parse_attribute(name, value); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h index 34cb9c4a3a..9b8b7aa558 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h @@ -34,7 +34,7 @@ public: HTMLObjectElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLObjectElement() override; - virtual void parse_attribute(const FlyString& name, const String& value) override; + virtual void parse_attribute(FlyString const& name, String const& value) override; String data() const; void set_data(String const& data) { set_attribute(HTML::AttributeNames::data, data); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLOutputElement.h b/Userland/Libraries/LibWeb/HTML/HTMLOutputElement.h index 3e38612e8e..fb3ad802d0 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLOutputElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLOutputElement.h @@ -23,7 +23,7 @@ public: HTMLOutputElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLOutputElement() override; - const String& type() const + String const& type() const { static String output = "output"; return output; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index 71ab5b1eb9..32fa015405 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -99,7 +99,7 @@ void HTMLScriptElement::execute_script() } // https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match -static bool is_javascript_mime_type_essence_match(const String& string) +static bool is_javascript_mime_type_essence_match(String const& string) { auto lowercase_string = string.to_lowercase(); return lowercase_string.is_one_of("application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/javascript1.0", "text/javascript1.1", "text/javascript1.2", "text/javascript1.3", "text/javascript1.4", "text/javascript1.5", "text/jscript", "text/livescript", "text/x-ecmascript", "text/x-javascript"); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTemplateElement.h b/Userland/Libraries/LibWeb/HTML/HTMLTemplateElement.h index d2eb8509cd..b00dc90bf7 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLTemplateElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLTemplateElement.h @@ -19,7 +19,7 @@ public: virtual ~HTMLTemplateElement() override; NonnullRefPtr<DOM::DocumentFragment> content() { return *m_content; } - const NonnullRefPtr<DOM::DocumentFragment> content() const { return *m_content; } + NonnullRefPtr<DOM::DocumentFragment> const content() const { return *m_content; } virtual void adopted_from(DOM::Document&) override; virtual void cloned(Node& copy, bool clone_children) override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.h index 23c3148b7e..f8705b2551 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.h @@ -23,7 +23,7 @@ public: HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName); virtual ~HTMLTextAreaElement() override; - const String& type() const + String const& type() const { static String textarea = "textarea"; return textarea; diff --git a/Userland/Libraries/LibWeb/HTML/ImageData.h b/Userland/Libraries/LibWeb/HTML/ImageData.h index ed14a5852e..9f5c14d7c0 100644 --- a/Userland/Libraries/LibWeb/HTML/ImageData.h +++ b/Userland/Libraries/LibWeb/HTML/ImageData.h @@ -26,7 +26,7 @@ public: unsigned height() const; Gfx::Bitmap& bitmap() { return m_bitmap; } - const Gfx::Bitmap& bitmap() const { return m_bitmap; } + Gfx::Bitmap const& bitmap() const { return m_bitmap; } JS::Uint8ClampedArray* data(); const JS::Uint8ClampedArray* data() const; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp index 2a9b622df5..f492a4170f 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp @@ -16,17 +16,17 @@ namespace Web::HTML { -bool prescan_should_abort(const ByteBuffer& input, const size_t& position) +bool prescan_should_abort(ByteBuffer const& input, size_t const& position) { return position >= input.size() || position >= 1024; } -bool prescan_is_whitespace_or_slash(const u8& byte) +bool prescan_is_whitespace_or_slash(u8 const& byte) { return byte == '\t' || byte == '\n' || byte == '\f' || byte == '\r' || byte == ' ' || byte == '/'; } -bool prescan_skip_whitespace_and_slashes(const ByteBuffer& input, size_t& position) +bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& position) { while (!prescan_should_abort(input, position) && (input[position] == '\t' || input[position] == '\n' || input[position] == '\f' || input[position] == '\r' || input[position] == ' ' || input[position] == '/')) ++position; @@ -96,7 +96,7 @@ Optional<StringView> extract_character_encoding_from_meta_element(String const& return TextCodec::get_standardized_encoding(encoding); } -RefPtr<DOM::Attribute> prescan_get_attribute(DOM::Document& document, const ByteBuffer& input, size_t& position) +RefPtr<DOM::Attribute> prescan_get_attribute(DOM::Document& document, ByteBuffer const& input, size_t& position) { if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; @@ -160,7 +160,7 @@ value: } // https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding -Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, const ByteBuffer& input) +Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, ByteBuffer const& input) { // https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding @@ -249,7 +249,7 @@ Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, cons } // https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding -String run_encoding_sniffing_algorithm(DOM::Document& document, const ByteBuffer& input) +String run_encoding_sniffing_algorithm(DOM::Document& document, ByteBuffer const& input) { if (input.size() >= 2) { if (input[0] == 0xFE && input[1] == 0xFF) { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h index e388b68d99..6cb9fc7e31 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h @@ -12,12 +12,12 @@ namespace Web::HTML { -bool prescan_should_abort(const ByteBuffer& input, const size_t& position); -bool prescan_is_whitespace_or_slash(const u8& byte); -bool prescan_skip_whitespace_and_slashes(const ByteBuffer& input, size_t& position); +bool prescan_should_abort(ByteBuffer const& input, size_t const& position); +bool prescan_is_whitespace_or_slash(u8 const& byte); +bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& position); Optional<StringView> extract_character_encoding_from_meta_element(String const&); -RefPtr<DOM::Attribute> prescan_get_attribute(DOM::Document&, const ByteBuffer& input, size_t& position); -Optional<String> run_prescan_byte_stream_algorithm(DOM::Document&, const ByteBuffer& input); -String run_encoding_sniffing_algorithm(DOM::Document&, const ByteBuffer& input); +RefPtr<DOM::Attribute> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position); +Optional<String> run_prescan_byte_stream_algorithm(DOM::Document&, ByteBuffer const& input); +String run_encoding_sniffing_algorithm(DOM::Document&, ByteBuffer const& input); } diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index ba5e00dc13..7e59679b08 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -32,7 +32,7 @@ namespace Web::HTML { -static inline void log_parse_error(const SourceLocation& location = SourceLocation::current()) +static inline void log_parse_error(SourceLocation const& location = SourceLocation::current()) { dbgln("Parse error! {}", location); } @@ -118,7 +118,7 @@ static bool is_html_integration_point(DOM::Element const& element) return false; } -RefPtr<DOM::Document> parse_html_document(StringView data, const AK::URL& url, const String& encoding) +RefPtr<DOM::Document> parse_html_document(StringView data, const AK::URL& url, String const& encoding) { auto document = DOM::Document::create(url); auto parser = HTMLParser::create(document, data, encoding); @@ -126,7 +126,7 @@ RefPtr<DOM::Document> parse_html_document(StringView data, const AK::URL& url, c return document; } -HTMLParser::HTMLParser(DOM::Document& document, StringView input, const String& encoding) +HTMLParser::HTMLParser(DOM::Document& document, StringView input, String const& encoding) : m_tokenizer(input, encoding) , m_document(document) { @@ -389,7 +389,7 @@ void HTMLParser::process_using_the_rules_for(InsertionMode mode, HTMLToken& toke } } -DOM::QuirksMode HTMLParser::which_quirks_mode(const HTMLToken& doctype_token) const +DOM::QuirksMode HTMLParser::which_quirks_mode(HTMLToken const& doctype_token) const { if (doctype_token.doctype_data().force_quirks) return DOM::QuirksMode::Yes; @@ -651,7 +651,7 @@ NonnullRefPtr<DOM::Element> HTMLParser::create_element_for(HTMLToken const& toke } // https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element -NonnullRefPtr<DOM::Element> HTMLParser::insert_foreign_element(const HTMLToken& token, const FlyString& namespace_) +NonnullRefPtr<DOM::Element> HTMLParser::insert_foreign_element(HTMLToken const& token, FlyString const& namespace_) { auto adjusted_insertion_location = find_appropriate_place_for_inserting_node(); @@ -677,7 +677,7 @@ NonnullRefPtr<DOM::Element> HTMLParser::insert_foreign_element(const HTMLToken& return element; } -NonnullRefPtr<DOM::Element> HTMLParser::insert_html_element(const HTMLToken& token) +NonnullRefPtr<DOM::Element> HTMLParser::insert_html_element(HTMLToken const& token) { return insert_foreign_element(token, Namespace::HTML); } @@ -1011,7 +1011,7 @@ AnythingElse: process_using_the_rules_for(m_insertion_mode, token); } -void HTMLParser::generate_implied_end_tags(const FlyString& exception) +void HTMLParser::generate_implied_end_tags(FlyString const& exception) { while (current_node().local_name() != exception && current_node().local_name().is_one_of(HTML::TagNames::dd, HTML::TagNames::dt, HTML::TagNames::li, HTML::TagNames::optgroup, HTML::TagNames::option, HTML::TagNames::p, HTML::TagNames::rb, HTML::TagNames::rp, HTML::TagNames::rt, HTML::TagNames::rtc)) (void)m_stack_of_open_elements.pop(); @@ -1335,7 +1335,7 @@ HTMLParser::AdoptionAgencyAlgorithmOutcome HTMLParser::run_the_adoption_agency_a } } -bool HTMLParser::is_special_tag(const FlyString& tag_name, const FlyString& namespace_) +bool HTMLParser::is_special_tag(FlyString const& tag_name, FlyString const& namespace_) { if (namespace_ == Namespace::HTML) { return tag_name.is_one_of( @@ -3357,7 +3357,7 @@ void HTMLParser::reset_the_insertion_mode_appropriately() m_insertion_mode = InsertionMode::InBody; } -const char* HTMLParser::insertion_mode_name() const +char const* HTMLParser::insertion_mode_name() const { switch (m_insertion_mode) { #define __ENUMERATE_INSERTION_MODE(mode) \ @@ -3430,7 +3430,7 @@ NonnullRefPtr<HTMLParser> HTMLParser::create_for_scripting(DOM::Document& docume return adopt_ref(*new HTMLParser(document)); } -NonnullRefPtr<HTMLParser> HTMLParser::create_with_uncertain_encoding(DOM::Document& document, const ByteBuffer& input) +NonnullRefPtr<HTMLParser> HTMLParser::create_with_uncertain_encoding(DOM::Document& document, ByteBuffer const& input) { if (document.has_encoding()) return adopt_ref(*new HTMLParser(document, input, document.encoding().value())); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h index 7fbfb363d6..81d0e46dd3 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h @@ -39,7 +39,7 @@ namespace Web::HTML { __ENUMERATE_INSERTION_MODE(AfterAfterBody) \ __ENUMERATE_INSERTION_MODE(AfterAfterFrameset) -RefPtr<DOM::Document> parse_html_document(StringView, const AK::URL&, const String& encoding); +RefPtr<DOM::Document> parse_html_document(StringView, const AK::URL&, String const& encoding); class HTMLParser : public RefCounted<HTMLParser> { friend class HTMLTokenizer; @@ -67,7 +67,7 @@ public: InsertionMode insertion_mode() const { return m_insertion_mode; } - static bool is_special_tag(const FlyString& tag_name, const FlyString& namespace_); + static bool is_special_tag(FlyString const& tag_name, FlyString const& namespace_); HTMLTokenizer& tokenizer() { return m_tokenizer; } @@ -76,12 +76,12 @@ public: size_t script_nesting_level() const { return m_script_nesting_level; } private: - HTMLParser(DOM::Document&, StringView input, const String& encoding); + HTMLParser(DOM::Document&, StringView input, String const& encoding); HTMLParser(DOM::Document&); - const char* insertion_mode_name() const; + char const* insertion_mode_name() const; - DOM::QuirksMode which_quirks_mode(const HTMLToken&) const; + DOM::QuirksMode which_quirks_mode(HTMLToken const&) const; void handle_initial(HTMLToken&); void handle_before_html(HTMLToken&); @@ -111,7 +111,7 @@ private: void stop_parsing() { m_stop_parsing = true; } - void generate_implied_end_tags(const FlyString& exception = {}); + void generate_implied_end_tags(FlyString const& exception = {}); void generate_all_implied_end_tags_thoroughly(); NonnullRefPtr<DOM::Element> create_element_for(HTMLToken const&, FlyString const& namespace_, DOM::Node const& intended_parent); @@ -124,8 +124,8 @@ private: DOM::Text* find_character_insertion_node(); void flush_character_insertions(); - NonnullRefPtr<DOM::Element> insert_foreign_element(const HTMLToken&, const FlyString&); - NonnullRefPtr<DOM::Element> insert_html_element(const HTMLToken&); + NonnullRefPtr<DOM::Element> insert_foreign_element(HTMLToken const&, FlyString const&); + NonnullRefPtr<DOM::Element> insert_html_element(HTMLToken const&); DOM::Element& current_node(); DOM::Element& adjusted_current_node(); DOM::Element& node_before_current_node(); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp index 838f147df6..1d2453aad6 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.cpp @@ -31,7 +31,7 @@ bool ListOfActiveFormattingElements::contains(const DOM::Element& element) const return false; } -DOM::Element* ListOfActiveFormattingElements::last_element_with_tag_name_before_marker(const FlyString& tag_name) +DOM::Element* ListOfActiveFormattingElements::last_element_with_tag_name_before_marker(FlyString const& tag_name) { for (ssize_t i = m_entries.size() - 1; i >= 0; --i) { auto& entry = m_entries[i]; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h index 9476e28497..bf8293d1f5 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/ListOfActiveFormattingElements.h @@ -34,10 +34,10 @@ public: void remove(DOM::Element&); - const Vector<Entry>& entries() const { return m_entries; } + Vector<Entry> const& entries() const { return m_entries; } Vector<Entry>& entries() { return m_entries; } - DOM::Element* last_element_with_tag_name_before_marker(const FlyString& tag_name); + DOM::Element* last_element_with_tag_name_before_marker(FlyString const& tag_name); void clear_up_to_the_last_marker(); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp index f71b35cdaf..f67c64305d 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp @@ -14,7 +14,7 @@ static Vector<FlyString> s_base_list { "applet", "caption", "html", "table", "td StackOfOpenElements::~StackOfOpenElements() = default; -bool StackOfOpenElements::has_in_scope_impl(const FlyString& tag_name, const Vector<FlyString>& list) const +bool StackOfOpenElements::has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const& list) const { for (ssize_t i = m_elements.size() - 1; i >= 0; --i) { auto& node = m_elements.at(i); @@ -26,12 +26,12 @@ bool StackOfOpenElements::has_in_scope_impl(const FlyString& tag_name, const Vec VERIFY_NOT_REACHED(); } -bool StackOfOpenElements::has_in_scope(const FlyString& tag_name) const +bool StackOfOpenElements::has_in_scope(FlyString const& tag_name) const { return has_in_scope_impl(tag_name, s_base_list); } -bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, const Vector<FlyString>& list) const +bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const& list) const { for (ssize_t i = m_elements.size() - 1; i >= 0; --i) { auto& node = m_elements.at(i); @@ -48,19 +48,19 @@ bool StackOfOpenElements::has_in_scope(const DOM::Element& target_node) const return has_in_scope_impl(target_node, s_base_list); } -bool StackOfOpenElements::has_in_button_scope(const FlyString& tag_name) const +bool StackOfOpenElements::has_in_button_scope(FlyString const& tag_name) const { auto list = s_base_list; list.append("button"); return has_in_scope_impl(tag_name, list); } -bool StackOfOpenElements::has_in_table_scope(const FlyString& tag_name) const +bool StackOfOpenElements::has_in_table_scope(FlyString const& tag_name) const { return has_in_scope_impl(tag_name, { "html", "table", "template" }); } -bool StackOfOpenElements::has_in_list_item_scope(const FlyString& tag_name) const +bool StackOfOpenElements::has_in_list_item_scope(FlyString const& tag_name) const { auto list = s_base_list; list.append("ol"); @@ -74,7 +74,7 @@ bool StackOfOpenElements::has_in_list_item_scope(const FlyString& tag_name) cons // - optgroup in the HTML namespace // - option in the HTML namespace // NOTE: In this case it's "all element types _except_" -bool StackOfOpenElements::has_in_select_scope(const FlyString& tag_name) const +bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const { // https://html.spec.whatwg.org/multipage/parsing.html#has-an-element-in-the-specific-scope for (ssize_t i = m_elements.size() - 1; i >= 0; --i) { @@ -103,7 +103,7 @@ bool StackOfOpenElements::contains(const DOM::Element& element) const return false; } -bool StackOfOpenElements::contains(const FlyString& tag_name) const +bool StackOfOpenElements::contains(FlyString const& tag_name) const { for (auto& element_on_stack : m_elements) { if (element_on_stack.local_name() == tag_name) @@ -112,7 +112,7 @@ bool StackOfOpenElements::contains(const FlyString& tag_name) const return false; } -void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(const FlyString& tag_name) +void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(FlyString const& tag_name) { while (m_elements.last().local_name() != tag_name) (void)pop(); @@ -132,7 +132,7 @@ DOM::Element* StackOfOpenElements::topmost_special_node_below(const DOM::Element return found_element; } -StackOfOpenElements::LastElementResult StackOfOpenElements::last_element_with_tag_name(const FlyString& tag_name) +StackOfOpenElements::LastElementResult StackOfOpenElements::last_element_with_tag_name(FlyString const& tag_name) { for (ssize_t i = m_elements.size() - 1; i >= 0; --i) { auto& element = m_elements[i]; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h index 8c6baae04a..726d7018de 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h @@ -36,21 +36,21 @@ public: const DOM::Element& current_node() const { return m_elements.last(); } DOM::Element& current_node() { return m_elements.last(); } - bool has_in_scope(const FlyString& tag_name) const; - bool has_in_button_scope(const FlyString& tag_name) const; - bool has_in_table_scope(const FlyString& tag_name) const; - bool has_in_list_item_scope(const FlyString& tag_name) const; - bool has_in_select_scope(const FlyString& tag_name) const; + bool has_in_scope(FlyString const& tag_name) const; + bool has_in_button_scope(FlyString const& tag_name) const; + bool has_in_table_scope(FlyString const& tag_name) const; + bool has_in_list_item_scope(FlyString const& tag_name) const; + bool has_in_select_scope(FlyString const& tag_name) const; bool has_in_scope(const DOM::Element&) const; bool contains(const DOM::Element&) const; - bool contains(const FlyString& tag_name) const; + bool contains(FlyString const& tag_name) const; - const NonnullRefPtrVector<DOM::Element>& elements() const { return m_elements; } + NonnullRefPtrVector<DOM::Element> const& elements() const { return m_elements; } NonnullRefPtrVector<DOM::Element>& elements() { return m_elements; } - void pop_until_an_element_with_tag_name_has_been_popped(const FlyString&); + void pop_until_an_element_with_tag_name_has_been_popped(FlyString const&); DOM::Element* topmost_special_node_below(const DOM::Element&); @@ -58,12 +58,12 @@ public: DOM::Element* element; ssize_t index; }; - LastElementResult last_element_with_tag_name(const FlyString&); + LastElementResult last_element_with_tag_name(FlyString const&); DOM::Element* element_immediately_above(DOM::Element const&); private: - bool has_in_scope_impl(const FlyString& tag_name, const Vector<FlyString>&) const; - bool has_in_scope_impl(const DOM::Element& target_node, const Vector<FlyString>&) const; + bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&) const; + bool has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const&) const; NonnullRefPtrVector<DOM::Element> m_elements; }; diff --git a/Userland/Libraries/LibWeb/InProcessWebView.cpp b/Userland/Libraries/LibWeb/InProcessWebView.cpp index 688b0994cb..3ecd087454 100644 --- a/Userland/Libraries/LibWeb/InProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/InProcessWebView.cpp @@ -64,7 +64,7 @@ void InProcessWebView::page_did_layout() set_content_size(layout_root()->paint_box()->content_size().to_type<int>()); } -void InProcessWebView::page_did_change_title(const String& title) +void InProcessWebView::page_did_change_title(String const& title) { if (on_title_change) on_title_change(title); @@ -101,19 +101,19 @@ void InProcessWebView::page_did_request_cursor_change(Gfx::StandardCursor cursor set_override_cursor(cursor); } -void InProcessWebView::page_did_request_context_menu(const Gfx::IntPoint& content_position) +void InProcessWebView::page_did_request_context_menu(Gfx::IntPoint const& content_position) { if (on_context_menu_request) on_context_menu_request(screen_relative_rect().location().translated(to_widget_position(content_position))); } -void InProcessWebView::page_did_request_link_context_menu(const Gfx::IntPoint& content_position, const AK::URL& url, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) +void InProcessWebView::page_did_request_link_context_menu(Gfx::IntPoint const& content_position, const AK::URL& url, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers) { if (on_link_context_menu_request) on_link_context_menu_request(url, screen_relative_rect().location().translated(to_widget_position(content_position))); } -void InProcessWebView::page_did_request_image_context_menu(const Gfx::IntPoint& content_position, const AK::URL& url, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers, const Gfx::Bitmap* bitmap) +void InProcessWebView::page_did_request_image_context_menu(Gfx::IntPoint const& content_position, const AK::URL& url, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const* bitmap) { if (!on_image_context_menu_request) return; @@ -123,19 +123,19 @@ void InProcessWebView::page_did_request_image_context_menu(const Gfx::IntPoint& on_image_context_menu_request(url, screen_relative_rect().location().translated(to_widget_position(content_position)), move(shareable_bitmap)); } -void InProcessWebView::page_did_click_link(const AK::URL& url, const String& target, unsigned modifiers) +void InProcessWebView::page_did_click_link(const AK::URL& url, String const& target, unsigned modifiers) { if (on_link_click) on_link_click(url, target, modifiers); } -void InProcessWebView::page_did_middle_click_link(const AK::URL& url, const String& target, unsigned modifiers) +void InProcessWebView::page_did_middle_click_link(const AK::URL& url, String const& target, unsigned modifiers) { if (on_link_middle_click) on_link_middle_click(url, target, modifiers); } -void InProcessWebView::page_did_enter_tooltip_area([[maybe_unused]] const Gfx::IntPoint& content_position, const String& title) +void InProcessWebView::page_did_enter_tooltip_area([[maybe_unused]] Gfx::IntPoint const& content_position, String const& title) { GUI::Application::the()->show_tooltip(title, nullptr); } @@ -157,12 +157,12 @@ void InProcessWebView::page_did_unhover_link() on_link_hover({}); } -void InProcessWebView::page_did_invalidate(const Gfx::IntRect&) +void InProcessWebView::page_did_invalidate(Gfx::IntRect const&) { update(); } -void InProcessWebView::page_did_change_favicon(const Gfx::Bitmap& bitmap) +void InProcessWebView::page_did_change_favicon(Gfx::Bitmap const& bitmap) { if (on_favicon_change) on_favicon_change(bitmap); @@ -306,7 +306,7 @@ bool InProcessWebView::load(const AK::URL& url) return page().top_level_browsing_context().loader().load(url, FrameLoader::Type::Navigation); } -const Layout::InitialContainingBlock* InProcessWebView::layout_root() const +Layout::InitialContainingBlock const* InProcessWebView::layout_root() const { return document() ? document()->layout_node() : nullptr; } @@ -318,7 +318,7 @@ Layout::InitialContainingBlock* InProcessWebView::layout_root() return const_cast<Layout::InitialContainingBlock*>(document()->layout_node()); } -void InProcessWebView::page_did_request_scroll_into_view(const Gfx::IntRect& rect) +void InProcessWebView::page_did_request_scroll_into_view(Gfx::IntRect const& rect) { scroll_into_view(rect, true, true); set_override_cursor(Gfx::StandardCursor::None); @@ -360,18 +360,18 @@ void InProcessWebView::drop_event(GUI::DropEvent& event) AbstractScrollableWidget::drop_event(event); } -void InProcessWebView::page_did_request_alert(const String& message) +void InProcessWebView::page_did_request_alert(String const& message) { GUI::MessageBox::show(window(), message, "Alert", GUI::MessageBox::Type::Information); } -bool InProcessWebView::page_did_request_confirm(const String& message) +bool InProcessWebView::page_did_request_confirm(String const& message) { auto confirm_result = GUI::MessageBox::show(window(), message, "Confirm", GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel); return confirm_result == GUI::Dialog::ExecResult::ExecOK; } -String InProcessWebView::page_did_request_prompt(const String& message, const String& default_) +String InProcessWebView::page_did_request_prompt(String const& message, String const& default_) { String value { default_ }; if (GUI::InputBox::show(window(), value, message, "Prompt") == GUI::InputBox::ExecOK) @@ -386,7 +386,7 @@ String InProcessWebView::page_did_request_cookie(const AK::URL& url, Cookie::Sou return {}; } -void InProcessWebView::page_did_set_cookie(const AK::URL& url, const Cookie::ParsedCookie& cookie, Cookie::Source source) +void InProcessWebView::page_did_set_cookie(const AK::URL& url, Cookie::ParsedCookie const& cookie, Cookie::Source source) { if (on_set_cookie) on_set_cookie(url, cookie, source); diff --git a/Userland/Libraries/LibWeb/InProcessWebView.h b/Userland/Libraries/LibWeb/InProcessWebView.h index b51a384e2c..c62cd6fbdc 100644 --- a/Userland/Libraries/LibWeb/InProcessWebView.h +++ b/Userland/Libraries/LibWeb/InProcessWebView.h @@ -32,7 +32,7 @@ public: void set_document(DOM::Document*); - const Layout::InitialContainingBlock* layout_root() const; + Layout::InitialContainingBlock const* layout_root() const; Layout::InitialContainingBlock* layout_root(); void reload(); @@ -50,7 +50,7 @@ private: InProcessWebView(); Page& page() { return *m_page; } - const Page& page() const { return *m_page; } + Page const& page() const { return *m_page; } virtual void resize_event(GUI::ResizeEvent&) override; virtual void paint_event(GUI::PaintEvent&) override; @@ -67,30 +67,30 @@ private: virtual Gfx::Palette palette() const override { return GUI::AbstractScrollableWidget::palette(); } virtual Gfx::IntRect screen_rect() const override { return GUI::Desktop::the().rect(); } virtual CSS::PreferredColorScheme preferred_color_scheme() const override { return m_preferred_color_scheme; } - virtual void page_did_change_title(const String&) override; + virtual void page_did_change_title(String const&) override; virtual void page_did_set_document_in_top_level_browsing_context(DOM::Document*) override; virtual void page_did_start_loading(const AK::URL&) override; virtual void page_did_finish_loading(const AK::URL&) override; virtual void page_did_change_selection() override; virtual void page_did_request_cursor_change(Gfx::StandardCursor) override; - virtual void page_did_request_context_menu(const Gfx::IntPoint&) override; - virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const AK::URL&, const String& target, unsigned modifiers) override; - virtual void page_did_request_image_context_menu(const Gfx::IntPoint&, const AK::URL&, const String& target, unsigned modifiers, const Gfx::Bitmap*) override; - virtual void page_did_click_link(const AK::URL&, const String& target, unsigned modifiers) override; - virtual void page_did_middle_click_link(const AK::URL&, const String& target, unsigned modifiers) override; - virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) override; + virtual void page_did_request_context_menu(Gfx::IntPoint const&) override; + virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers) override; + virtual void page_did_request_image_context_menu(Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers, Gfx::Bitmap const*) override; + virtual void page_did_click_link(const AK::URL&, String const& target, unsigned modifiers) override; + virtual void page_did_middle_click_link(const AK::URL&, String const& target, unsigned modifiers) override; + virtual void page_did_enter_tooltip_area(Gfx::IntPoint const&, String const&) override; virtual void page_did_leave_tooltip_area() override; virtual void page_did_hover_link(const AK::URL&) override; virtual void page_did_unhover_link() override; - virtual void page_did_invalidate(const Gfx::IntRect&) override; - virtual void page_did_change_favicon(const Gfx::Bitmap&) override; + virtual void page_did_invalidate(Gfx::IntRect const&) override; + virtual void page_did_change_favicon(Gfx::Bitmap const&) override; virtual void page_did_layout() override; - virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override; - virtual void page_did_request_alert(const String&) override; - virtual bool page_did_request_confirm(const String&) override; - virtual String page_did_request_prompt(const String&, const String&) override; + virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) override; + virtual void page_did_request_alert(String const&) override; + virtual bool page_did_request_confirm(String const&) override; + virtual String page_did_request_prompt(String const&, String const&) override; virtual String page_did_request_cookie(const AK::URL&, Cookie::Source) override; - virtual void page_did_set_cookie(const AK::URL&, const Cookie::ParsedCookie&, Cookie::Source) override; + virtual void page_did_set_cookie(const AK::URL&, Cookie::ParsedCookie const&, Cookie::Source) override; void layout_and_sync_size(); diff --git a/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp b/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp index d958c55d3b..e46bbda70d 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp @@ -27,7 +27,7 @@ bool BlockContainer::is_scrollable() const return computed_values().overflow_y() == CSS::Overflow::Scroll; } -void BlockContainer::set_scroll_offset(const Gfx::FloatPoint& offset) +void BlockContainer::set_scroll_offset(Gfx::FloatPoint const& offset) { // FIXME: If there is horizontal and vertical scroll ignore only part of the new offset if (offset.y() < 0 || m_scroll_offset == offset) diff --git a/Userland/Libraries/LibWeb/Layout/BlockContainer.h b/Userland/Libraries/LibWeb/Layout/BlockContainer.h index fbff185595..0735a45553 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockContainer.h +++ b/Userland/Libraries/LibWeb/Layout/BlockContainer.h @@ -19,13 +19,13 @@ public: virtual ~BlockContainer() override; BlockContainer* previous_sibling() { return verify_cast<BlockContainer>(Node::previous_sibling()); } - const BlockContainer* previous_sibling() const { return verify_cast<BlockContainer>(Node::previous_sibling()); } + BlockContainer const* previous_sibling() const { return verify_cast<BlockContainer>(Node::previous_sibling()); } BlockContainer* next_sibling() { return verify_cast<BlockContainer>(Node::next_sibling()); } - const BlockContainer* next_sibling() const { return verify_cast<BlockContainer>(Node::next_sibling()); } + BlockContainer const* next_sibling() const { return verify_cast<BlockContainer>(Node::next_sibling()); } bool is_scrollable() const; - const Gfx::FloatPoint& scroll_offset() const { return m_scroll_offset; } - void set_scroll_offset(const Gfx::FloatPoint&); + Gfx::FloatPoint const& scroll_offset() const { return m_scroll_offset; } + void set_scroll_offset(Gfx::FloatPoint const&); Painting::PaintableWithLines const* paint_box() const; diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index e8e4cc63eb..995af034dc 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -115,10 +115,10 @@ void BlockFormattingContext::compute_width(Box const& box, LayoutMode layout_mod auto margin_left = CSS::Length::make_auto(); auto margin_right = CSS::Length::make_auto(); - const auto padding_left = computed_values.padding().left.resolved(box, width_of_containing_block_as_length).resolved(box); - const auto padding_right = computed_values.padding().right.resolved(box, width_of_containing_block_as_length).resolved(box); + auto const padding_left = computed_values.padding().left.resolved(box, width_of_containing_block_as_length).resolved(box); + auto const padding_right = computed_values.padding().right.resolved(box, width_of_containing_block_as_length).resolved(box); - auto try_compute_width = [&](const auto& a_width) { + auto try_compute_width = [&](auto const& a_width) { CSS::Length width = a_width; margin_left = computed_values.margin().left.resolved(box, width_of_containing_block_as_length).resolved(box); margin_right = computed_values.margin().right.resolved(box, width_of_containing_block_as_length).resolved(box); @@ -253,8 +253,8 @@ void BlockFormattingContext::compute_width_for_floating_box(Box const& box, Layo auto margin_left = computed_values.margin().left.resolved(box, width_of_containing_block_as_length).resolved(box); auto margin_right = computed_values.margin().right.resolved(box, width_of_containing_block_as_length).resolved(box); - const auto padding_left = computed_values.padding().left.resolved(box, width_of_containing_block_as_length).resolved(box); - const auto padding_right = computed_values.padding().right.resolved(box, width_of_containing_block_as_length).resolved(box); + auto const padding_left = computed_values.padding().left.resolved(box, width_of_containing_block_as_length).resolved(box); + auto const padding_right = computed_values.padding().right.resolved(box, width_of_containing_block_as_length).resolved(box); // If 'margin-left', or 'margin-right' are computed as 'auto', their used value is '0'. if (margin_left.is_auto()) diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index 5dcd1dcfde..603aa176eb 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -29,7 +29,7 @@ FormattingContext::FormattingContext(Type type, FormattingState& state, Box cons FormattingContext::~FormattingContext() = default; -bool FormattingContext::creates_block_formatting_context(const Box& box) +bool FormattingContext::creates_block_formatting_context(Box const& box) { if (box.is_root_element()) return true; @@ -472,12 +472,12 @@ void FormattingContext::compute_width_for_absolutely_positioned_non_replaced_ele auto margin_left = CSS::Length::make_auto(); auto margin_right = CSS::Length::make_auto(); - const auto border_left = computed_values.border_left().width; - const auto border_right = computed_values.border_right().width; - const auto padding_left = computed_values.padding().left.resolved(box, width_of_containing_block).to_px(box); - const auto padding_right = computed_values.padding().right.resolved(box, width_of_containing_block).to_px(box); + auto const border_left = computed_values.border_left().width; + auto const border_right = computed_values.border_right().width; + auto const padding_left = computed_values.padding().left.resolved(box, width_of_containing_block).to_px(box); + auto const padding_right = computed_values.padding().right.resolved(box, width_of_containing_block).to_px(box); - auto try_compute_width = [&](const auto& a_width) { + auto try_compute_width = [&](auto const& a_width) { margin_left = computed_values.margin().left.resolved(box, width_of_containing_block).resolved(box); margin_right = computed_values.margin().right.resolved(box, width_of_containing_block).resolved(box); diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.h b/Userland/Libraries/LibWeb/Layout/FormattingContext.h index da0a787241..fff8e18f28 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.h @@ -29,14 +29,14 @@ public: Box const& context_box() const { return m_context_box; } FormattingContext* parent() { return m_parent; } - const FormattingContext* parent() const { return m_parent; } + FormattingContext const* parent() const { return m_parent; } Type type() const { return m_type; } bool is_block_formatting_context() const { return type() == Type::Block; } virtual bool inhibits_floating() const { return false; } - static bool creates_block_formatting_context(const Box&); + static bool creates_block_formatting_context(Box const&); static float compute_width_for_replaced_element(FormattingState const&, ReplacedBox const&); static float compute_height_for_replaced_element(FormattingState const&, ReplacedBox const&); diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp index ebf27336a7..6063949272 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp @@ -12,7 +12,7 @@ namespace Web::Layout { -ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style, const ImageLoader& image_loader) +ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style, ImageLoader const& image_loader) : ReplacedBox(document, element, move(style)) , m_image_loader(image_loader) { diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.h b/Userland/Libraries/LibWeb/Layout/ImageBox.h index 44a493da48..f03ea9c723 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.h +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.h @@ -16,7 +16,7 @@ class ImageBox : public ReplacedBox , public HTML::BrowsingContext::ViewportClient { public: - ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, const ImageLoader&); + ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, ImageLoader const&); virtual ~ImageBox() override; virtual void prepare_for_replaced_layout() override; @@ -36,7 +36,7 @@ private: int preferred_width() const; int preferred_height() const; - const ImageLoader& m_image_loader; + ImageLoader const& m_image_loader; }; } diff --git a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp index 8bb8b3582f..c76424dffe 100644 --- a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp +++ b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp @@ -78,13 +78,13 @@ void InitialContainingBlock::recompute_selection_states() }); } -void InitialContainingBlock::set_selection(const LayoutRange& selection) +void InitialContainingBlock::set_selection(LayoutRange const& selection) { m_selection = selection; recompute_selection_states(); } -void InitialContainingBlock::set_selection_end(const LayoutPosition& position) +void InitialContainingBlock::set_selection_end(LayoutPosition const& position) { m_selection.set_end(position); recompute_selection_states(); diff --git a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.h b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.h index 2c35b82f1c..5d54ada9c0 100644 --- a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.h +++ b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.h @@ -20,9 +20,9 @@ public: void paint_all_phases(PaintContext&); - const LayoutRange& selection() const { return m_selection; } - void set_selection(const LayoutRange&); - void set_selection_end(const LayoutPosition&); + LayoutRange const& selection() const { return m_selection; } + void set_selection(LayoutRange const&); + void set_selection_end(LayoutPosition const&); void build_stacking_context_tree_if_needed(); void recompute_selection_states(); diff --git a/Userland/Libraries/LibWeb/Layout/Label.cpp b/Userland/Libraries/LibWeb/Layout/Label.cpp index ece03ad1a1..fc8ef56649 100644 --- a/Userland/Libraries/LibWeb/Layout/Label.cpp +++ b/Userland/Libraries/LibWeb/Layout/Label.cpp @@ -65,7 +65,7 @@ void Label::handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPo } } -bool Label::is_inside_associated_label(LabelableNode const& control, const Gfx::IntPoint& position) +bool Label::is_inside_associated_label(LabelableNode const& control, Gfx::IntPoint const& position) { if (auto* label = label_for_control_node(control); label) return enclosing_int_rect(label->paint_box()->absolute_rect()).contains(position); diff --git a/Userland/Libraries/LibWeb/Layout/Label.h b/Userland/Libraries/LibWeb/Layout/Label.h index 1cd942306a..5cee1a986c 100644 --- a/Userland/Libraries/LibWeb/Layout/Label.h +++ b/Userland/Libraries/LibWeb/Layout/Label.h @@ -22,9 +22,9 @@ public: const HTML::HTMLLabelElement& dom_node() const { return static_cast<const HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); } HTML::HTMLLabelElement& dom_node() { return static_cast<HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); } - void handle_mousedown_on_label(Badge<Painting::TextPaintable>, const Gfx::IntPoint&, unsigned button); - void handle_mouseup_on_label(Badge<Painting::TextPaintable>, const Gfx::IntPoint&, unsigned button); - void handle_mousemove_on_label(Badge<Painting::TextPaintable>, const Gfx::IntPoint&, unsigned button); + void handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button); + void handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button); + void handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button); LabelableNode* labeled_control(); diff --git a/Userland/Libraries/LibWeb/Layout/LayoutPosition.h b/Userland/Libraries/LibWeb/Layout/LayoutPosition.h index 7f5d221139..f924e75ebb 100644 --- a/Userland/Libraries/LibWeb/Layout/LayoutPosition.h +++ b/Userland/Libraries/LibWeb/Layout/LayoutPosition.h @@ -24,7 +24,7 @@ struct LayoutPosition { class LayoutRange { public: LayoutRange() = default; - LayoutRange(const LayoutPosition& start, const LayoutPosition& end) + LayoutRange(LayoutPosition const& start, LayoutPosition const& end) : m_start(start) , m_end(end) { @@ -32,18 +32,18 @@ public: bool is_valid() const { return m_start.layout_node && m_end.layout_node; } - void set(const LayoutPosition& start, const LayoutPosition& end) + void set(LayoutPosition const& start, LayoutPosition const& end) { m_start = start; m_end = end; } - void set_start(const LayoutPosition& start) { m_start = start; } - void set_end(const LayoutPosition& end) { m_end = end; } + void set_start(LayoutPosition const& start) { m_start = start; } + void set_end(LayoutPosition const& end) { m_end = end; } - const LayoutPosition& start() const { return m_start; } + LayoutPosition const& start() const { return m_start; } LayoutPosition& start() { return m_start; } - const LayoutPosition& end() const { return m_end; } + LayoutPosition const& end() const { return m_end; } LayoutPosition& end() { return m_end; } LayoutRange normalized() const; diff --git a/Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp b/Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp index 795c4dad41..6945417dc3 100644 --- a/Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp +++ b/Userland/Libraries/LibWeb/Layout/LineBoxFragment.cpp @@ -65,7 +65,7 @@ int LineBoxFragment::text_index_at(float x) const return m_start + m_length; } -Gfx::FloatRect LineBoxFragment::selection_rect(const Gfx::Font& font) const +Gfx::FloatRect LineBoxFragment::selection_rect(Gfx::Font const& font) const { if (layout_node().selection_state() == Node::SelectionState::None) return {}; @@ -79,8 +79,8 @@ Gfx::FloatRect LineBoxFragment::selection_rect(const Gfx::Font& font) const if (!is<TextNode>(layout_node())) return {}; - const auto start_index = m_start; - const auto end_index = m_start + m_length; + auto const start_index = m_start; + auto const end_index = m_start + m_length; auto text = this->text(); if (layout_node().selection_state() == Node::SelectionState::StartAndEnd) { diff --git a/Userland/Libraries/LibWeb/Layout/LineBoxFragment.h b/Userland/Libraries/LibWeb/Layout/LineBoxFragment.h index 5338b36bee..2a34112309 100644 --- a/Userland/Libraries/LibWeb/Layout/LineBoxFragment.h +++ b/Userland/Libraries/LibWeb/Layout/LineBoxFragment.h @@ -40,14 +40,14 @@ public: const Gfx::FloatRect absolute_rect() const; Type type() const { return m_type; } - const Gfx::FloatPoint& offset() const { return m_offset; } - void set_offset(const Gfx::FloatPoint& offset) { m_offset = offset; } + Gfx::FloatPoint const& offset() const { return m_offset; } + void set_offset(Gfx::FloatPoint const& offset) { m_offset = offset; } // The baseline of a fragment is the number of pixels from the top to the text baseline. void set_baseline(float y) { m_baseline = y; } float baseline() const { return m_baseline; } - const Gfx::FloatSize& size() const { return m_size; } + Gfx::FloatSize const& size() const { return m_size; } void set_width(float width) { m_size.set_width(width); } void set_height(float height) { m_size.set_height(height); } float width() const { return m_size.width(); } @@ -65,7 +65,7 @@ public: int text_index_at(float x) const; - Gfx::FloatRect selection_rect(const Gfx::Font&) const; + Gfx::FloatRect selection_rect(Gfx::Font const&) const; float height_of_inline_level_box(FormattingState const&) const; float top_of_inline_level_box(FormattingState const&) const; diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index 242275d5df..99803a25b0 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -54,7 +54,7 @@ bool Node::can_contain_boxes_with_position_absolute() const return computed_values().position() != CSS::Position::Static || is<InitialContainingBlock>(*this); } -const BlockContainer* Node::containing_block() const +BlockContainer const* Node::containing_block() const { if (is<TextNode>(*this)) return first_ancestor_of_type<BlockContainer>(); @@ -67,7 +67,7 @@ const BlockContainer* Node::containing_block() const ancestor = ancestor->parent(); while (ancestor && (!is<BlockContainer>(*ancestor) || ancestor->is_anonymous())) ancestor = ancestor->containing_block(); - return static_cast<const BlockContainer*>(ancestor); + return static_cast<BlockContainer const*>(ancestor); } if (position == CSS::Position::Fixed) @@ -102,7 +102,7 @@ HTML::BrowsingContext& Node::browsing_context() return *document().browsing_context(); } -const InitialContainingBlock& Node::root() const +InitialContainingBlock const& Node::root() const { VERIFY(document().layout_node()); return *document().layout_node(); diff --git a/Userland/Libraries/LibWeb/Layout/Node.h b/Userland/Libraries/LibWeb/Layout/Node.h index 0c7bccfbab..e562348cfd 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.h +++ b/Userland/Libraries/LibWeb/Layout/Node.h @@ -57,7 +57,7 @@ public: HTML::BrowsingContext const& browsing_context() const; HTML::BrowsingContext& browsing_context(); - const InitialContainingBlock& root() const; + InitialContainingBlock const& root() const; InitialContainingBlock& root(); bool is_root_element() const; @@ -99,19 +99,19 @@ public: bool is_flex_item() const { return m_is_flex_item; } void set_flex_item(bool b) { m_is_flex_item = b; } - const BlockContainer* containing_block() const; - BlockContainer* containing_block() { return const_cast<BlockContainer*>(const_cast<const Node*>(this)->containing_block()); } + BlockContainer const* containing_block() const; + BlockContainer* containing_block() { return const_cast<BlockContainer*>(const_cast<Node const*>(this)->containing_block()); } bool establishes_stacking_context() const; bool can_contain_boxes_with_position_absolute() const; - const Gfx::Font& font() const; + Gfx::Font const& font() const; const CSS::ImmutableComputedValues& computed_values() const; float line_height() const; NodeWithStyle* parent(); - const NodeWithStyle* parent() const; + NodeWithStyle const* parent() const; void inserted_into(Node&) { } void removed_from(Node&) { } @@ -165,7 +165,7 @@ public: void apply_style(const CSS::StyleProperties&); - const Gfx::Font& font() const { return *m_font; } + Gfx::Font const& font() const { return *m_font; } float line_height() const { return m_line_height; } Vector<CSS::BackgroundLayerData> const& background_layers() const { return computed_values().background_layers(); } const CSS::ImageStyleValue* list_style_image() const { return m_list_style_image; } @@ -197,7 +197,7 @@ private: class NodeWithStyleAndBoxModelMetrics : public NodeWithStyle { public: BoxModelMetrics& box_model() { return m_box_model; } - const BoxModelMetrics& box_model() const { return m_box_model; } + BoxModelMetrics const& box_model() const { return m_box_model; } protected: NodeWithStyleAndBoxModelMetrics(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style) @@ -214,17 +214,17 @@ private: BoxModelMetrics m_box_model; }; -inline const Gfx::Font& Node::font() const +inline Gfx::Font const& Node::font() const { if (m_has_style) - return static_cast<const NodeWithStyle*>(this)->font(); + return static_cast<NodeWithStyle const*>(this)->font(); return parent()->font(); } inline const CSS::ImmutableComputedValues& Node::computed_values() const { if (m_has_style) - return static_cast<const NodeWithStyle*>(this)->computed_values(); + return static_cast<NodeWithStyle const*>(this)->computed_values(); return parent()->computed_values(); } @@ -235,9 +235,9 @@ inline float Node::line_height() const return parent()->line_height(); } -inline const NodeWithStyle* Node::parent() const +inline NodeWithStyle const* Node::parent() const { - return static_cast<const NodeWithStyle*>(TreeNode<Node>::parent()); + return static_cast<NodeWithStyle const*>(TreeNode<Node>::parent()); } inline NodeWithStyle* Node::parent() diff --git a/Userland/Libraries/LibWeb/Layout/TableCellBox.h b/Userland/Libraries/LibWeb/Layout/TableCellBox.h index ab78c133f4..3662c62fa0 100644 --- a/Userland/Libraries/LibWeb/Layout/TableCellBox.h +++ b/Userland/Libraries/LibWeb/Layout/TableCellBox.h @@ -17,7 +17,7 @@ public: virtual ~TableCellBox() override; TableCellBox* next_cell() { return next_sibling_of_type<TableCellBox>(); } - const TableCellBox* next_cell() const { return next_sibling_of_type<TableCellBox>(); } + TableCellBox const* next_cell() const { return next_sibling_of_type<TableCellBox>(); } size_t colspan() const; diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.h b/Userland/Libraries/LibWeb/Layout/TextNode.h index f468b87089..18e604edb4 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.h +++ b/Userland/Libraries/LibWeb/Layout/TextNode.h @@ -21,7 +21,7 @@ public: const DOM::Text& dom_node() const { return static_cast<const DOM::Text&>(*Node::dom_node()); } - const String& text_for_rendering() const { return m_text_for_rendering; } + String const& text_for_rendering() const { return m_text_for_rendering; } struct Chunk { Utf8View view; @@ -40,8 +40,8 @@ public: Optional<Chunk> try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit = false) const; const LayoutMode m_layout_mode; - const bool m_wrap_lines; - const bool m_respect_linebreaks; + bool const m_wrap_lines; + bool const m_respect_linebreaks; Utf8View m_utf8_view; Utf8View::Iterator m_iterator; }; diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index 38c60284f2..6795a1e3af 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -343,7 +343,7 @@ static bool is_table_track_group(CSS::Display display) || display.is_table_column_group(); } -static bool is_not_proper_table_child(const Node& node) +static bool is_not_proper_table_child(Node const& node) { if (!node.has_style()) return true; @@ -351,7 +351,7 @@ static bool is_not_proper_table_child(const Node& node) return !is_table_track_group(display) && !is_table_track(display) && !display.is_table_caption(); } -static bool is_not_table_row(const Node& node) +static bool is_not_table_row(Node const& node) { if (!node.has_style()) return true; @@ -359,7 +359,7 @@ static bool is_not_table_row(const Node& node) return !display.is_table_row(); } -static bool is_not_table_cell(const Node& node) +static bool is_not_table_cell(Node const& node) { if (!node.has_style()) return true; diff --git a/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp b/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp index 8c3941d4e9..adce6815a4 100644 --- a/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp +++ b/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp @@ -33,7 +33,7 @@ bool ContentFilter::is_filtered(const AK::URL& url) const return false; } -void ContentFilter::add_pattern(const String& pattern) +void ContentFilter::add_pattern(String const& pattern) { StringBuilder builder; if (!pattern.starts_with('*')) diff --git a/Userland/Libraries/LibWeb/Loader/ContentFilter.h b/Userland/Libraries/LibWeb/Loader/ContentFilter.h index ac7c45d66b..6295364e31 100644 --- a/Userland/Libraries/LibWeb/Loader/ContentFilter.h +++ b/Userland/Libraries/LibWeb/Loader/ContentFilter.h @@ -16,7 +16,7 @@ public: static ContentFilter& the(); bool is_filtered(const AK::URL&) const; - void add_pattern(const String&); + void add_pattern(String const&); private: ContentFilter(); diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 648fbb179a..e690c83155 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -39,7 +39,7 @@ FrameLoader::FrameLoader(HTML::BrowsingContext& browsing_context) FrameLoader::~FrameLoader() = default; -static bool build_markdown_document(DOM::Document& document, const ByteBuffer& data) +static bool build_markdown_document(DOM::Document& document, ByteBuffer const& data) { auto markdown_document = Markdown::Document::parse(data); if (!markdown_document) @@ -50,7 +50,7 @@ static bool build_markdown_document(DOM::Document& document, const ByteBuffer& d return true; } -static bool build_text_document(DOM::Document& document, const ByteBuffer& data) +static bool build_text_document(DOM::Document& document, ByteBuffer const& data) { auto html_element = document.create_element("html").release_value(); document.append_child(html_element); @@ -106,7 +106,7 @@ static bool build_image_document(DOM::Document& document, ByteBuffer const& data return true; } -static bool build_gemini_document(DOM::Document& document, const ByteBuffer& data) +static bool build_gemini_document(DOM::Document& document, ByteBuffer const& data) { StringView gemini_data { data }; auto gemini_document = Gemini::Document::parse(gemini_data, document.url()); @@ -120,7 +120,7 @@ static bool build_gemini_document(DOM::Document& document, const ByteBuffer& dat return true; } -static bool build_xml_document(DOM::Document& document, const ByteBuffer& data) +static bool build_xml_document(DOM::Document& document, ByteBuffer const& data) { XML::Parser parser(data, { .resolve_external_resource = resolve_xml_resource }); @@ -129,7 +129,7 @@ static bool build_xml_document(DOM::Document& document, const ByteBuffer& data) return !result.is_error() && !builder.has_error(); } -bool FrameLoader::parse_document(DOM::Document& document, const ByteBuffer& data) +bool FrameLoader::parse_document(DOM::Document& document, ByteBuffer const& data) { auto& mime_type = document.content_type(); if (mime_type == "text/html" || mime_type == "image/svg+xml") { @@ -244,7 +244,7 @@ void FrameLoader::load_html(StringView html, const AK::URL& url) // FIXME: Use an actual templating engine (our own one when it's built, preferably // with a way to check these usages at compile time) -void FrameLoader::load_error_page(const AK::URL& failed_url, const String& error) +void FrameLoader::load_error_page(const AK::URL& failed_url, String const& error) { auto error_page_url = "file:///res/html/error.html"; ResourceLoader::the().load( @@ -285,7 +285,7 @@ void FrameLoader::store_response_cookies(AK::URL const& url, String const& cooki auto set_cookie_json_value = MUST(JsonValue::from_string(cookies)); VERIFY(set_cookie_json_value.type() == JsonValue::Type::Array); - for (const auto& set_cookie_entry : set_cookie_json_value.as_array().values()) { + for (auto const& set_cookie_entry : set_cookie_json_value.as_array().values()) { VERIFY(set_cookie_entry.type() == JsonValue::Type::String); auto cookie = Cookie::parse_cookie(set_cookie_entry.as_string()); diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.h b/Userland/Libraries/LibWeb/Loader/FrameLoader.h index 5fecbce26c..5a0eece55c 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.h +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.h @@ -39,9 +39,9 @@ private: virtual void resource_did_load() override; virtual void resource_did_fail() override; - void load_error_page(const AK::URL& failed_url, const String& error_message); + void load_error_page(const AK::URL& failed_url, String const& error_message); void load_favicon(RefPtr<Gfx::Bitmap> bitmap = nullptr); - bool parse_document(DOM::Document&, const ByteBuffer& data); + bool parse_document(DOM::Document&, ByteBuffer const& data); void store_response_cookies(AK::URL const& url, String const& cookies); diff --git a/Userland/Libraries/LibWeb/Loader/ImageLoader.cpp b/Userland/Libraries/LibWeb/Loader/ImageLoader.cpp index 3b1cd1d48f..b6d00ef408 100644 --- a/Userland/Libraries/LibWeb/Loader/ImageLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ImageLoader.cpp @@ -155,7 +155,7 @@ unsigned ImageLoader::height() const return bitmap(0) ? bitmap(0)->height() : 0; } -const Gfx::Bitmap* ImageLoader::bitmap(size_t frame_index) const +Gfx::Bitmap const* ImageLoader::bitmap(size_t frame_index) const { if (!resource()) return nullptr; diff --git a/Userland/Libraries/LibWeb/Loader/ImageLoader.h b/Userland/Libraries/LibWeb/Loader/ImageLoader.h index ad6ece9c71..23c5344b1f 100644 --- a/Userland/Libraries/LibWeb/Loader/ImageLoader.h +++ b/Userland/Libraries/LibWeb/Loader/ImageLoader.h @@ -20,7 +20,7 @@ public: void load(const AK::URL&); - const Gfx::Bitmap* bitmap(size_t index) const; + Gfx::Bitmap const* bitmap(size_t index) const; size_t current_frame_index() const { return m_current_frame_index; } bool has_image() const; diff --git a/Userland/Libraries/LibWeb/Loader/ImageResource.cpp b/Userland/Libraries/LibWeb/Loader/ImageResource.cpp index 76769c7828..874f4d4ee4 100644 --- a/Userland/Libraries/LibWeb/Loader/ImageResource.cpp +++ b/Userland/Libraries/LibWeb/Loader/ImageResource.cpp @@ -15,7 +15,7 @@ NonnullRefPtr<ImageResource> ImageResource::convert_from_resource(Resource& reso return adopt_ref(*new ImageResource(resource)); } -ImageResource::ImageResource(const LoadRequest& request) +ImageResource::ImageResource(LoadRequest const& request) : Resource(Type::Image, request) { } @@ -63,7 +63,7 @@ void ImageResource::decode_if_needed() const m_has_attempted_decode = true; } -const Gfx::Bitmap* ImageResource::bitmap(size_t frame_index) const +Gfx::Bitmap const* ImageResource::bitmap(size_t frame_index) const { decode_if_needed(); if (frame_index >= m_decoded_frames.size()) diff --git a/Userland/Libraries/LibWeb/Loader/ImageResource.h b/Userland/Libraries/LibWeb/Loader/ImageResource.h index c740010a87..0823a19a74 100644 --- a/Userland/Libraries/LibWeb/Loader/ImageResource.h +++ b/Userland/Libraries/LibWeb/Loader/ImageResource.h @@ -23,7 +23,7 @@ public: size_t duration { 0 }; }; - const Gfx::Bitmap* bitmap(size_t frame_index = 0) const; + Gfx::Bitmap const* bitmap(size_t frame_index = 0) const; int frame_duration(size_t frame_index) const; size_t frame_count() const { @@ -44,7 +44,7 @@ public: void update_volatility(); private: - explicit ImageResource(const LoadRequest&); + explicit ImageResource(LoadRequest const&); explicit ImageResource(Resource&); void decode_if_needed() const; @@ -63,7 +63,7 @@ public: protected: ImageResource* resource() { return static_cast<ImageResource*>(ResourceClient::resource()); } - const ImageResource* resource() const { return static_cast<const ImageResource*>(ResourceClient::resource()); } + ImageResource const* resource() const { return static_cast<ImageResource const*>(ResourceClient::resource()); } private: virtual Resource::Type client_type() const override { return Resource::Type::Image; } diff --git a/Userland/Libraries/LibWeb/Loader/LoadRequest.h b/Userland/Libraries/LibWeb/Loader/LoadRequest.h index d220fddac9..43e9bd3db7 100644 --- a/Userland/Libraries/LibWeb/Loader/LoadRequest.h +++ b/Userland/Libraries/LibWeb/Loader/LoadRequest.h @@ -28,24 +28,24 @@ public: const AK::URL& url() const { return m_url; } void set_url(const AK::URL& url) { m_url = url; } - const String& method() const { return m_method; } - void set_method(const String& method) { m_method = method; } + String const& method() const { return m_method; } + void set_method(String const& method) { m_method = method; } - const ByteBuffer& body() const { return m_body; } - void set_body(const ByteBuffer& body) { m_body = body; } + ByteBuffer const& body() const { return m_body; } + void set_body(ByteBuffer const& body) { m_body = body; } void start_timer() { m_load_timer.start(); }; Time load_time() const { return m_load_timer.elapsed_time(); } unsigned hash() const { - auto body_hash = string_hash((const char*)m_body.data(), m_body.size()); + auto body_hash = string_hash((char const*)m_body.data(), m_body.size()); auto body_and_headers_hash = pair_int_hash(body_hash, m_headers.hash()); auto url_and_method_hash = pair_int_hash(m_url.to_string().hash(), m_method.hash()); return pair_int_hash(body_and_headers_hash, url_and_method_hash); } - bool operator==(const LoadRequest& other) const + bool operator==(LoadRequest const& other) const { if (m_headers.size() != other.m_headers.size()) return false; @@ -59,10 +59,10 @@ public: return m_url == other.m_url && m_method == other.m_method && m_body == other.m_body; } - void set_header(const String& name, const String& value) { m_headers.set(name, value); } - String header(const String& name) const { return m_headers.get(name).value_or({}); } + void set_header(String const& name, String const& value) { m_headers.set(name, value); } + String header(String const& name) const { return m_headers.get(name).value_or({}); } - const HashMap<String, String>& headers() const { return m_headers; } + HashMap<String, String> const& headers() const { return m_headers; } private: AK::URL m_url; @@ -78,7 +78,7 @@ namespace AK { template<> struct Traits<Web::LoadRequest> : public GenericTraits<Web::LoadRequest> { - static unsigned hash(const Web::LoadRequest& request) { return request.hash(); } + static unsigned hash(Web::LoadRequest const& request) { return request.hash(); } }; } diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp index 6682756480..525992697a 100644 --- a/Userland/Libraries/LibWeb/Loader/Resource.cpp +++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp @@ -15,14 +15,14 @@ namespace Web { -NonnullRefPtr<Resource> Resource::create(Badge<ResourceLoader>, Type type, const LoadRequest& request) +NonnullRefPtr<Resource> Resource::create(Badge<ResourceLoader>, Type type, LoadRequest const& request) { if (type == Type::Image) return adopt_ref(*new ImageResource(request)); return adopt_ref(*new Resource(type, request)); } -Resource::Resource(Type type, const LoadRequest& request) +Resource::Resource(Type type, LoadRequest const& request) : m_request(request) , m_type(type) { @@ -57,7 +57,7 @@ void Resource::for_each_client(Function<void(ResourceClient&)> callback) } } -static Optional<String> encoding_from_content_type(const String& content_type) +static Optional<String> encoding_from_content_type(String const& content_type) { auto offset = content_type.find("charset="sv); if (offset.has_value()) { @@ -72,7 +72,7 @@ static Optional<String> encoding_from_content_type(const String& content_type) return {}; } -static String mime_type_from_content_type(const String& content_type) +static String mime_type_from_content_type(String const& content_type) { auto offset = content_type.find(';'); if (offset.has_value()) @@ -86,7 +86,7 @@ static bool is_valid_encoding(String const& encoding) return TextCodec::decoder_for(encoding); } -void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap<String, String, CaseInsensitiveStringTraits>& headers, Optional<u32> status_code) +void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<String, String, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code) { VERIFY(!m_loaded); // FIXME: Handle OOM failure. @@ -131,7 +131,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap }); } -void Resource::did_fail(Badge<ResourceLoader>, const String& error, Optional<u32> status_code) +void Resource::did_fail(Badge<ResourceLoader>, String const& error, Optional<u32> status_code) { m_error = error; m_status_code = move(status_code); diff --git a/Userland/Libraries/LibWeb/Loader/Resource.h b/Userland/Libraries/LibWeb/Loader/Resource.h index ad77e9e611..40edf5e41a 100644 --- a/Userland/Libraries/LibWeb/Loader/Resource.h +++ b/Userland/Libraries/LibWeb/Loader/Resource.h @@ -32,7 +32,7 @@ public: Image, }; - static NonnullRefPtr<Resource> create(Badge<ResourceLoader>, Type, const LoadRequest&); + static NonnullRefPtr<Resource> create(Badge<ResourceLoader>, Type, LoadRequest const&); virtual ~Resource(); Type type() const { return m_type; } @@ -40,14 +40,14 @@ public: bool is_loaded() const { return m_loaded; } bool is_failed() const { return m_failed; } - const String& error() const { return m_error; } + String const& error() const { return m_error; } bool has_encoded_data() const { return !m_encoded_data.is_empty(); } const AK::URL& url() const { return m_request.url(); } - const ByteBuffer& encoded_data() const { return m_encoded_data; } + ByteBuffer const& encoded_data() const { return m_encoded_data; } - const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers() const { return m_response_headers; } + HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers() const { return m_response_headers; } [[nodiscard]] Optional<u32> status_code() const { return m_status_code; } @@ -55,16 +55,16 @@ public: void unregister_client(Badge<ResourceClient>, ResourceClient&); bool has_encoding() const { return m_encoding.has_value(); } - const Optional<String>& encoding() const { return m_encoding; } - const String& mime_type() const { return m_mime_type; } + Optional<String> const& encoding() const { return m_encoding; } + String const& mime_type() const { return m_mime_type; } void for_each_client(Function<void(ResourceClient&)>); - void did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap<String, String, CaseInsensitiveStringTraits>& headers, Optional<u32> status_code); - void did_fail(Badge<ResourceLoader>, const String& error, Optional<u32> status_code); + void did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<String, String, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code); + void did_fail(Badge<ResourceLoader>, String const& error, Optional<u32> status_code); protected: - explicit Resource(Type, const LoadRequest&); + explicit Resource(Type, LoadRequest const&); Resource(Type, Resource&); private: @@ -93,7 +93,7 @@ protected: virtual Resource::Type client_type() const { return Resource::Type::Generic; } Resource* resource() { return m_resource; } - const Resource* resource() const { return m_resource; } + Resource const* resource() const { return m_resource; } void set_resource(Resource*); private: diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index 327eed13a4..737598cc3d 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -41,7 +41,7 @@ ResourceLoader::ResourceLoader(NonnullRefPtr<Protocol::RequestClient> protocol_c { } -void ResourceLoader::load_sync(LoadRequest& request, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback) +void ResourceLoader::load_sync(LoadRequest& request, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback) { Core::EventLoop loop; @@ -123,7 +123,7 @@ static void emit_signpost(String const& message, int id) static size_t resource_id = 0; -void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback) +void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback) { auto& url = request.url(); request.start_timer(); @@ -133,13 +133,13 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, con emit_signpost(String::formatted("Starting load: {}", url_for_logging), id); dbgln("ResourceLoader: Starting load of: \"{}\"", url_for_logging); - const auto log_success = [url_for_logging, id](const auto& request) { + auto const log_success = [url_for_logging, id](auto const& request) { auto load_time_ms = request.load_time().to_milliseconds(); emit_signpost(String::formatted("Finished load: {}", url_for_logging), id); dbgln("ResourceLoader: Finished load of: \"{}\", Duration: {}ms", url_for_logging, load_time_ms); }; - const auto log_failure = [url_for_logging, id](const auto& request, const auto error_message) { + auto const log_failure = [url_for_logging, id](auto const& request, auto const error_message) { auto load_time_ms = request.load_time().to_milliseconds(); emit_signpost(String::formatted("Failed load: {}", url_for_logging), id); dbgln("ResourceLoader: Failed load of: \"{}\", \033[31;1mError: {}\033[0m, Duration: {}ms", url_for_logging, error_message, load_time_ms); @@ -267,7 +267,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, con error_callback(not_implemented_error, {}); } -void ResourceLoader::load(const AK::URL& url, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback) +void ResourceLoader::load(const AK::URL& url, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback) { LoadRequest request; request.set_url(url); diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h index 4d31d9f9f3..0f3f7f592c 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h @@ -33,9 +33,9 @@ public: RefPtr<Resource> load_resource(Resource::Type, LoadRequest&); - void load(LoadRequest&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr); - void load(const AK::URL&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr); - void load_sync(LoadRequest&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr); + void load(LoadRequest&, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback = nullptr); + void load(const AK::URL&, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback = nullptr); + void load_sync(LoadRequest&, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback = nullptr); void prefetch_dns(AK::URL const&); void preconnect(AK::URL const&); @@ -46,8 +46,8 @@ public: Protocol::RequestClient& protocol_client() { return *m_protocol_client; } - const String& user_agent() const { return m_user_agent; } - void set_user_agent(const String& user_agent) { m_user_agent = user_agent; } + String const& user_agent() const { return m_user_agent; } + void set_user_agent(String const& user_agent) { m_user_agent = user_agent; } void clear_cache(); void evict_from_cache(LoadRequest const&); diff --git a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp index ae13e676de..7d36522b53 100644 --- a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp +++ b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp @@ -56,7 +56,7 @@ Optional<MimeType> MimeType::from_string(StringView string) // https://fetch.spec.whatwg.org/#http-whitespace // HTTP whitespace is U+000A LF, U+000D CR, or an HTTP tab or space. // An HTTP tab or space is U+0009 TAB or U+0020 SPACE. - constexpr const char* http_whitespace = "\n\r\t "; + constexpr char const* http_whitespace = "\n\r\t "; // 1. Remove any leading and trailing HTTP whitespace from input. auto trimmed_string = string.trim(http_whitespace, TrimMode::Both); diff --git a/Userland/Libraries/LibWeb/Origin.h b/Userland/Libraries/LibWeb/Origin.h index e89be3f9a2..115203ebff 100644 --- a/Userland/Libraries/LibWeb/Origin.h +++ b/Userland/Libraries/LibWeb/Origin.h @@ -14,7 +14,7 @@ namespace Web { class Origin { public: Origin() = default; - Origin(const String& protocol, const String& host, u16 port) + Origin(String const& protocol, String const& host, u16 port) : m_protocol(protocol) , m_host(host) , m_port(port) @@ -24,8 +24,8 @@ public: // https://html.spec.whatwg.org/multipage/origin.html#concept-origin-opaque bool is_opaque() const { return m_protocol.is_null() && m_host.is_null() && m_port == 0; } - const String& protocol() const { return m_protocol; } - const String& host() const { return m_host; } + String const& protocol() const { return m_protocol; } + String const& host() const { return m_host; } u16 port() const { return m_port; } // https://html.spec.whatwg.org/multipage/origin.html#same-origin diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp index 1b838b3691..e3dd13ac99 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp @@ -213,7 +213,7 @@ void OutOfProcessWebView::notify_server_did_paint(Badge<WebContentClient>, i32 b } } -void OutOfProcessWebView::notify_server_did_invalidate_content_rect(Badge<WebContentClient>, [[maybe_unused]] const Gfx::IntRect& content_rect) +void OutOfProcessWebView::notify_server_did_invalidate_content_rect(Badge<WebContentClient>, [[maybe_unused]] Gfx::IntRect const& content_rect) { request_repaint(); } @@ -228,12 +228,12 @@ void OutOfProcessWebView::notify_server_did_request_cursor_change(Badge<WebConte set_override_cursor(cursor); } -void OutOfProcessWebView::notify_server_did_layout(Badge<WebContentClient>, const Gfx::IntSize& content_size) +void OutOfProcessWebView::notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size) { set_content_size(content_size); } -void OutOfProcessWebView::notify_server_did_change_title(Badge<WebContentClient>, const String& title) +void OutOfProcessWebView::notify_server_did_change_title(Badge<WebContentClient>, String const& title) { if (on_title_change) on_title_change(title); @@ -251,12 +251,12 @@ void OutOfProcessWebView::notify_server_did_request_scroll_to(Badge<WebContentCl vertical_scrollbar().set_value(scroll_position.y()); } -void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebContentClient>, const Gfx::IntRect& rect) +void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebContentClient>, Gfx::IntRect const& rect) { scroll_into_view(rect, true, true); } -void OutOfProcessWebView::notify_server_did_enter_tooltip_area(Badge<WebContentClient>, const Gfx::IntPoint&, const String& title) +void OutOfProcessWebView::notify_server_did_enter_tooltip_area(Badge<WebContentClient>, Gfx::IntPoint const&, String const& title) { GUI::Application::the()->show_tooltip(title, nullptr); } @@ -279,13 +279,13 @@ void OutOfProcessWebView::notify_server_did_unhover_link(Badge<WebContentClient> on_link_hover({}); } -void OutOfProcessWebView::notify_server_did_click_link(Badge<WebContentClient>, const AK::URL& url, const String& target, unsigned int modifiers) +void OutOfProcessWebView::notify_server_did_click_link(Badge<WebContentClient>, const AK::URL& url, String const& target, unsigned int modifiers) { if (on_link_click) on_link_click(url, target, modifiers); } -void OutOfProcessWebView::notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL& url, const String& target, unsigned int modifiers) +void OutOfProcessWebView::notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL& url, String const& target, unsigned int modifiers) { if (on_link_middle_click) on_link_middle_click(url, target, modifiers); @@ -303,36 +303,36 @@ void OutOfProcessWebView::notify_server_did_finish_loading(Badge<WebContentClien on_load_finish(url); } -void OutOfProcessWebView::notify_server_did_request_context_menu(Badge<WebContentClient>, const Gfx::IntPoint& content_position) +void OutOfProcessWebView::notify_server_did_request_context_menu(Badge<WebContentClient>, Gfx::IntPoint const& content_position) { if (on_context_menu_request) on_context_menu_request(screen_relative_rect().location().translated(to_widget_position(content_position))); } -void OutOfProcessWebView::notify_server_did_request_link_context_menu(Badge<WebContentClient>, const Gfx::IntPoint& content_position, const AK::URL& url, const String&, unsigned) +void OutOfProcessWebView::notify_server_did_request_link_context_menu(Badge<WebContentClient>, Gfx::IntPoint const& content_position, const AK::URL& url, String const&, unsigned) { if (on_link_context_menu_request) on_link_context_menu_request(url, screen_relative_rect().location().translated(to_widget_position(content_position))); } -void OutOfProcessWebView::notify_server_did_request_image_context_menu(Badge<WebContentClient>, const Gfx::IntPoint& content_position, const AK::URL& url, const String&, unsigned, const Gfx::ShareableBitmap& bitmap) +void OutOfProcessWebView::notify_server_did_request_image_context_menu(Badge<WebContentClient>, Gfx::IntPoint const& content_position, const AK::URL& url, String const&, unsigned, Gfx::ShareableBitmap const& bitmap) { if (on_image_context_menu_request) on_image_context_menu_request(url, screen_relative_rect().location().translated(to_widget_position(content_position)), bitmap); } -void OutOfProcessWebView::notify_server_did_request_alert(Badge<WebContentClient>, const String& message) +void OutOfProcessWebView::notify_server_did_request_alert(Badge<WebContentClient>, String const& message) { GUI::MessageBox::show(window(), message, "Alert", GUI::MessageBox::Type::Information); } -bool OutOfProcessWebView::notify_server_did_request_confirm(Badge<WebContentClient>, const String& message) +bool OutOfProcessWebView::notify_server_did_request_confirm(Badge<WebContentClient>, String const& message) { auto confirm_result = GUI::MessageBox::show(window(), message, "Confirm", GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel); return confirm_result == GUI::Dialog::ExecResult::ExecOK; } -String OutOfProcessWebView::notify_server_did_request_prompt(Badge<WebContentClient>, const String& message, const String& default_) +String OutOfProcessWebView::notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_) { String response { default_ }; if (GUI::InputBox::show(window(), response, message, "Prompt") == GUI::InputBox::ExecOK) @@ -340,13 +340,13 @@ String OutOfProcessWebView::notify_server_did_request_prompt(Badge<WebContentCli return {}; } -void OutOfProcessWebView::notify_server_did_get_source(const AK::URL& url, const String& source) +void OutOfProcessWebView::notify_server_did_get_source(const AK::URL& url, String const& source) { if (on_get_source) on_get_source(url, source); } -void OutOfProcessWebView::notify_server_did_get_dom_tree(const String& dom_tree) +void OutOfProcessWebView::notify_server_did_get_dom_tree(String const& dom_tree) { if (on_get_dom_tree) on_get_dom_tree(dom_tree); @@ -364,13 +364,13 @@ void OutOfProcessWebView::notify_server_did_output_js_console_message(i32 messag on_js_console_new_message(message_index); } -void OutOfProcessWebView::notify_server_did_get_js_console_messages(i32 start_index, const Vector<String>& message_types, const Vector<String>& messages) +void OutOfProcessWebView::notify_server_did_get_js_console_messages(i32 start_index, Vector<String> const& message_types, Vector<String> const& messages) { if (on_get_js_console_messages) on_get_js_console_messages(start_index, message_types, messages); } -void OutOfProcessWebView::notify_server_did_change_favicon(const Gfx::Bitmap& favicon) +void OutOfProcessWebView::notify_server_did_change_favicon(Gfx::Bitmap const& favicon) { if (on_favicon_change) on_favicon_change(favicon); @@ -383,7 +383,7 @@ String OutOfProcessWebView::notify_server_did_request_cookie(Badge<WebContentCli return {}; } -void OutOfProcessWebView::notify_server_did_set_cookie(Badge<WebContentClient>, const AK::URL& url, const Cookie::ParsedCookie& cookie, Cookie::Source source) +void OutOfProcessWebView::notify_server_did_set_cookie(Badge<WebContentClient>, const AK::URL& url, Cookie::ParsedCookie const& cookie, Cookie::Source source) { if (on_set_cookie) on_set_cookie(url, cookie, source); @@ -422,7 +422,7 @@ WebContentClient& OutOfProcessWebView::client() return *m_client_state.client; } -void OutOfProcessWebView::debug_request(const String& request, const String& argument) +void OutOfProcessWebView::debug_request(String const& request, String const& argument) { client().async_debug_request(request, argument); } @@ -460,7 +460,7 @@ i32 OutOfProcessWebView::get_hovered_node_id() return client().get_hovered_node_id(); } -void OutOfProcessWebView::js_console_input(const String& js_source) +void OutOfProcessWebView::js_console_input(String const& js_source) { client().async_js_console_input(js_source); } diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.h b/Userland/Libraries/LibWeb/OutOfProcessWebView.h index a80c757e3c..f996ae2116 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.h @@ -31,7 +31,7 @@ public: void load_html(StringView, const AK::URL&); void load_empty_document(); - void debug_request(const String& request, const String& argument = {}); + void debug_request(String const& request, String const& argument = {}); void get_source(); void inspect_dom_tree(); @@ -45,7 +45,7 @@ public: void clear_inspected_dom_node(); i32 get_hovered_node_id(); - void js_console_input(const String& js_source); + void js_console_input(String const& js_source); void js_console_request_messages(i32 start_index); void run_javascript(StringView); @@ -58,37 +58,37 @@ public: void set_content_filters(Vector<String>); void set_preferred_color_scheme(Web::CSS::PreferredColorScheme); - void notify_server_did_layout(Badge<WebContentClient>, const Gfx::IntSize& content_size); + void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size); void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id); - void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, const Gfx::IntRect&); + void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&); void notify_server_did_change_selection(Badge<WebContentClient>); void notify_server_did_request_cursor_change(Badge<WebContentClient>, Gfx::StandardCursor cursor); - void notify_server_did_change_title(Badge<WebContentClient>, const String&); + void notify_server_did_change_title(Badge<WebContentClient>, String const&); void notify_server_did_request_scroll(Badge<WebContentClient>, i32, i32); void notify_server_did_request_scroll_to(Badge<WebContentClient>, Gfx::IntPoint const&); - void notify_server_did_request_scroll_into_view(Badge<WebContentClient>, const Gfx::IntRect&); - void notify_server_did_enter_tooltip_area(Badge<WebContentClient>, const Gfx::IntPoint&, const String&); + void notify_server_did_request_scroll_into_view(Badge<WebContentClient>, Gfx::IntRect const&); + void notify_server_did_enter_tooltip_area(Badge<WebContentClient>, Gfx::IntPoint const&, String const&); void notify_server_did_leave_tooltip_area(Badge<WebContentClient>); void notify_server_did_hover_link(Badge<WebContentClient>, const AK::URL&); void notify_server_did_unhover_link(Badge<WebContentClient>); - void notify_server_did_click_link(Badge<WebContentClient>, const AK::URL&, const String& target, unsigned modifiers); - void notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL&, const String& target, unsigned modifiers); + void notify_server_did_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers); + void notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL&, String const& target, unsigned modifiers); void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&); void notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL&); - void notify_server_did_request_context_menu(Badge<WebContentClient>, const Gfx::IntPoint&); - void notify_server_did_request_link_context_menu(Badge<WebContentClient>, const Gfx::IntPoint&, const AK::URL&, const String& target, unsigned modifiers); - void notify_server_did_request_image_context_menu(Badge<WebContentClient>, const Gfx::IntPoint&, const AK::URL&, const String& target, unsigned modifiers, const Gfx::ShareableBitmap&); - void notify_server_did_request_alert(Badge<WebContentClient>, const String& message); - bool notify_server_did_request_confirm(Badge<WebContentClient>, const String& message); - String notify_server_did_request_prompt(Badge<WebContentClient>, const String& message, const String& default_); - void notify_server_did_get_source(const AK::URL& url, const String& source); - void notify_server_did_get_dom_tree(const String& dom_tree); + void notify_server_did_request_context_menu(Badge<WebContentClient>, Gfx::IntPoint const&); + void notify_server_did_request_link_context_menu(Badge<WebContentClient>, Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers); + void notify_server_did_request_image_context_menu(Badge<WebContentClient>, Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers, Gfx::ShareableBitmap const&); + void notify_server_did_request_alert(Badge<WebContentClient>, String const& message); + bool notify_server_did_request_confirm(Badge<WebContentClient>, String const& message); + String notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_); + void notify_server_did_get_source(const AK::URL& url, String const& source); + void notify_server_did_get_dom_tree(String const& dom_tree); void notify_server_did_get_dom_node_properties(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing); void notify_server_did_output_js_console_message(i32 message_index); void notify_server_did_get_js_console_messages(i32 start_index, Vector<String> const& message_types, Vector<String> const& messages); - void notify_server_did_change_favicon(const Gfx::Bitmap& favicon); + void notify_server_did_change_favicon(Gfx::Bitmap const& favicon); String notify_server_did_request_cookie(Badge<WebContentClient>, const AK::URL& url, Cookie::Source source); - void notify_server_did_set_cookie(Badge<WebContentClient>, const AK::URL& url, const Cookie::ParsedCookie& cookie, Cookie::Source source); + void notify_server_did_set_cookie(Badge<WebContentClient>, const AK::URL& url, Cookie::ParsedCookie const& cookie, Cookie::Source source); void notify_server_did_update_resource_count(i32 count_waiting); private: diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index 8ac8a32fed..4f92731e6e 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -80,7 +80,7 @@ static Gfx::StandardCursor cursor_css_to_gfx(Optional<CSS::Cursor> cursor) } } -static Gfx::IntPoint compute_mouse_event_offset(const Gfx::IntPoint& position, const Layout::Node& layout_node) +static Gfx::IntPoint compute_mouse_event_offset(Gfx::IntPoint const& position, Layout::Node const& layout_node) { auto top_left_of_layout_node = layout_node.box_type_agnostic_position(); return { @@ -97,7 +97,7 @@ EventHandler::EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& EventHandler::~EventHandler() = default; -const Layout::InitialContainingBlock* EventHandler::layout_root() const +Layout::InitialContainingBlock const* EventHandler::layout_root() const { if (!m_browsing_context.active_document()) return nullptr; @@ -125,7 +125,7 @@ Painting::PaintableBox const* EventHandler::paint_root() const return const_cast<Painting::PaintableBox*>(m_browsing_context.active_document()->paint_box()); } -bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int buttons, unsigned int modifiers, int wheel_delta_x, int wheel_delta_y) +bool EventHandler::handle_mousewheel(Gfx::IntPoint const& position, unsigned int buttons, unsigned int modifiers, int wheel_delta_x, int wheel_delta_y) { if (m_browsing_context.active_document()) m_browsing_context.active_document()->update_layout(); @@ -150,7 +150,7 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int return false; } -bool EventHandler::handle_mouseup(const Gfx::IntPoint& position, unsigned button, unsigned modifiers) +bool EventHandler::handle_mouseup(Gfx::IntPoint const& position, unsigned button, unsigned modifiers) { if (m_browsing_context.active_document()) m_browsing_context.active_document()->update_layout(); @@ -247,7 +247,7 @@ bool EventHandler::handle_mouseup(const Gfx::IntPoint& position, unsigned button return handled_event; } -bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned button, unsigned modifiers) +bool EventHandler::handle_mousedown(Gfx::IntPoint const& position, unsigned button, unsigned modifiers) { if (m_browsing_context.active_document()) m_browsing_context.active_document()->update_layout(); @@ -341,7 +341,7 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt return true; } -bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned buttons, unsigned modifiers) +bool EventHandler::handle_mousemove(Gfx::IntPoint const& position, unsigned buttons, unsigned modifiers) { if (m_browsing_context.active_document()) m_browsing_context.active_document()->update_layout(); diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.h b/Userland/Libraries/LibWeb/Page/EventHandler.h index c2244f9b46..255d2503ae 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.h +++ b/Userland/Libraries/LibWeb/Page/EventHandler.h @@ -22,10 +22,10 @@ public: explicit EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&); ~EventHandler(); - bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers); - bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers); - bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers); - bool handle_mousewheel(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); + bool handle_mouseup(Gfx::IntPoint const&, unsigned button, unsigned modifiers); + bool handle_mousedown(Gfx::IntPoint const&, unsigned button, unsigned modifiers); + bool handle_mousemove(Gfx::IntPoint const&, unsigned buttons, unsigned modifiers); + bool handle_mousewheel(Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point); bool handle_keyup(KeyCode, unsigned modifiers, u32 code_point); @@ -39,7 +39,7 @@ private: bool focus_previous_element(); Layout::InitialContainingBlock* layout_root(); - const Layout::InitialContainingBlock* layout_root() const; + Layout::InitialContainingBlock const* layout_root() const; Painting::PaintableBox* paint_root(); Painting::PaintableBox const* paint_root() const; diff --git a/Userland/Libraries/LibWeb/Page/Page.cpp b/Userland/Libraries/LibWeb/Page/Page.cpp index 70e8f90c6c..98f748d40a 100644 --- a/Userland/Libraries/LibWeb/Page/Page.cpp +++ b/Userland/Libraries/LibWeb/Page/Page.cpp @@ -59,22 +59,22 @@ CSS::PreferredColorScheme Page::preferred_color_scheme() const return m_client.preferred_color_scheme(); } -bool Page::handle_mousewheel(const Gfx::IntPoint& position, unsigned button, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) +bool Page::handle_mousewheel(Gfx::IntPoint const& position, unsigned button, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) { return top_level_browsing_context().event_handler().handle_mousewheel(position, button, modifiers, wheel_delta_x, wheel_delta_y); } -bool Page::handle_mouseup(const Gfx::IntPoint& position, unsigned button, unsigned modifiers) +bool Page::handle_mouseup(Gfx::IntPoint const& position, unsigned button, unsigned modifiers) { return top_level_browsing_context().event_handler().handle_mouseup(position, button, modifiers); } -bool Page::handle_mousedown(const Gfx::IntPoint& position, unsigned button, unsigned modifiers) +bool Page::handle_mousedown(Gfx::IntPoint const& position, unsigned button, unsigned modifiers) { return top_level_browsing_context().event_handler().handle_mousedown(position, button, modifiers); } -bool Page::handle_mousemove(const Gfx::IntPoint& position, unsigned buttons, unsigned modifiers) +bool Page::handle_mousemove(Gfx::IntPoint const& position, unsigned buttons, unsigned modifiers) { return top_level_browsing_context().event_handler().handle_mousemove(position, buttons, modifiers); } diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h index 3bfe12b0b7..cbf6b1e35b 100644 --- a/Userland/Libraries/LibWeb/Page/Page.h +++ b/Userland/Libraries/LibWeb/Page/Page.h @@ -32,7 +32,7 @@ public: ~Page(); PageClient& client() { return m_client; } - const PageClient& client() const { return m_client; } + PageClient const& client() const { return m_client; } HTML::BrowsingContext& top_level_browsing_context() { return *m_top_level_browsing_context; } HTML::BrowsingContext const& top_level_browsing_context() const { return *m_top_level_browsing_context; } @@ -47,10 +47,10 @@ public: void load_html(StringView, const AK::URL&); - bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers); - bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers); - bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers); - bool handle_mousewheel(const Gfx::IntPoint&, unsigned button, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); + bool handle_mouseup(Gfx::IntPoint const&, unsigned button, unsigned modifiers); + bool handle_mousedown(Gfx::IntPoint const&, unsigned button, unsigned modifiers); + bool handle_mousemove(Gfx::IntPoint const&, unsigned buttons, unsigned modifiers); + bool handle_mousewheel(Gfx::IntPoint const&, unsigned button, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point); bool handle_keyup(KeyCode, unsigned modifiers, u32 code_point); @@ -83,31 +83,31 @@ public: virtual Gfx::IntRect screen_rect() const = 0; virtual CSS::PreferredColorScheme preferred_color_scheme() const = 0; virtual void page_did_set_document_in_top_level_browsing_context(DOM::Document*) { } - virtual void page_did_change_title(const String&) { } + virtual void page_did_change_title(String const&) { } virtual void page_did_start_loading(const AK::URL&) { } virtual void page_did_finish_loading(const AK::URL&) { } virtual void page_did_change_selection() { } virtual void page_did_request_cursor_change(Gfx::StandardCursor) { } - virtual void page_did_request_context_menu(const Gfx::IntPoint&) { } - virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const AK::URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) { } - virtual void page_did_request_image_context_menu(const Gfx::IntPoint&, const AK::URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers, const Gfx::Bitmap*) { } - virtual void page_did_click_link(const AK::URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) { } - virtual void page_did_middle_click_link(const AK::URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) { } - virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) { } + virtual void page_did_request_context_menu(Gfx::IntPoint const&) { } + virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const AK::URL&, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers) { } + virtual void page_did_request_image_context_menu(Gfx::IntPoint const&, const AK::URL&, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { } + virtual void page_did_click_link(const AK::URL&, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers) { } + virtual void page_did_middle_click_link(const AK::URL&, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers) { } + virtual void page_did_enter_tooltip_area(Gfx::IntPoint const&, String const&) { } virtual void page_did_leave_tooltip_area() { } virtual void page_did_hover_link(const AK::URL&) { } virtual void page_did_unhover_link() { } - virtual void page_did_invalidate(const Gfx::IntRect&) { } - virtual void page_did_change_favicon(const Gfx::Bitmap&) { } + virtual void page_did_invalidate(Gfx::IntRect const&) { } + virtual void page_did_change_favicon(Gfx::Bitmap const&) { } virtual void page_did_layout() { } virtual void page_did_request_scroll(i32, i32) { } virtual void page_did_request_scroll_to(Gfx::IntPoint const&) { } - virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) { } - virtual void page_did_request_alert(const String&) { } - virtual bool page_did_request_confirm(const String&) { return false; } - virtual String page_did_request_prompt(const String&, const String&) { return {}; } + virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) { } + virtual void page_did_request_alert(String const&) { } + virtual bool page_did_request_confirm(String const&) { return false; } + virtual String page_did_request_prompt(String const&, String const&) { return {}; } virtual String page_did_request_cookie(const AK::URL&, Cookie::Source) { return {}; } - virtual void page_did_set_cookie(const AK::URL&, const Cookie::ParsedCookie&, Cookie::Source) { } + virtual void page_did_set_cookie(const AK::URL&, Cookie::ParsedCookie const&, Cookie::Source) { } virtual void page_did_update_resource_count(i32) { } protected: diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp index b8397438f2..91dabcc73f 100644 --- a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp @@ -45,7 +45,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& { auto rect = a_rect.to_rounded<float>(); - const auto& border_data = [&] { + auto const& border_data = [&] { switch (edge) { case BorderEdge::Top: return borders_data.top; @@ -71,7 +71,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& Gfx::FloatPoint p2; }; - auto points_for_edge = [](BorderEdge edge, const Gfx::FloatRect& rect) -> Points { + auto points_for_edge = [](BorderEdge edge, Gfx::FloatRect const& rect) -> Points { switch (edge) { case BorderEdge::Top: return { rect.top_left(), rect.top_right() }; diff --git a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp index 9afcff46da..74ce00c66d 100644 --- a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp @@ -35,7 +35,7 @@ Layout::FormAssociatedLabelableNode& LabelablePaintable::layout_box() return static_cast<Layout::FormAssociatedLabelableNode&>(PaintableBox::layout_box()); } -LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned) +LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned) { if (button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled()) return DispatchEventOfSameName::No; @@ -46,7 +46,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown return DispatchEventOfSameName::Yes; } -LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned) +LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned) { if (!m_tracking_mouse || button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled()) return DispatchEventOfSameName::No; @@ -61,7 +61,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(B return DispatchEventOfSameName::Yes; } -LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned, unsigned) +LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned, unsigned) { if (!m_tracking_mouse || !layout_box().dom_node().enabled()) return DispatchEventOfSameName::No; diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.h b/Userland/Libraries/LibWeb/Painting/Paintable.h index d272fa185d..2a8b13866a 100644 --- a/Userland/Libraries/LibWeb/Painting/Paintable.h +++ b/Userland/Libraries/LibWeb/Painting/Paintable.h @@ -64,12 +64,12 @@ public: // When these methods return true, the DOM event with the same name will be // dispatch at the mouse_event_target if it returns a valid DOM::Node, or // the layout node's associated DOM node if it doesn't. - virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers); - virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers); - virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers); + virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers); + virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers); + virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers); virtual DOM::Node* mouse_event_target() const { return nullptr; } - virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); + virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y); Layout::Node const& layout_node() const { return m_layout_node; } Layout::Node& layout_node() { return const_cast<Layout::Node&>(m_layout_node); } diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 12bfabb273..86f8f5bee4 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -43,7 +43,7 @@ PaintableWithLines::~PaintableWithLines() { } -void PaintableBox::set_offset(const Gfx::FloatPoint& offset) +void PaintableBox::set_offset(Gfx::FloatPoint const& offset) { m_offset = offset; // FIXME: This const_cast is gross. @@ -527,7 +527,7 @@ Optional<HitTestResult> PaintableBox::hit_test(Gfx::FloatPoint const& position, return {}; } -Optional<HitTestResult> PaintableWithLines::hit_test(const Gfx::FloatPoint& position, HitTestType type) const +Optional<HitTestResult> PaintableWithLines::hit_test(Gfx::FloatPoint const& position, HitTestType type) const { if (!layout_box().children_are_inline()) return PaintableBox::hit_test(position, type); diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.h b/Userland/Libraries/LibWeb/Painting/PaintableBox.h index 028a619fec..7077e814e2 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.h +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.h @@ -163,7 +163,7 @@ public: virtual void paint(PaintContext&, PaintPhase) const override; virtual bool wants_mouse_events() const override { return false; } - virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override; + virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override; virtual Optional<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const override; diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.h b/Userland/Libraries/LibWeb/Painting/StackingContext.h index 9ea3e8ca71..3d0a9df1bc 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.h +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.h @@ -18,7 +18,7 @@ public: StackingContext(Layout::Box&, StackingContext* parent); StackingContext* parent() { return m_parent; } - const StackingContext* parent() const { return m_parent; } + StackingContext const* parent() const { return m_parent; } enum class StackingContextPaintPhase { BackgroundAndBorders, diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp index 37c02f842a..a209e8e481 100644 --- a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp @@ -36,7 +36,7 @@ DOM::Node* TextPaintable::mouse_event_target() const return nullptr; } -TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned) +TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned) { auto* label = layout_node().first_ancestor_of_type<Layout::Label>(); if (!label) @@ -46,7 +46,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<Eve return DispatchEventOfSameName::Yes; } -TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned) +TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned) { auto* label = layout_node().first_ancestor_of_type<Layout::Label>(); if (!label) @@ -57,7 +57,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<Event return DispatchEventOfSameName::Yes; } -TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned) +TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned) { auto* label = layout_node().first_ancestor_of_type<Layout::Label>(); if (!label) diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.h b/Userland/Libraries/LibWeb/Painting/TextPaintable.h index 2b61032a1f..5c029062bb 100644 --- a/Userland/Libraries/LibWeb/Painting/TextPaintable.h +++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.h @@ -18,9 +18,9 @@ public: virtual bool wants_mouse_events() const override; virtual DOM::Node* mouse_event_target() const override; - virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override; - virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override; - virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override; + virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override; + virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override; + virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override; private: explicit TextPaintable(Layout::TextNode const&); diff --git a/Userland/Libraries/LibWeb/SVG/SVGContext.h b/Userland/Libraries/LibWeb/SVG/SVGContext.h index 2e073a5cce..1073620137 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGContext.h +++ b/Userland/Libraries/LibWeb/SVG/SVGContext.h @@ -20,8 +20,8 @@ public: m_states.append(State()); } - const Gfx::Color& fill_color() const { return state().fill_color; } - const Gfx::Color& stroke_color() const { return state().stroke_color; } + Gfx::Color const& fill_color() const { return state().fill_color; } + Gfx::Color const& stroke_color() const { return state().stroke_color; } float stroke_width() const { return state().stroke_width; } void set_fill_color(Gfx::Color color) { state().fill_color = color; } @@ -40,7 +40,7 @@ private: float stroke_width { 1.0 }; }; - const State& state() const { return m_states.last(); } + State const& state() const { return m_states.last(); } State& state() { return m_states.last(); } Gfx::FloatRect m_svg_element_bounds; diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp index b7a8effc18..0419dbf527 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -15,7 +15,7 @@ namespace Web::SVG { -[[maybe_unused]] static void print_instruction(const PathInstruction& instruction) +[[maybe_unused]] static void print_instruction(PathInstruction const& instruction) { VERIFY(PATH_DEBUG); diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.h b/Userland/Libraries/LibWeb/SVG/SVGPathElement.h index 1f1dbfa060..1b3ff0a2aa 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.h @@ -20,7 +20,7 @@ public: SVGPathElement(DOM::Document&, DOM::QualifiedName); virtual ~SVGPathElement() override = default; - virtual void parse_attribute(const FlyString& name, const String& value) override; + virtual void parse_attribute(FlyString const& name, String const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h index 8b5adb9557..1972c4fd05 100644 --- a/Userland/Libraries/LibWeb/TreeNode.h +++ b/Userland/Libraries/LibWeb/TreeNode.h @@ -123,10 +123,10 @@ public: return {}; } - bool is_ancestor_of(const TreeNode&) const; - bool is_inclusive_ancestor_of(const TreeNode&) const; - bool is_descendant_of(const TreeNode&) const; - bool is_inclusive_descendant_of(const TreeNode&) const; + bool is_ancestor_of(TreeNode const&) const; + bool is_inclusive_ancestor_of(TreeNode const&) const; + bool is_descendant_of(TreeNode const&) const; + bool is_inclusive_descendant_of(TreeNode const&) const; bool is_following(TreeNode const&) const; @@ -556,7 +556,7 @@ inline void TreeNode<T>::prepend_child(NonnullRefPtr<T> node) } template<typename T> -inline bool TreeNode<T>::is_ancestor_of(const TreeNode<T>& other) const +inline bool TreeNode<T>::is_ancestor_of(TreeNode<T> const& other) const { for (auto* ancestor = other.parent(); ancestor; ancestor = ancestor->parent()) { if (ancestor == this) @@ -566,19 +566,19 @@ inline bool TreeNode<T>::is_ancestor_of(const TreeNode<T>& other) const } template<typename T> -inline bool TreeNode<T>::is_inclusive_ancestor_of(const TreeNode<T>& other) const +inline bool TreeNode<T>::is_inclusive_ancestor_of(TreeNode<T> const& other) const { return &other == this || is_ancestor_of(other); } template<typename T> -inline bool TreeNode<T>::is_descendant_of(const TreeNode<T>& other) const +inline bool TreeNode<T>::is_descendant_of(TreeNode<T> const& other) const { return other.is_ancestor_of(*this); } template<typename T> -inline bool TreeNode<T>::is_inclusive_descendant_of(const TreeNode<T>& other) const +inline bool TreeNode<T>::is_inclusive_descendant_of(TreeNode<T> const& other) const { return other.is_inclusive_ancestor_of(*this); } diff --git a/Userland/Libraries/LibWeb/UIEvents/MouseEvent.cpp b/Userland/Libraries/LibWeb/UIEvents/MouseEvent.cpp index 8355e9811e..96bad7de8f 100644 --- a/Userland/Libraries/LibWeb/UIEvents/MouseEvent.cpp +++ b/Userland/Libraries/LibWeb/UIEvents/MouseEvent.cpp @@ -10,7 +10,7 @@ namespace Web::UIEvents { -MouseEvent::MouseEvent(const FlyString& event_name, double offset_x, double offset_y, double client_x, double client_y) +MouseEvent::MouseEvent(FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y) : UIEvent(event_name) , m_offset_x(offset_x) , m_offset_y(offset_y) diff --git a/Userland/Libraries/LibWeb/UIEvents/MouseEvent.h b/Userland/Libraries/LibWeb/UIEvents/MouseEvent.h index 2f3cd652fb..99c2df94f2 100644 --- a/Userland/Libraries/LibWeb/UIEvents/MouseEvent.h +++ b/Userland/Libraries/LibWeb/UIEvents/MouseEvent.h @@ -16,7 +16,7 @@ class MouseEvent final : public UIEvent { public: using WrapperType = Bindings::MouseEventWrapper; - static NonnullRefPtr<MouseEvent> create(const FlyString& event_name, double offset_x, double offset_y, double client_x, double client_y) + static NonnullRefPtr<MouseEvent> create(FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y) { return adopt_ref(*new MouseEvent(event_name, offset_x, offset_y, client_x, client_y)); } @@ -33,7 +33,7 @@ public: double y() const { return client_y(); } protected: - MouseEvent(const FlyString& event_name, double offset_x, double offset_y, double client_x, double client_y); + MouseEvent(FlyString const& event_name, double offset_x, double offset_y, double client_x, double client_y); private: void set_event_characteristics(); diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp index 61ba8c3d06..0470e86f1c 100644 --- a/Userland/Libraries/LibWeb/URL/URL.cpp +++ b/Userland/Libraries/LibWeb/URL/URL.cpp @@ -101,7 +101,7 @@ String URL::username() const return m_url.username(); } -void URL::set_username(const String& username) +void URL::set_username(String const& username) { // 1. If this’s URL cannot have a username/password/port, then return. if (m_url.cannot_have_a_username_or_password_or_port()) @@ -139,7 +139,7 @@ String URL::host() const return String::formatted("{}:{}", url.host(), *url.port()); } -void URL::set_host(const String& host) +void URL::set_host(String const& host) { // 1. If this’s URL’s cannot-be-a-base-URL is true, then return. if (m_url.cannot_be_a_base_url()) diff --git a/Userland/Libraries/LibWeb/URL/URL.h b/Userland/Libraries/LibWeb/URL/URL.h index 0f17dc1c62..15bea032cb 100644 --- a/Userland/Libraries/LibWeb/URL/URL.h +++ b/Userland/Libraries/LibWeb/URL/URL.h @@ -26,7 +26,7 @@ public: return adopt_ref(*new URL(move(url), move(query))); } - static DOM::ExceptionOr<NonnullRefPtr<URL>> create_with_global_object(Bindings::WindowObject&, const String& url, const String& base); + static DOM::ExceptionOr<NonnullRefPtr<URL>> create_with_global_object(Bindings::WindowObject&, String const& url, String const& base); String href() const; DOM::ExceptionOr<void> set_href(String const&); diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp index 34ca58a0e9..b4ff650856 100644 --- a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp +++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp @@ -12,7 +12,7 @@ namespace Web::URL { -String url_encode(const Vector<QueryParam>& pairs, AK::URL::PercentEncodeSet percent_encode_set) +String url_encode(Vector<QueryParam> const& pairs, AK::URL::PercentEncodeSet percent_encode_set) { StringBuilder builder; for (size_t i = 0; i < pairs.size(); ++i) { @@ -185,7 +185,7 @@ bool URLSearchParams::has(String const& name) .is_end(); } -void URLSearchParams::set(const String& name, const String& value) +void URLSearchParams::set(String const& name, String const& value) { // 1. If this’s list contains any name-value pairs whose name is name, then set the value of the first such name-value pair to value and remove the others. auto existing = m_list.find_if([&name](auto& entry) { diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.h b/Userland/Libraries/LibWeb/URL/URLSearchParams.h index 7fe3ea8114..a2cfe8c7e5 100644 --- a/Userland/Libraries/LibWeb/URL/URLSearchParams.h +++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.h @@ -17,7 +17,7 @@ struct QueryParam { String name; String value; }; -String url_encode(const Vector<QueryParam>&, AK::URL::PercentEncodeSet); +String url_encode(Vector<QueryParam> const&, AK::URL::PercentEncodeSet); Vector<QueryParam> url_decode(StringView); class URLSearchParams : public Bindings::Wrappable diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp index a6e083f6f9..d90c092eec 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp @@ -33,7 +33,7 @@ void WebAssemblyInstanceObject::initialize(JS::GlobalObject& global_object) auto& cache = this->cache(); for (auto& export_ : instance.exports()) { export_.value().visit( - [&](const Wasm::FunctionAddress& address) { + [&](Wasm::FunctionAddress const& address) { auto object = cache.function_instances.get(address); if (!object.has_value()) { object = create_native_function(global_object, address, export_.name()); @@ -41,7 +41,7 @@ void WebAssemblyInstanceObject::initialize(JS::GlobalObject& global_object) } m_exports_object->define_direct_property(export_.name(), *object, JS::default_attributes); }, - [&](const Wasm::MemoryAddress& address) { + [&](Wasm::MemoryAddress const& address) { auto object = cache.memory_instances.get(address); if (!object.has_value()) { object = heap().allocate<Web::Bindings::WebAssemblyMemoryObject>(global_object, global_object, address); @@ -49,7 +49,7 @@ void WebAssemblyInstanceObject::initialize(JS::GlobalObject& global_object) } m_exports_object->define_direct_property(export_.name(), *object, JS::default_attributes); }, - [&](const auto&) { + [&](auto const&) { // FIXME: Implement other exports! }); } diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleObject.h index b865fab521..38911c36bf 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleObject.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleObject.h @@ -22,7 +22,7 @@ public: virtual ~WebAssemblyModuleObject() override = default; size_t index() const { return m_index; } - const Wasm::Module& module() const { return WebAssemblyObject::s_compiled_modules.at(m_index).module; } + Wasm::Module const& module() const { return WebAssemblyObject::s_compiled_modules.at(m_index).module; } private: size_t m_index { 0 }; diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp index de27ae907c..b0f6e6e330 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp @@ -184,7 +184,7 @@ JS::ThrowCompletionOr<size_t> WebAssemblyObject::instantiate_module(Wasm::Module if (!import_argument.is_undefined()) { auto* import_object = TRY(import_argument.to_object(global_object)); dbgln("Trying to resolve stuff because import object was specified"); - for (const Wasm::Linker::Name& import_name : linker.unresolved_imports()) { + for (Wasm::Linker::Name const& import_name : linker.unresolved_imports()) { dbgln("Trying to resolve {}::{}", import_name.module, import_name.name); auto value_or_error = import_object->get(import_name.module); if (value_or_error.is_error()) @@ -286,7 +286,7 @@ JS::ThrowCompletionOr<size_t> WebAssemblyObject::instantiate_module(Wasm::Module resolved_imports.set(import_name, Wasm::ExternValue { address }); return {}; }, - [&](const auto&) -> JS::ThrowCompletionOr<void> { + [&](auto const&) -> JS::ThrowCompletionOr<void> { // FIXME: Implement these. dbgln("Unimplemented import of non-function attempted"); return vm.throw_completion<JS::TypeError>(global_object, "LinkError: Not Implemented"); @@ -328,7 +328,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate) } auto* buffer = buffer_or_error.release_value(); - const Wasm::Module* module { nullptr }; + Wasm::Module const* module { nullptr }; if (is<JS::ArrayBuffer>(buffer) || is<JS::TypedArrayBase>(buffer)) { auto result = parse_module(global_object, buffer); if (result.is_error()) { @@ -386,7 +386,7 @@ JS::Value to_js_value(JS::GlobalObject& global_object, Wasm::Value& wasm_value) VERIFY_NOT_REACHED(); } -JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, const Wasm::ValueType& type) +JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, Wasm::ValueType const& type) { static ::Crypto::SignedBigInteger two_64 = "1"_sbigint.shift_left(64); auto& vm = global_object.vm(); @@ -439,7 +439,7 @@ JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global JS::NativeFunction* create_native_function(JS::GlobalObject& global_object, Wasm::FunctionAddress address, String const& name) { Optional<Wasm::FunctionType> type; - WebAssemblyObject::s_abstract_machine.store().get(address)->visit([&](const auto& value) { type = value.type(); }); + WebAssemblyObject::s_abstract_machine.store().get(address)->visit([&](auto const& value) { type = value.type(); }); if (auto entry = WebAssemblyObject::s_global_cache.function_instances.get(address); entry.has_value()) return *entry; diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h index 834c2cc826..481138dd22 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h @@ -17,7 +17,7 @@ class WebAssemblyMemoryObject; JS::ThrowCompletionOr<size_t> parse_module(JS::GlobalObject& global_object, JS::Object* buffer); JS::NativeFunction* create_native_function(JS::GlobalObject& global_object, Wasm::FunctionAddress address, String const& name); JS::Value to_js_value(JS::GlobalObject& global_object, Wasm::Value& wasm_value); -JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, const Wasm::ValueType& type); +JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, Wasm::ValueType const& type); class WebAssemblyObject final : public JS::Object { JS_OBJECT(WebAssemblyObject, JS::Object); diff --git a/Userland/Libraries/LibWeb/WebContentClient.cpp b/Userland/Libraries/LibWeb/WebContentClient.cpp index 531cf0cda3..ae75861d6c 100644 --- a/Userland/Libraries/LibWeb/WebContentClient.cpp +++ b/Userland/Libraries/LibWeb/WebContentClient.cpp @@ -23,7 +23,7 @@ void WebContentClient::die() on_web_content_process_crash(); } -void WebContentClient::did_paint(const Gfx::IntRect&, i32 bitmap_id) +void WebContentClient::did_paint(Gfx::IntRect const&, i32 bitmap_id) { m_view.notify_server_did_paint({}, bitmap_id); } diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp index ff3bdeba68..c351b95501 100644 --- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp +++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp @@ -53,7 +53,7 @@ RefPtr<Protocol::WebSocket> WebSocketClientManager::connect(const AK::URL& url, } // https://websockets.spec.whatwg.org/#dom-websocket-websocket -DOM::ExceptionOr<NonnullRefPtr<WebSocket>> WebSocket::create_with_global_object(Bindings::WindowObject& window, const String& url) +DOM::ExceptionOr<NonnullRefPtr<WebSocket>> WebSocket::create_with_global_object(Bindings::WindowObject& window, String const& url) { AK::URL url_record(url); if (!url_record.is_valid()) @@ -169,7 +169,7 @@ DOM::ExceptionOr<void> WebSocket::close(Optional<u16> code, Optional<String> rea } // https://websockets.spec.whatwg.org/#dom-websocket-send -DOM::ExceptionOr<void> WebSocket::send(const String& data) +DOM::ExceptionOr<void> WebSocket::send(String const& data) { auto state = ready_state(); if (state == WebSocket::ReadyState::Connecting) diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.h b/Userland/Libraries/LibWeb/WebSockets/WebSocket.h index cf9c02795c..7d2b292592 100644 --- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.h +++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.h @@ -64,7 +64,7 @@ public: return adopt_ref(*new WebSocket(window, url)); } - static DOM::ExceptionOr<NonnullRefPtr<WebSocket>> create_with_global_object(Bindings::WindowObject& window, const String& url); + static DOM::ExceptionOr<NonnullRefPtr<WebSocket>> create_with_global_object(Bindings::WindowObject& window, String const& url); virtual ~WebSocket() override; @@ -84,11 +84,11 @@ public: String extensions() const; String protocol() const; - const String& binary_type() { return m_binary_type; }; - void set_binary_type(const String& type) { m_binary_type = type; }; + String const& binary_type() { return m_binary_type; }; + void set_binary_type(String const& type) { m_binary_type = type; }; DOM::ExceptionOr<void> close(Optional<u16> code, Optional<String> reason); - DOM::ExceptionOr<void> send(const String& data); + DOM::ExceptionOr<void> send(String const& data); private: virtual void ref_event_target() override { ref(); } diff --git a/Userland/Libraries/LibWeb/WebViewHooks.h b/Userland/Libraries/LibWeb/WebViewHooks.h index 88f728695f..483255748b 100644 --- a/Userland/Libraries/LibWeb/WebViewHooks.h +++ b/Userland/Libraries/LibWeb/WebViewHooks.h @@ -15,25 +15,25 @@ namespace Web { class WebViewHooks { public: - Function<void(const Gfx::IntPoint& screen_position)> on_context_menu_request; - Function<void(const AK::URL&, const String& target, unsigned modifiers)> on_link_click; - Function<void(const AK::URL&, const Gfx::IntPoint& screen_position)> on_link_context_menu_request; - Function<void(const AK::URL&, const Gfx::IntPoint& screen_position, const Gfx::ShareableBitmap&)> on_image_context_menu_request; - Function<void(const AK::URL&, const String& target, unsigned modifiers)> on_link_middle_click; + Function<void(Gfx::IntPoint const& screen_position)> on_context_menu_request; + Function<void(const AK::URL&, String const& target, unsigned modifiers)> on_link_click; + Function<void(const AK::URL&, Gfx::IntPoint const& screen_position)> on_link_context_menu_request; + Function<void(const AK::URL&, Gfx::IntPoint const& screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request; + Function<void(const AK::URL&, String const& target, unsigned modifiers)> on_link_middle_click; Function<void(const AK::URL&)> on_link_hover; - Function<void(const String&)> on_title_change; + Function<void(String const&)> on_title_change; Function<void(const AK::URL&)> on_load_start; Function<void(const AK::URL&)> on_load_finish; - Function<void(const Gfx::Bitmap&)> on_favicon_change; + Function<void(Gfx::Bitmap const&)> on_favicon_change; Function<void(const AK::URL&)> on_url_drop; Function<void(DOM::Document*)> on_set_document; - Function<void(const AK::URL&, const String&)> on_get_source; - Function<void(const String&)> on_get_dom_tree; + Function<void(const AK::URL&, String const&)> on_get_source; + Function<void(String const&)> on_get_dom_tree; Function<void(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing)> on_get_dom_node_properties; Function<void(i32 message_id)> on_js_console_new_message; Function<void(i32 start_index, Vector<String> const& message_types, Vector<String> const& messages)> on_get_js_console_messages; Function<String(const AK::URL& url, Cookie::Source source)> on_get_cookie; - Function<void(const AK::URL& url, const Cookie::ParsedCookie& cookie, Cookie::Source source)> on_set_cookie; + Function<void(const AK::URL& url, Cookie::ParsedCookie const& cookie, Cookie::Source source)> on_set_cookie; Function<void(i32 count_waiting)> on_resource_status_change; }; diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 3a3acad6ae..3b7a42204c 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -50,7 +50,7 @@ void XMLHttpRequest::set_ready_state(ReadyState ready_state) dispatch_event(DOM::Event::create(EventNames::readystatechange)); } -void XMLHttpRequest::fire_progress_event(const String& event_name, u64 transmitted, u64 length) +void XMLHttpRequest::fire_progress_event(String const& event_name, u64 transmitted, u64 length) { ProgressEventInit event_init {}; event_init.length_computable = true; @@ -371,7 +371,7 @@ Optional<MimeSniff::MimeType> XMLHttpRequest::extract_mime_type(HashMap<String, } // https://fetch.spec.whatwg.org/#forbidden-header-name -static bool is_forbidden_header_name(const String& header_name) +static bool is_forbidden_header_name(String const& header_name) { if (header_name.starts_with("Proxy-", CaseSensitivity::CaseInsensitive) || header_name.starts_with("Sec-", CaseSensitivity::CaseInsensitive)) return true; @@ -381,14 +381,14 @@ static bool is_forbidden_header_name(const String& header_name) } // https://fetch.spec.whatwg.org/#forbidden-method -static bool is_forbidden_method(const String& method) +static bool is_forbidden_method(String const& method) { auto lowercase_method = method.to_lowercase(); return lowercase_method.is_one_of("connect", "trace", "track"); } // https://fetch.spec.whatwg.org/#concept-method-normalize -static String normalize_method(const String& method) +static String normalize_method(String const& method) { auto lowercase_method = method.to_lowercase(); if (lowercase_method.is_one_of("delete", "get", "head", "options", "post", "put")) @@ -397,14 +397,14 @@ static String normalize_method(const String& method) } // https://fetch.spec.whatwg.org/#concept-header-value-normalize -static String normalize_header_value(const String& header_value) +static String normalize_header_value(String const& header_value) { // FIXME: I'm not sure if this is the right trim, it should only be HTML whitespace bytes. return header_value.trim_whitespace(); } // https://xhr.spec.whatwg.org/#dom-xmlhttprequest-setrequestheader -DOM::ExceptionOr<void> XMLHttpRequest::set_request_header(const String& header, const String& value) +DOM::ExceptionOr<void> XMLHttpRequest::set_request_header(String const& header, String const& value) { if (m_ready_state != ReadyState::Opened) return DOM::InvalidStateError::create("XHR readyState is not OPENED"); @@ -424,7 +424,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::set_request_header(const String& header, } // https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open -DOM::ExceptionOr<void> XMLHttpRequest::open(const String& method, const String& url) +DOM::ExceptionOr<void> XMLHttpRequest::open(String const& method, String const& url) { // FIXME: Let settingsObject be this’s relevant settings object. diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h index 543b35e81f..268a5d8639 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.h @@ -54,13 +54,13 @@ public: DOM::ExceptionOr<JS::Value> response(); Bindings::XMLHttpRequestResponseType response_type() const { return m_response_type; } - DOM::ExceptionOr<void> open(const String& method, const String& url); + DOM::ExceptionOr<void> open(String const& method, String const& url); DOM::ExceptionOr<void> send(String body); - DOM::ExceptionOr<void> set_request_header(const String& header, const String& value); + DOM::ExceptionOr<void> set_request_header(String const& header, String const& value); void set_response_type(Bindings::XMLHttpRequestResponseType type) { m_response_type = type; } - String get_response_header(const String& name) { return m_response_headers.get(name).value_or({}); } + String get_response_header(String const& name) { return m_response_headers.get(name).value_or({}); } String get_all_response_headers() const; Bindings::CallbackType* onreadystatechange(); @@ -75,7 +75,7 @@ private: void set_ready_state(ReadyState); void set_status(unsigned status) { m_status = status; } - void fire_progress_event(const String&, u64, u64); + void fire_progress_event(String const&, u64, u64); MimeSniff::MimeType get_response_mime_type() const; Optional<StringView> get_final_encoding() const; diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp index 532d0f695f..7f594c2719 100644 --- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp +++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp @@ -9,7 +9,7 @@ #include <LibWeb/XML/XMLDocumentBuilder.h> inline namespace { -extern const char* s_xhtml_unified_dtd; +extern char const* s_xhtml_unified_dtd; } static FlyString s_html_namespace = "http://www.w3.org/1999/xhtml"; @@ -44,7 +44,7 @@ XMLDocumentBuilder::XMLDocumentBuilder(DOM::Document& document, XMLScriptingSupp { } -void XMLDocumentBuilder::element_start(const XML::Name& name, const HashMap<XML::Name, String>& attributes) +void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name, String> const& attributes) { if (m_has_error) return; @@ -116,7 +116,7 @@ void XMLDocumentBuilder::element_end(const XML::Name& name) m_current_node = m_current_node->parent_node(); } -void XMLDocumentBuilder::text(const String& data) +void XMLDocumentBuilder::text(String const& data) { if (m_has_error) return; @@ -133,7 +133,7 @@ void XMLDocumentBuilder::text(const String& data) } } -void XMLDocumentBuilder::comment(const String& data) +void XMLDocumentBuilder::comment(String const& data) { if (m_has_error) return; @@ -244,7 +244,7 @@ void XMLDocumentBuilder::document_end() } inline namespace { -const char* s_xhtml_unified_dtd = R"xmlxmlxml( +char const* s_xhtml_unified_dtd = R"xmlxmlxml( <!ENTITY Tab "	"><!ENTITY NewLine "
"><!ENTITY excl "!"><!ENTITY quot """><!ENTITY QUOT """><!ENTITY num "#"><!ENTITY dollar "$"><!ENTITY percnt "%"><!ENTITY amp "&#x26;"><!ENTITY AMP "&#x26;"><!ENTITY apos "'"><!ENTITY lpar "("><!ENTITY rpar ")"><!ENTITY ast "*"><!ENTITY midast "*"><!ENTITY plus "+"><!ENTITY comma ","><!ENTITY period "."><!ENTITY sol "/"><!ENTITY colon ":"><!ENTITY semi ";"><!ENTITY lt "&#x3C;"><!ENTITY LT "&#x3C;"><!ENTITY nvlt "&#x3C;⃒"><!ENTITY equals "="><!ENTITY bne "=⃥"><!ENTITY gt ">"><!ENTITY GT ">"><!ENTITY nvgt ">⃒"><!ENTITY quest "?"><!ENTITY commat "@"><!ENTITY lsqb "["><!ENTITY lbrack "["><!ENTITY bsol "\"><!ENTITY rsqb "]"><!ENTITY rbrack "]"><!ENTITY Hat "^"><!ENTITY lowbar "_"><!ENTITY UnderBar "_"><!ENTITY grave "`"><!ENTITY DiacriticalGrave "`"><!ENTITY fjlig "fj"><!ENTITY lcub "{"><!ENTITY lbrace "{"><!ENTITY verbar "|"><!ENTITY vert "|"><!ENTITY VerticalLine "|"><!ENTITY rcub "}"><!ENTITY rbrace "}"><!ENTITY nbsp " "><!ENTITY NonBreakingSpace " "><!ENTITY iexcl "¡"><!ENTITY cent "¢"><!ENTITY pound "£"><!ENTITY curren "¤"><!ENTITY yen "¥"><!ENTITY brvbar "¦"><!ENTITY sect "§"><!ENTITY Dot "¨"><!ENTITY die "¨"><!ENTITY DoubleDot "¨"><!ENTITY uml "¨"><!ENTITY copy "©"><!ENTITY COPY "©"><!ENTITY ordf "ª"><!ENTITY laquo "«"><!ENTITY not "¬"><!ENTITY shy "­"><!ENTITY reg "®"><!ENTITY circledR "®"><!ENTITY REG "®"><!ENTITY macr "¯"><!ENTITY strns "¯"><!ENTITY deg "°"><!ENTITY plusmn "±"><!ENTITY pm "±"><!ENTITY PlusMinus "±"><!ENTITY sup2 "²"><!ENTITY sup3 "³"><!ENTITY acute "´"><!ENTITY DiacriticalAcute "´"><!ENTITY micro "µ"><!ENTITY para "¶"><!ENTITY middot "·"><!ENTITY centerdot "·"><!ENTITY CenterDot "·"><!ENTITY cedil "¸"><!ENTITY Cedilla "¸"><!ENTITY sup1 "¹"><!ENTITY ordm "º"><!ENTITY raquo "»"><!ENTITY frac14 "¼"><!ENTITY frac12 "½"><!ENTITY half "½"><!ENTITY frac34 "¾"><!ENTITY iquest "¿"><!ENTITY Agrave "À"><!ENTITY Aacute "Á"><!ENTITY Acirc "Â"><!ENTITY Atilde "Ã"><!ENTITY Auml "Ä"><!ENTITY Aring "Å"><!ENTITY angst "Å"><!ENTITY AElig "Æ"><!ENTITY Ccedil "Ç"><!ENTITY Egrave "È"><!ENTITY Eacute "É"><!ENTITY Ecirc "Ê"><!ENTITY Euml "Ë"><!ENTITY Igrave "Ì"><!ENTITY Iacute "Í"><!ENTITY Icirc "Î"><!ENTITY Iuml "Ï"><!ENTITY ETH "Ð"><!ENTITY Ntilde "Ñ"><!ENTITY Ograve "Ò"><!ENTITY Oacute "Ó"><!ENTITY Ocirc "Ô"><!ENTITY Otilde "Õ"><!ENTITY Ouml "Ö"><!ENTITY times "×"><!ENTITY Oslash "Ø"><!ENTITY Ugrave "Ù"><!ENTITY Uacute "Ú"><!ENTITY Ucirc "Û"><!ENTITY Uuml "Ü"><!ENTITY Yacute "Ý"><!ENTITY THORN "Þ"><!ENTITY szlig "ß"><!ENTITY agrave "à"><!ENTITY aacute "á"><!ENTITY acirc "â"><!ENTITY atilde "ã"><!ENTITY auml "ä"><!ENTITY aring "å"><!ENTITY aelig "æ"><!ENTITY ccedil "ç"><!ENTITY egrave "è"><!ENTITY eacute "é"><!ENTITY ecirc "ê"><!ENTITY euml "ë"><!ENTITY igrave "ì"><!ENTITY iacute "í"><!ENTITY icirc "î"><!ENTITY iuml "ï"><!ENTITY eth "ð"><!ENTITY ntilde "ñ"><!ENTITY ograve "ò"><!ENTITY oacute "ó"><!ENTITY ocirc "ô"><!ENTITY otilde "õ"><!ENTITY ouml "ö"><!ENTITY divide "÷"><!ENTITY div "÷"><!ENTITY oslash "ø"><!ENTITY ugrave "ù"><!ENTITY uacute "ú"><!ENTITY ucirc "û"><!ENTITY uuml "ü"><!ENTITY yacute "ý"><!ENTITY thorn "þ"><!ENTITY yuml "ÿ"><!ENTITY Amacr "Ā"><!ENTITY amacr "ā"><!ENTITY Abreve "Ă"><!ENTITY abreve "ă"><!ENTITY Aogon "Ą"><!ENTITY aogon "ą"><!ENTITY Cacute "Ć"><!ENTITY cacute "ć"><!ENTITY Ccirc "Ĉ"><!ENTITY ccirc "ĉ"><!ENTITY Cdot "Ċ"><!ENTITY cdot "ċ"><!ENTITY Ccaron "Č"><!ENTITY ccaron "č"><!ENTITY Dcaron "Ď"><!ENTITY dcaron "ď"><!ENTITY Dstrok "Đ"><!ENTITY dstrok "đ"><!ENTITY Emacr "Ē"><!ENTITY emacr "ē"><!ENTITY Edot "Ė"><!ENTITY edot "ė"><!ENTITY Eogon "Ę"><!ENTITY eogon "ę"><!ENTITY Ecaron "Ě"><!ENTITY ecaron "ě"><!ENTITY Gcirc "Ĝ"><!ENTITY gcirc "ĝ"><!ENTITY Gbreve "Ğ"><!ENTITY gbreve "ğ"><!ENTITY Gdot "Ġ"><!ENTITY gdot "ġ"><!ENTITY Gcedil "Ģ"><!ENTITY Hcirc "Ĥ"><!ENTITY hcirc "ĥ"><!ENTITY Hstrok "Ħ"><!ENTITY hstrok "ħ"><!ENTITY Itilde "Ĩ"><!ENTITY itilde "ĩ"><!ENTITY Imacr "Ī"><!ENTITY imacr "ī"><!ENTITY Iogon "Į"><!ENTITY iogon "į"><!ENTITY Idot "İ"><!ENTITY imath "ı"><!ENTITY inodot "ı"><!ENTITY IJlig "IJ"><!ENTITY ijlig "ij"><!ENTITY Jcirc "Ĵ"><!ENTITY jcirc "ĵ"><!ENTITY Kcedil "Ķ"><!ENTITY kcedil "ķ"><!ENTITY kgreen "ĸ"><!ENTITY Lacute "Ĺ"><!ENTITY lacute "ĺ"><!ENTITY Lcedil "Ļ"><!ENTITY lcedil "ļ"><!ENTITY Lcaron "Ľ"><!ENTITY lcaron "ľ"><!ENTITY Lmidot "Ŀ"><!ENTITY lmidot "ŀ"><!ENTITY Lstrok "Ł"><!ENTITY lstrok "ł"><!ENTITY Nacute "Ń"><!ENTITY nacute "ń"><!ENTITY Ncedil "Ņ"><!ENTITY ncedil "ņ"><!ENTITY Ncaron "Ň"><!ENTITY ncaron "ň"><!ENTITY napos "ʼn"><!ENTITY ENG "Ŋ"><!ENTITY eng "ŋ"><!ENTITY Omacr "Ō"><!ENTITY omacr "ō"><!ENTITY Odblac "Ő"><!ENTITY odblac "ő"><!ENTITY OElig "Œ"><!ENTITY oelig "œ"><!ENTITY Racute "Ŕ"><!ENTITY racute "ŕ"><!ENTITY Rcedil "Ŗ"><!ENTITY rcedil "ŗ"><!ENTITY Rcaron "Ř"><!ENTITY rcaron "ř"><!ENTITY Sacute "Ś"><!ENTITY sacute "ś"><!ENTITY Scirc "Ŝ"><!ENTITY scirc "ŝ"><!ENTITY Scedil "Ş"><!ENTITY scedil "ş"><!ENTITY Scaron "Š"><!ENTITY scaron "š"><!ENTITY Tcedil "Ţ"><!ENTITY tcedil "ţ"><!ENTITY Tcaron "Ť"><!ENTITY tcaron "ť"><!ENTITY Tstrok "Ŧ"><!ENTITY tstrok "ŧ"><!ENTITY Utilde "Ũ"><!ENTITY utilde "ũ"><!ENTITY Umacr "Ū"><!ENTITY umacr "ū"><!ENTITY Ubreve "Ŭ"><!ENTITY ubreve "ŭ"><!ENTITY Uring "Ů"><!ENTITY uring "ů"><!ENTITY Udblac "Ű"><!ENTITY udblac "ű"><!ENTITY Uogon "Ų"><!ENTITY uogon "ų"><!ENTITY Wcirc "Ŵ"><!ENTITY wcirc "ŵ"><!ENTITY Ycirc "Ŷ"><!ENTITY ycirc "ŷ"><!ENTITY Yuml "Ÿ"><!ENTITY Zacute "Ź"><!ENTITY zacute "ź"><!ENTITY Zdot "Ż"><!ENTITY zdot "ż"><!ENTITY Zcaron "Ž"><!ENTITY zcaron "ž"><!ENTITY fnof "ƒ"><!ENTITY imped "Ƶ"><!ENTITY gacute "ǵ"><!ENTITY jmath "ȷ"><!ENTITY circ "ˆ"><!ENTITY caron "ˇ"><!ENTITY Hacek "ˇ"><!ENTITY breve "˘"><!ENTITY Breve "˘"><!ENTITY dot "˙"><!ENTITY DiacriticalDot "˙"><!ENTITY ring "˚"><!ENTITY ogon "˛"><!ENTITY tilde "˜"><!ENTITY DiacriticalTilde "˜"><!ENTITY dblac "˝"><!ENTITY DiacriticalDoubleAcute "˝"><!ENTITY DownBreve "̑"><!ENTITY Alpha "Α"><!ENTITY Beta "Β"><!ENTITY Gamma "Γ"><!ENTITY Delta "Δ"><!ENTITY Epsilon "Ε"><!ENTITY Zeta "Ζ"><!ENTITY Eta "Η"><!ENTITY Theta "Θ"><!ENTITY Iota "Ι"><!ENTITY Kappa "Κ"><!ENTITY Lambda "Λ"><!ENTITY Mu "Μ"><!ENTITY Nu "Ν"><!ENTITY Xi "Ξ"><!ENTITY Omicron "Ο"><!ENTITY Pi "Π"><!ENTITY Rho "Ρ"><!ENTITY Sigma "Σ"><!ENTITY Tau "Τ"><!ENTITY Upsilon "Υ"><!ENTITY Phi "Φ"><!ENTITY Chi "Χ"><!ENTITY Psi "Ψ"><!ENTITY Omega "Ω"><!ENTITY ohm "Ω"><!ENTITY alpha "α"><!ENTITY beta "β"><!ENTITY gamma "γ"><!ENTITY delta "δ"><!ENTITY epsi "ε"><!ENTITY epsilon "ε"><!ENTITY zeta "ζ"><!ENTITY eta "η"><!ENTITY theta "θ"><!ENTITY iota "ι"><!ENTITY kappa "κ"><!ENTITY lambda "λ"><!ENTITY mu "μ"><!ENTITY nu "ν"><!ENTITY xi "ξ"><!ENTITY omicron "ο"><!ENTITY pi "π"><!ENTITY rho "ρ"><!ENTITY sigmav "ς"><!ENTITY varsigma "ς"><!ENTITY sigmaf "ς"><!ENTITY sigma "σ"><!ENTITY tau "τ"><!ENTITY upsi "υ"><!ENTITY upsilon "υ"><!ENTITY phi "φ"><!ENTITY chi "χ"><!ENTITY psi "ψ"><!ENTITY omega "ω"><!ENTITY thetav "ϑ"><!ENTITY vartheta "ϑ"><!ENTITY thetasym "ϑ"><!ENTITY Upsi "ϒ"><!ENTITY upsih "ϒ"><!ENTITY straightphi "ϕ"><!ENTITY phiv "ϕ"><!ENTITY varphi "ϕ"><!ENTITY piv "ϖ"><!ENTITY varpi "ϖ"><!ENTITY Gammad "Ϝ"><!ENTITY gammad "ϝ"><!ENTITY digamma "ϝ"><!ENTITY kappav "ϰ"><!ENTITY varkappa "ϰ"><!ENTITY rhov "ϱ"><!ENTITY varrho "ϱ"><!ENTITY epsiv "ϵ"><!ENTITY straightepsilon "ϵ"><!ENTITY varepsilon "ϵ"><!ENTITY bepsi "϶"><!ENTITY backepsilon "϶"><!ENTITY IOcy "Ё"><!ENTITY DJcy "Ђ"><!ENTITY GJcy "Ѓ"><!ENTITY Jukcy "Є"><!ENTITY DScy "Ѕ"><!ENTITY Iukcy "І"><!ENTITY YIcy "Ї"><!ENTITY Jsercy "Ј"><!ENTITY LJcy "Љ"><!ENTITY NJcy "Њ"><!ENTITY TSHcy "Ћ"><!ENTITY KJcy "Ќ"><!ENTITY Ubrcy "Ў"><!ENTITY DZcy "Џ"><!ENTITY Acy "А"><!ENTITY Bcy "Б"><!ENTITY Vcy "В"><!ENTITY Gcy "Г"><!ENTITY Dcy "Д"><!ENTITY IEcy "Е"><!ENTITY ZHcy "Ж"><!ENTITY Zcy "З"><!ENTITY Icy "И"><!ENTITY Jcy "Й"><!ENTITY Kcy "К"><!ENTITY Lcy "Л"><!ENTITY Mcy "М"><!ENTITY Ncy "Н"><!ENTITY Ocy "О"><!ENTITY Pcy "П"><!ENTITY Rcy "Р"><!ENTITY Scy "С"><!ENTITY Tcy "Т"><!ENTITY Ucy "У"><!ENTITY Fcy "Ф"><!ENTITY KHcy "Х"><!ENTITY TScy "Ц"><!ENTITY CHcy "Ч"><!ENTITY SHcy "Ш"><!ENTITY SHCHcy "Щ"><!ENTITY HARDcy "Ъ"><!ENTITY Ycy "Ы"><!ENTITY SOFTcy "Ь"><!ENTITY Ecy "Э"><!ENTITY YUcy "Ю"><!ENTITY YAcy "Я"><!ENTITY acy "а"><!ENTITY bcy "б"><!ENTITY vcy "в"><!ENTITY gcy "г"><!ENTITY dcy "д"><!ENTITY iecy "е"><!ENTITY zhcy "ж"><!ENTITY zcy "з"><!ENTITY icy "и"><!ENTITY jcy "й"><!ENTITY kcy "к"><!ENTITY lcy "л"><!ENTITY mcy "м"><!ENTITY ncy "н"><!ENTITY ocy "о"><!ENTITY pcy "п"><!ENTITY rcy "р"><!ENTITY scy "с"><!ENTITY tcy "т"><!ENTITY ucy "у"><!ENTITY fcy "ф"><!ENTITY khcy "х"><!ENTITY tscy "ц"><!ENTITY chcy "ч"><!ENTITY shcy "ш"><!ENTITY shchcy "щ"><!ENTITY hardcy "ъ"><!ENTITY ycy "ы"><!ENTITY softcy "ь"><!ENTITY ecy "э"><!ENTITY yucy "ю"><!ENTITY yacy "я"><!ENTITY iocy "ё"><!ENTITY djcy "ђ"><!ENTITY gjcy "ѓ"><!ENTITY jukcy "є"><!ENTITY dscy "ѕ"><!ENTITY iukcy "і"><!ENTITY yicy "ї"><!ENTITY jsercy "ј"><!ENTITY ljcy "љ"><!ENTITY njcy "њ"><!ENTITY tshcy "ћ"><!ENTITY kjcy "ќ"><!ENTITY ubrcy "ў"><!ENTITY dzcy "џ"><!ENTITY ensp " "><!ENTITY emsp " "><!ENTITY emsp13 " "><!ENTITY emsp14 " "><!ENTITY numsp " "><!ENTITY puncsp " "><!ENTITY thinsp " "><!ENTITY ThinSpace " "><!ENTITY hairsp " "><!ENTITY VeryThinSpace " "><!ENTITY ZeroWidthSpace "​"><!ENTITY NegativeVeryThinSpace "​"><!ENTITY NegativeThinSpace "​"><!ENTITY NegativeMediumSpace "​"><!ENTITY NegativeThickSpace "​"><!ENTITY zwnj "‌"><!ENTITY zwj "‍"><!ENTITY lrm "‎"><!ENTITY rlm "‏"><!ENTITY hyphen "‐"><!ENTITY dash "‐"><!ENTITY ndash "–"><!ENTITY mdash "—"><!ENTITY horbar "―"><!ENTITY Verbar "‖"><!ENTITY Vert "‖"><!ENTITY lsquo "‘"><!ENTITY OpenCurlyQuote "‘"><!ENTITY rsquo "’"><!ENTITY rsquor "’"><!ENTITY CloseCurlyQuote "’"><!ENTITY lsquor "‚"><!ENTITY sbquo "‚"><!ENTITY ldquo "“"><!ENTITY OpenCurlyDoubleQuote "“"><!ENTITY rdquo "”"><!ENTITY rdquor "”"><!ENTITY CloseCurlyDoubleQuote "”"><!ENTITY ldquor "„"><!ENTITY bdquo "„"><!ENTITY dagger "†"><!ENTITY Dagger "‡"><!ENTITY ddagger "‡"><!ENTITY bull "•"><!ENTITY bullet "•"><!ENTITY nldr "‥"><!ENTITY hellip "…"><!ENTITY mldr "…"><!ENTITY permil "‰"><!ENTITY pertenk "‱"><!ENTITY prime "′"><!ENTITY Prime "″"><!ENTITY tprime "‴"><!ENTITY bprime "‵"><!ENTITY backprime "‵"><!ENTITY lsaquo "‹"><!ENTITY rsaquo "›"><!ENTITY oline "‾"><!ENTITY OverBar "‾"><!ENTITY caret "⁁"><!ENTITY hybull "⁃"><!ENTITY frasl "⁄"><!ENTITY bsemi "⁏"><!ENTITY qprime "⁗"><!ENTITY MediumSpace " "><!ENTITY ThickSpace "  "><!ENTITY NoBreak "⁠"><!ENTITY ApplyFunction "⁡"><!ENTITY af "⁡"><!ENTITY InvisibleTimes "⁢"><!ENTITY it "⁢"><!ENTITY InvisibleComma "⁣"><!ENTITY ic "⁣"><!ENTITY euro "€"><!ENTITY tdot "⃛"><!ENTITY TripleDot "⃛"><!ENTITY DotDot "⃜"><!ENTITY Copf "ℂ"><!ENTITY complexes "ℂ"><!ENTITY incare "℅"><!ENTITY gscr "ℊ"><!ENTITY hamilt "ℋ"><!ENTITY HilbertSpace "ℋ"><!ENTITY Hscr "ℋ"><!ENTITY Hfr "ℌ"><!ENTITY Poincareplane "ℌ"><!ENTITY quaternions "ℍ"><!ENTITY Hopf "ℍ"><!ENTITY planckh "ℎ"><!ENTITY planck "ℏ"><!ENTITY hbar "ℏ"><!ENTITY plankv "ℏ"><!ENTITY hslash "ℏ"><!ENTITY Iscr "ℐ"><!ENTITY imagline "ℐ"><!ENTITY image "ℑ"><!ENTITY Im "ℑ"><!ENTITY imagpart "ℑ"><!ENTITY Ifr "ℑ"><!ENTITY Lscr "ℒ"><!ENTITY lagran "ℒ"><!ENTITY Laplacetrf "ℒ"><!ENTITY ell "ℓ"><!ENTITY Nopf "ℕ"><!ENTITY naturals "ℕ"><!ENTITY numero "№"><!ENTITY copysr "℗"><!ENTITY weierp "℘"><!ENTITY wp "℘"><!ENTITY Popf "ℙ"><!ENTITY primes "ℙ"><!ENTITY rationals "ℚ"><!ENTITY Qopf "ℚ"><!ENTITY Rscr "ℛ"><!ENTITY realine "ℛ"><!ENTITY real "ℜ"><!ENTITY Re "ℜ"><!ENTITY realpart "ℜ"><!ENTITY Rfr "ℜ"><!ENTITY reals "ℝ"><!ENTITY Ropf "ℝ"><!ENTITY rx "℞"><!ENTITY trade "™"><!ENTITY TRADE "™"><!ENTITY integers "ℤ"><!ENTITY Zopf "ℤ"><!ENTITY mho "℧"><!ENTITY Zfr "ℨ"><!ENTITY zeetrf "ℨ"><!ENTITY iiota "℩"><!ENTITY bernou "ℬ"><!ENTITY Bernoullis "ℬ"><!ENTITY Bscr "ℬ"><!ENTITY Cfr "ℭ"><!ENTITY Cayleys "ℭ"><!ENTITY escr "ℯ"><!ENTITY Escr "ℰ"><!ENTITY expectation "ℰ"><!ENTITY Fscr "ℱ"><!ENTITY Fouriertrf "ℱ"><!ENTITY phmmat "ℳ"><!ENTITY Mellintrf "ℳ"><!ENTITY Mscr "ℳ"><!ENTITY order "ℴ"><!ENTITY orderof "ℴ"><!ENTITY oscr "ℴ"><!ENTITY alefsym "ℵ"><!ENTITY aleph "ℵ"><!ENTITY beth "ℶ"><!ENTITY gimel "ℷ"><!ENTITY daleth "ℸ"><!ENTITY CapitalDifferentialD "ⅅ"><!ENTITY DD "ⅅ"><!ENTITY DifferentialD "ⅆ"><!ENTITY dd "ⅆ"><!ENTITY ExponentialE "ⅇ"><!ENTITY exponentiale "ⅇ"><!ENTITY ee "ⅇ"><!ENTITY ImaginaryI "ⅈ"><!ENTITY ii "ⅈ"><!ENTITY frac13 "⅓"><!ENTITY frac23 "⅔"><!ENTITY frac15 "⅕"><!ENTITY frac25 "⅖"><!ENTITY frac35 "⅗"><!ENTITY frac45 "⅘"><!ENTITY frac16 "⅙"><!ENTITY frac56 "⅚"><!ENTITY frac18 "⅛"><!ENTITY frac38 "⅜"><!ENTITY frac58 "⅝"><!ENTITY frac78 "⅞"><!ENTITY larr "←"><!ENTITY leftarrow "←"><!ENTITY LeftArrow "←"><!ENTITY slarr "←"><!ENTITY ShortLeftArrow "←"><!ENTITY uarr "↑"><!ENTITY uparrow "↑"><!ENTITY UpArrow "↑"><!ENTITY ShortUpArrow "↑"><!ENTITY rarr "→"><!ENTITY rightarrow "→"><!ENTITY RightArrow "→"><!ENTITY srarr "→"><!ENTITY ShortRightArrow "→"><!ENTITY darr "↓"><!ENTITY downarrow "↓"><!ENTITY DownArrow "↓"><!ENTITY ShortDownArrow "↓"><!ENTITY harr "↔"><!ENTITY leftrightarrow "↔"><!ENTITY LeftRightArrow "↔"><!ENTITY varr "↕"><!ENTITY updownarrow "↕"><!ENTITY UpDownArrow "↕"><!ENTITY nwarr "↖"><!ENTITY UpperLeftArrow "↖"><!ENTITY nwarrow "↖"><!ENTITY nearr "↗"><!ENTITY UpperRightArrow "↗"><!ENTITY nearrow "↗"><!ENTITY searr "↘"><!ENTITY searrow "↘"><!ENTITY LowerRightArrow "↘"><!ENTITY swarr "↙"><!ENTITY swarrow "↙"><!ENTITY LowerLeftArrow "↙"><!ENTITY nlarr "↚"><!ENTITY nleftarrow "↚"><!ENTITY nrarr "↛"><!ENTITY nrightarrow "↛"><!ENTITY rarrw "↝"><!ENTITY rightsquigarrow "↝"><!ENTITY nrarrw "↝̸"><!ENTITY Larr "↞"><!ENTITY twoheadleftarrow "↞"><!ENTITY Uarr "↟"><!ENTITY Rarr "↠"><!ENTITY twoheadrightarrow "↠"><!ENTITY Darr "↡"><!ENTITY larrtl "↢"><!ENTITY leftarrowtail "↢"><!ENTITY rarrtl "↣"><!ENTITY rightarrowtail "↣"><!ENTITY LeftTeeArrow "↤"><!ENTITY mapstoleft "↤"><!ENTITY UpTeeArrow "↥"><!ENTITY mapstoup "↥"><!ENTITY map "↦"><!ENTITY RightTeeArrow "↦"><!ENTITY mapsto "↦"><!ENTITY DownTeeArrow "↧"><!ENTITY mapstodown "↧"><!ENTITY larrhk "↩"><!ENTITY hookleftarrow "↩"><!ENTITY rarrhk "↪"><!ENTITY hookrightarrow "↪"><!ENTITY larrlp "↫"><!ENTITY looparrowleft "↫"><!ENTITY rarrlp "↬"><!ENTITY looparrowright "↬"><!ENTITY harrw "↭"><!ENTITY leftrightsquigarrow "↭"><!ENTITY nharr "↮"><!ENTITY nleftrightarrow "↮"><!ENTITY lsh "↰"><!ENTITY Lsh "↰"><!ENTITY rsh "↱"><!ENTITY Rsh "↱"><!ENTITY ldsh "↲"><!ENTITY rdsh "↳"><!ENTITY crarr "↵"><!ENTITY cularr "↶"><!ENTITY curvearrowleft "↶"><!ENTITY curarr "↷"><!ENTITY curvearrowright "↷"><!ENTITY olarr "↺"><!ENTITY circlearrowleft "↺"><!ENTITY orarr "↻"><!ENTITY circlearrowright "↻"><!ENTITY lharu "↼"><!ENTITY LeftVector "↼"><!ENTITY leftharpoonup "↼"><!ENTITY lhard "↽"><!ENTITY leftharpoondown "↽"><!ENTITY DownLeftVector "↽"><!ENTITY uharr "↾"><!ENTITY upharpoonright "↾"><!ENTITY RightUpVector "↾"><!ENTITY uharl "↿"><!ENTITY upharpoonleft "↿"><!ENTITY LeftUpVector "↿"><!ENTITY rharu "⇀"><!ENTITY RightVector "⇀"><!ENTITY rightharpoonup "⇀"><!ENTITY rhard "⇁"><!ENTITY rightharpoondown "⇁"><!ENTITY DownRightVector "⇁"><!ENTITY dharr "⇂"><!ENTITY RightDownVector "⇂"><!ENTITY downharpoonright "⇂"><!ENTITY dharl "⇃"><!ENTITY LeftDownVector "⇃"><!ENTITY downharpoonleft "⇃"><!ENTITY rlarr "⇄"><!ENTITY rightleftarrows "⇄"><!ENTITY RightArrowLeftArrow "⇄"><!ENTITY udarr "⇅"><!ENTITY UpArrowDownArrow "⇅"><!ENTITY lrarr "⇆"><!ENTITY leftrightarrows "⇆"><!ENTITY LeftArrowRightArrow "⇆"><!ENTITY llarr "⇇"><!ENTITY leftleftarrows "⇇"><!ENTITY uuarr "⇈"><!ENTITY upuparrows "⇈"><!ENTITY rrarr "⇉"><!ENTITY rightrightarrows "⇉"><!ENTITY ddarr "⇊"><!ENTITY downdownarrows "⇊"><!ENTITY lrhar "⇋"><!ENTITY ReverseEquilibrium "⇋"><!ENTITY leftrightharpoons "⇋"><!ENTITY rlhar "⇌"><!ENTITY rightleftharpoons "⇌"><!ENTITY Equilibrium "⇌"><!ENTITY nlArr "⇍"><!ENTITY nLeftarrow "⇍"><!ENTITY nhArr "⇎"><!ENTITY nLeftrightarrow "⇎"><!ENTITY nrArr "⇏"><!ENTITY nRightarrow "⇏"><!ENTITY lArr "⇐"><!ENTITY Leftarrow "⇐"><!ENTITY DoubleLeftArrow "⇐"><!ENTITY uArr "⇑"><!ENTITY Uparrow "⇑"><!ENTITY DoubleUpArrow "⇑"><!ENTITY rArr "⇒"><!ENTITY Rightarrow "⇒"><!ENTITY Implies "⇒"><!ENTITY DoubleRightArrow "⇒"><!ENTITY dArr "⇓"><!ENTITY Downarrow "⇓"><!ENTITY DoubleDownArrow "⇓"><!ENTITY hArr "⇔"><!ENTITY Leftrightarrow "⇔"><!ENTITY DoubleLeftRightArrow "⇔"><!ENTITY iff "⇔"><!ENTITY vArr "⇕"><!ENTITY Updownarrow "⇕"><!ENTITY DoubleUpDownArrow "⇕"><!ENTITY nwArr "⇖"><!ENTITY neArr "⇗"><!ENTITY seArr "⇘"><!ENTITY swArr "⇙"><!ENTITY lAarr "⇚"><!ENTITY Lleftarrow "⇚"><!ENTITY rAarr "⇛"><!ENTITY Rrightarrow "⇛"><!ENTITY zigrarr "⇝"><!ENTITY larrb "⇤"><!ENTITY LeftArrowBar "⇤"><!ENTITY rarrb "⇥"><!ENTITY RightArrowBar "⇥"><!ENTITY duarr "⇵"><!ENTITY DownArrowUpArrow "⇵"><!ENTITY loarr "⇽"><!ENTITY roarr "⇾"><!ENTITY hoarr "⇿"><!ENTITY forall "∀"><!ENTITY ForAll "∀"><!ENTITY comp "∁"><!ENTITY complement "∁"><!ENTITY part "∂"><!ENTITY PartialD "∂"><!ENTITY npart "∂̸"><!ENTITY exist "∃"><!ENTITY Exists "∃"><!ENTITY nexist "∄"><!ENTITY NotExists "∄"><!ENTITY nexists "∄"><!ENTITY empty "∅"><!ENTITY emptyset "∅"><!ENTITY emptyv "∅"><!ENTITY varnothing "∅"><!ENTITY nabla "∇"><!ENTITY Del "∇"><!ENTITY isin "∈"><!ENTITY isinv "∈"><!ENTITY Element "∈"><!ENTITY in "∈"><!ENTITY notin "∉"><!ENTITY NotElement "∉"><!ENTITY notinva "∉"><!ENTITY niv "∋"><!ENTITY ReverseElement "∋"><!ENTITY ni "∋"><!ENTITY SuchThat "∋"><!ENTITY notni "∌"><!ENTITY notniva "∌"><!ENTITY NotReverseElement "∌"><!ENTITY prod "∏"><!ENTITY Product "∏"><!ENTITY coprod "∐"><!ENTITY Coproduct "∐"><!ENTITY sum "∑"><!ENTITY Sum "∑"><!ENTITY minus "−"><!ENTITY mnplus "∓"><!ENTITY mp "∓"><!ENTITY MinusPlus "∓"><!ENTITY plusdo "∔"><!ENTITY dotplus "∔"><!ENTITY setmn "∖"><!ENTITY setminus "∖"><!ENTITY Backslash "∖"><!ENTITY ssetmn "∖"><!ENTITY smallsetminus "∖"><!ENTITY lowast "∗"><!ENTITY compfn "∘"><!ENTITY SmallCircle "∘"><!ENTITY radic "√"><!ENTITY Sqrt "√"><!ENTITY prop "∝"><!ENTITY propto "∝"><!ENTITY Proportional "∝"><!ENTITY vprop "∝"><!ENTITY varpropto "∝"><!ENTITY infin "∞"><!ENTITY angrt "∟"><!ENTITY ang "∠"><!ENTITY angle "∠"><!ENTITY nang "∠⃒"><!ENTITY angmsd "∡"><!ENTITY measuredangle "∡"><!ENTITY angsph "∢"><!ENTITY mid "∣"><!ENTITY VerticalBar "∣"><!ENTITY smid "∣"><!ENTITY shortmid "∣"><!ENTITY nmid "∤"><!ENTITY NotVerticalBar "∤"><!ENTITY nsmid "∤"><!ENTITY nshortmid "∤"><!ENTITY par "∥"><!ENTITY parallel "∥"><!ENTITY DoubleVerticalBar "∥"><!ENTITY spar "∥"><!ENTITY shortparallel "∥"><!ENTITY npar "∦"><!ENTITY nparallel "∦"><!ENTITY NotDoubleVerticalBar "∦"><!ENTITY nspar "∦"><!ENTITY nshortparallel "∦"><!ENTITY and "∧"><!ENTITY wedge "∧"><!ENTITY or "∨"><!ENTITY vee "∨"><!ENTITY cap "∩"><!ENTITY caps "∩︀"><!ENTITY cup "∪"><!ENTITY cups "∪︀"><!ENTITY int "∫"><!ENTITY Integral "∫"><!ENTITY Int "∬"><!ENTITY tint "∭"><!ENTITY iiint "∭"><!ENTITY conint "∮"><!ENTITY oint "∮"><!ENTITY ContourIntegral "∮"><!ENTITY Conint "∯"><!ENTITY DoubleContourIntegral "∯"><!ENTITY Cconint "∰"><!ENTITY cwint "∱"><!ENTITY cwconint "∲"><!ENTITY ClockwiseContourIntegral "∲"><!ENTITY awconint "∳"><!ENTITY CounterClockwiseContourIntegral "∳"><!ENTITY there4 "∴"><!ENTITY therefore "∴"><!ENTITY Therefore "∴"><!ENTITY becaus "∵"><!ENTITY because "∵"><!ENTITY Because "∵"><!ENTITY ratio "∶"><!ENTITY Colon "∷"><!ENTITY Proportion "∷"><!ENTITY minusd "∸"><!ENTITY dotminus "∸"><!ENTITY mDDot "∺"><!ENTITY homtht "∻"><!ENTITY sim "∼"><!ENTITY Tilde "∼"><!ENTITY thksim "∼"><!ENTITY thicksim "∼"><!ENTITY nvsim "∼⃒"><!ENTITY bsim "∽"><!ENTITY backsim "∽"><!ENTITY race "∽̱"><!ENTITY ac "∾"><!ENTITY mstpos "∾"><!ENTITY acE "∾̳"><!ENTITY acd "∿"><!ENTITY wreath "≀"><!ENTITY VerticalTilde "≀"><!ENTITY wr "≀"><!ENTITY nsim "≁"><!ENTITY NotTilde "≁"><!ENTITY esim "≂"><!ENTITY EqualTilde "≂"><!ENTITY eqsim "≂"><!ENTITY NotEqualTilde "≂̸"><!ENTITY nesim "≂̸"><!ENTITY sime "≃"><!ENTITY TildeEqual "≃"><!ENTITY simeq "≃"><!ENTITY nsime "≄"><!ENTITY nsimeq "≄"><!ENTITY NotTildeEqual "≄"><!ENTITY cong "≅"><!ENTITY TildeFullEqual "≅"><!ENTITY simne "≆"><!ENTITY ncong "≇"><!ENTITY NotTildeFullEqual "≇"><!ENTITY asymp "≈"><!ENTITY ap "≈"><!ENTITY TildeTilde "≈"><!ENTITY approx "≈"><!ENTITY thkap "≈"><!ENTITY thickapprox "≈"><!ENTITY nap "≉"><!ENTITY NotTildeTilde "≉"><!ENTITY napprox "≉"><!ENTITY ape "≊"><!ENTITY approxeq "≊"><!ENTITY apid "≋"><!ENTITY napid "≋̸"><!ENTITY bcong "≌"><!ENTITY backcong "≌"><!ENTITY asympeq "≍"><!ENTITY CupCap "≍"><!ENTITY nvap "≍⃒"><!ENTITY bump "≎"><!ENTITY HumpDownHump "≎"><!ENTITY Bumpeq "≎"><!ENTITY NotHumpDownHump "≎̸"><!ENTITY nbump "≎̸"><!ENTITY bumpe "≏"><!ENTITY HumpEqual "≏"><!ENTITY bumpeq "≏"><!ENTITY nbumpe "≏̸"><!ENTITY NotHumpEqual "≏̸"><!ENTITY esdot "≐"><!ENTITY DotEqual "≐"><!ENTITY doteq "≐"><!ENTITY nedot "≐̸"><!ENTITY eDot "≑"><!ENTITY doteqdot "≑"><!ENTITY efDot "≒"><!ENTITY fallingdotseq "≒"><!ENTITY erDot "≓"><!ENTITY risingdotseq "≓"><!ENTITY colone "≔"><!ENTITY coloneq "≔"><!ENTITY Assign "≔"><!ENTITY ecolon "≕"><!ENTITY eqcolon "≕"><!ENTITY ecir "≖"><!ENTITY eqcirc "≖"><!ENTITY cire "≗"><!ENTITY circeq "≗"><!ENTITY wedgeq "≙"><!ENTITY veeeq "≚"><!ENTITY trie "≜"><!ENTITY triangleq "≜"><!ENTITY equest "≟"><!ENTITY questeq "≟"><!ENTITY ne "≠"><!ENTITY NotEqual "≠"><!ENTITY equiv "≡"><!ENTITY Congruent "≡"><!ENTITY bnequiv "≡⃥"><!ENTITY nequiv "≢"><!ENTITY NotCongruent "≢"><!ENTITY le "≤"><!ENTITY leq "≤"><!ENTITY nvle "≤⃒"><!ENTITY ge "≥"><!ENTITY GreaterEqual "≥"><!ENTITY geq "≥"><!ENTITY nvge "≥⃒"><!ENTITY lE "≦"><!ENTITY LessFullEqual "≦"><!ENTITY leqq "≦"><!ENTITY nlE "≦̸"><!ENTITY nleqq "≦̸"><!ENTITY gE "≧"><!ENTITY GreaterFullEqual "≧"><!ENTITY geqq "≧"><!ENTITY ngE "≧̸"><!ENTITY ngeqq "≧̸"><!ENTITY NotGreaterFullEqual "≧̸"><!ENTITY lnE "≨"><!ENTITY lneqq "≨"><!ENTITY lvnE "≨︀"><!ENTITY lvertneqq "≨︀"><!ENTITY gnE "≩"><!ENTITY gneqq "≩"><!ENTITY gvnE "≩︀"><!ENTITY gvertneqq "≩︀"><!ENTITY Lt "≪"><!ENTITY NestedLessLess "≪"><!ENTITY ll "≪"><!ENTITY nLtv "≪̸"><!ENTITY NotLessLess "≪̸"><!ENTITY nLt "≪⃒"><!ENTITY Gt "≫"><!ENTITY NestedGreaterGreater "≫"><!ENTITY gg "≫"><!ENTITY nGtv "≫̸"><!ENTITY NotGreaterGreater "≫̸"><!ENTITY nGt "≫⃒"><!ENTITY twixt "≬"><!ENTITY between "≬"><!ENTITY NotCupCap "≭"><!ENTITY nlt "≮"><!ENTITY NotLess "≮"><!ENTITY nless "≮"><!ENTITY ngt "≯"><!ENTITY NotGreater "≯"><!ENTITY ngtr "≯"><!ENTITY nle "≰"><!ENTITY NotLessEqual "≰"><!ENTITY nleq "≰"><!ENTITY nge "≱"><!ENTITY NotGreaterEqual "≱"><!ENTITY ngeq "≱"><!ENTITY lsim "≲"><!ENTITY LessTilde "≲"><!ENTITY lesssim "≲"><!ENTITY gsim "≳"><!ENTITY gtrsim "≳"><!ENTITY GreaterTilde "≳"><!ENTITY nlsim "≴"><!ENTITY NotLessTilde "≴"><!ENTITY ngsim "≵"><!ENTITY NotGreaterTilde "≵"><!ENTITY lg "≶"><!ENTITY lessgtr "≶"><!ENTITY LessGreater "≶"><!ENTITY gl "≷"><!ENTITY gtrless "≷"><!ENTITY GreaterLess "≷"><!ENTITY ntlg "≸"><!ENTITY NotLessGreater "≸"><!ENTITY ntgl "≹"><!ENTITY NotGreaterLess "≹"><!ENTITY pr "≺"><!ENTITY Precedes "≺"><!ENTITY prec "≺"><!ENTITY sc "≻"><!ENTITY Succeeds "≻"><!ENTITY succ "≻"><!ENTITY prcue "≼"><!ENTITY PrecedesSlantEqual "≼"><!ENTITY preccurlyeq "≼"><!ENTITY sccue "≽"><!ENTITY SucceedsSlantEqual "≽"><!ENTITY succcurlyeq "≽"><!ENTITY prsim "≾"><!ENTITY precsim "≾"><!ENTITY PrecedesTilde "≾"><!ENTITY scsim "≿"><!ENTITY succsim "≿"><!ENTITY SucceedsTilde "≿"><!ENTITY NotSucceedsTilde "≿̸"><!ENTITY npr "⊀"><!ENTITY nprec "⊀"><!ENTITY NotPrecedes "⊀"><!ENTITY nsc "⊁"><!ENTITY nsucc "⊁"><!ENTITY NotSucceeds "⊁"><!ENTITY sub "⊂"><!ENTITY subset "⊂"><!ENTITY vnsub "⊂⃒"><!ENTITY nsubset "⊂⃒"><!ENTITY NotSubset "⊂⃒"><!ENTITY sup "⊃"><!ENTITY supset "⊃"><!ENTITY Superset "⊃"><!ENTITY vnsup "⊃⃒"><!ENTITY nsupset "⊃⃒"><!ENTITY NotSuperset "⊃⃒"><!ENTITY nsub "⊄"><!ENTITY nsup "⊅"><!ENTITY sube "⊆"><!ENTITY SubsetEqual "⊆"><!ENTITY subseteq "⊆"><!ENTITY supe "⊇"><!ENTITY supseteq "⊇"><!ENTITY SupersetEqual "⊇"><!ENTITY nsube "⊈"><!ENTITY nsubseteq "⊈"><!ENTITY NotSubsetEqual "⊈"><!ENTITY nsupe "⊉"><!ENTITY nsupseteq "⊉"><!ENTITY NotSupersetEqual "⊉"><!ENTITY subne "⊊"><!ENTITY subsetneq "⊊"><!ENTITY vsubne "⊊︀"><!ENTITY varsubsetneq "⊊︀"><!ENTITY supne "⊋"><!ENTITY supsetneq "⊋"><!ENTITY vsupne "⊋︀"><!ENTITY varsupsetneq "⊋︀"><!ENTITY cupdot "⊍"><!ENTITY uplus "⊎"><!ENTITY UnionPlus "⊎"><!ENTITY sqsub "⊏"><!ENTITY SquareSubset "⊏"><!ENTITY sqsubset "⊏"><!ENTITY NotSquareSubset "⊏̸"><!ENTITY sqsup "⊐"><!ENTITY SquareSuperset "⊐"><!ENTITY sqsupset "⊐"><!ENTITY NotSquareSuperset "⊐̸"><!ENTITY sqsube "⊑"><!ENTITY SquareSubsetEqual "⊑"><!ENTITY sqsubseteq "⊑"><!ENTITY sqsupe "⊒"><!ENTITY SquareSupersetEqual "⊒"><!ENTITY sqsupseteq "⊒"><!ENTITY sqcap "⊓"><!ENTITY SquareIntersection "⊓"><!ENTITY sqcaps "⊓︀"><!ENTITY sqcup "⊔"><!ENTITY SquareUnion "⊔"><!ENTITY sqcups "⊔︀"><!ENTITY oplus "⊕"><!ENTITY CirclePlus "⊕"><!ENTITY ominus "⊖"><!ENTITY CircleMinus "⊖"><!ENTITY otimes "⊗"><!ENTITY CircleTimes "⊗"><!ENTITY osol "⊘"><!ENTITY odot "⊙"><!ENTITY CircleDot "⊙"><!ENTITY ocir "⊚"><!ENTITY circledcirc "⊚"><!ENTITY oast "⊛"><!ENTITY circledast "⊛"><!ENTITY odash "⊝"><!ENTITY circleddash "⊝"><!ENTITY plusb "⊞"><!ENTITY boxplus "⊞"><!ENTITY minusb "⊟"><!ENTITY boxminus "⊟"><!ENTITY timesb "⊠"><!ENTITY boxtimes "⊠"><!ENTITY sdotb "⊡"><!ENTITY dotsquare "⊡"><!ENTITY vdash "⊢"><!ENTITY RightTee "⊢"><!ENTITY dashv "⊣"><!ENTITY LeftTee "⊣"><!ENTITY top "⊤"><!ENTITY DownTee "⊤"><!ENTITY bottom "⊥"><!ENTITY bot "⊥"><!ENTITY perp "⊥"><!ENTITY UpTee "⊥"><!ENTITY models "⊧"><!ENTITY vDash "⊨"><!ENTITY DoubleRightTee "⊨"><!ENTITY Vdash "⊩"><!ENTITY Vvdash "⊪"><!ENTITY VDash "⊫"><!ENTITY nvdash "⊬"><!ENTITY nvDash "⊭"><!ENTITY nVdash "⊮"><!ENTITY nVDash "⊯"><!ENTITY prurel "⊰"><!ENTITY vltri "⊲"><!ENTITY vartriangleleft "⊲"><!ENTITY LeftTriangle "⊲"><!ENTITY vrtri "⊳"><!ENTITY vartriangleright "⊳"><!ENTITY RightTriangle "⊳"><!ENTITY ltrie "⊴"><!ENTITY trianglelefteq "⊴"><!ENTITY LeftTriangleEqual "⊴"><!ENTITY nvltrie "⊴⃒"><!ENTITY rtrie "⊵"><!ENTITY trianglerighteq "⊵"><!ENTITY RightTriangleEqual "⊵"><!ENTITY nvrtrie "⊵⃒"><!ENTITY origof "⊶"><!ENTITY imof "⊷"><!ENTITY mumap "⊸"><!ENTITY multimap "⊸"><!ENTITY hercon "⊹"><!ENTITY intcal "⊺"><!ENTITY intercal "⊺"><!ENTITY veebar "⊻"><!ENTITY barvee "⊽"><!ENTITY angrtvb "⊾"><!ENTITY lrtri "⊿"><!ENTITY xwedge "⋀"><!ENTITY Wedge "⋀"><!ENTITY bigwedge "⋀"><!ENTITY xvee "⋁"><!ENTITY Vee "⋁"><!ENTITY bigvee "⋁"><!ENTITY xcap "⋂"><!ENTITY Intersection "⋂"><!ENTITY bigcap "⋂"><!ENTITY xcup "⋃"><!ENTITY Union "⋃"><!ENTITY bigcup "⋃"><!ENTITY diam "⋄"><!ENTITY diamond "⋄"><!ENTITY Diamond "⋄"><!ENTITY sdot "⋅"><!ENTITY sstarf "⋆"><!ENTITY Star "⋆"><!ENTITY divonx "⋇"><!ENTITY divideontimes "⋇"><!ENTITY bowtie "⋈"><!ENTITY ltimes "⋉"><!ENTITY rtimes "⋊"><!ENTITY lthree "⋋"><!ENTITY leftthreetimes "⋋"><!ENTITY rthree "⋌"><!ENTITY rightthreetimes "⋌"><!ENTITY bsime "⋍"><!ENTITY backsimeq "⋍"><!ENTITY cuvee "⋎"><!ENTITY curlyvee "⋎"><!ENTITY cuwed "⋏"><!ENTITY curlywedge "⋏"><!ENTITY Sub "⋐"><!ENTITY Subset "⋐"><!ENTITY Sup "⋑"><!ENTITY Supset "⋑"><!ENTITY Cap "⋒"><!ENTITY Cup "⋓"><!ENTITY fork "⋔"><!ENTITY pitchfork "⋔"><!ENTITY epar "⋕"><!ENTITY ltdot "⋖"><!ENTITY lessdot "⋖"><!ENTITY gtdot "⋗"><!ENTITY gtrdot "⋗"><!ENTITY Ll "⋘"><!ENTITY nLl "⋘̸"><!ENTITY Gg "⋙"><!ENTITY ggg "⋙"><!ENTITY nGg "⋙̸"><!ENTITY leg "⋚"><!ENTITY LessEqualGreater "⋚"><!ENTITY lesseqgtr "⋚"><!ENTITY lesg "⋚︀"><!ENTITY gel "⋛"><!ENTITY gtreqless "⋛"><!ENTITY GreaterEqualLess "⋛"><!ENTITY gesl "⋛︀"><!ENTITY cuepr "⋞"><!ENTITY curlyeqprec "⋞"><!ENTITY cuesc "⋟"><!ENTITY curlyeqsucc "⋟"><!ENTITY nprcue "⋠"><!ENTITY NotPrecedesSlantEqual "⋠"><!ENTITY nsccue "⋡"><!ENTITY NotSucceedsSlantEqual "⋡"><!ENTITY nsqsube "⋢"><!ENTITY NotSquareSubsetEqual "⋢"><!ENTITY nsqsupe "⋣"><!ENTITY NotSquareSupersetEqual "⋣"><!ENTITY lnsim "⋦"><!ENTITY gnsim "⋧"><!ENTITY prnsim "⋨"><!ENTITY precnsim "⋨"><!ENTITY scnsim "⋩"><!ENTITY succnsim "⋩"><!ENTITY nltri "⋪"><!ENTITY ntriangleleft "⋪"><!ENTITY NotLeftTriangle "⋪"><!ENTITY nrtri "⋫"><!ENTITY ntriangleright "⋫"><!ENTITY NotRightTriangle "⋫"><!ENTITY nltrie "⋬"><!ENTITY ntrianglelefteq "⋬"><!ENTITY NotLeftTriangleEqual "⋬"><!ENTITY nrtrie "⋭"><!ENTITY ntrianglerighteq "⋭"><!ENTITY NotRightTriangleEqual "⋭"><!ENTITY vellip "⋮"><!ENTITY ctdot "⋯"><!ENTITY utdot "⋰"><!ENTITY dtdot "⋱"><!ENTITY disin "⋲"><!ENTITY isinsv "⋳"><!ENTITY isins "⋴"><!ENTITY isindot "⋵"><!ENTITY notindot "⋵̸"><!ENTITY notinvc "⋶"><!ENTITY notinvb "⋷"><!ENTITY isinE "⋹"><!ENTITY notinE "⋹̸"><!ENTITY nisd "⋺"><!ENTITY xnis "⋻"><!ENTITY nis "⋼"><!ENTITY notnivc "⋽"><!ENTITY notnivb "⋾"><!ENTITY barwed "⌅"><!ENTITY barwedge "⌅"><!ENTITY Barwed "⌆"><!ENTITY doublebarwedge "⌆"><!ENTITY lceil "⌈"><!ENTITY LeftCeiling "⌈"><!ENTITY rceil "⌉"><!ENTITY RightCeiling "⌉"><!ENTITY lfloor "⌊"><!ENTITY LeftFloor "⌊"><!ENTITY rfloor "⌋"><!ENTITY RightFloor "⌋"><!ENTITY drcrop "⌌"><!ENTITY dlcrop "⌍"><!ENTITY urcrop "⌎"><!ENTITY ulcrop "⌏"><!ENTITY bnot "⌐"><!ENTITY profline "⌒"><!ENTITY profsurf "⌓"><!ENTITY telrec "⌕"><!ENTITY target "⌖"><!ENTITY ulcorn "⌜"><!ENTITY ulcorner "⌜"><!ENTITY urcorn "⌝"><!ENTITY urcorner "⌝"><!ENTITY dlcorn "⌞"><!ENTITY llcorner "⌞"><!ENTITY drcorn "⌟"><!ENTITY lrcorner "⌟"><!ENTITY frown "⌢"><!ENTITY sfrown "⌢"><!ENTITY smile "⌣"><!ENTITY ssmile "⌣"><!ENTITY cylcty "⌭"><!ENTITY profalar "⌮"><!ENTITY topbot "⌶"><!ENTITY ovbar "⌽"><!ENTITY solbar "⌿"><!ENTITY angzarr "⍼"><!ENTITY lmoust "⎰"><!ENTITY lmoustache "⎰"><!ENTITY rmoust "⎱"><!ENTITY rmoustache "⎱"><!ENTITY tbrk "⎴"><!ENTITY OverBracket "⎴"><!ENTITY bbrk "⎵"><!ENTITY UnderBracket "⎵"><!ENTITY bbrktbrk "⎶"><!ENTITY OverParenthesis "⏜"><!ENTITY UnderParenthesis "⏝"><!ENTITY OverBrace "⏞"><!ENTITY UnderBrace "⏟"><!ENTITY trpezium "⏢"><!ENTITY elinters "⏧"><!ENTITY blank "␣"><!ENTITY oS "Ⓢ"><!ENTITY circledS "Ⓢ"><!ENTITY boxh "─"><!ENTITY HorizontalLine "─"><!ENTITY boxv "│"><!ENTITY boxdr "┌"><!ENTITY boxdl "┐"><!ENTITY boxur "└"><!ENTITY boxul "┘"><!ENTITY boxvr "├"><!ENTITY boxvl "┤"><!ENTITY boxhd "┬"><!ENTITY boxhu "┴"><!ENTITY boxvh "┼"><!ENTITY boxH "═"><!ENTITY boxV "║"><!ENTITY boxdR "╒"><!ENTITY boxDr "╓"><!ENTITY boxDR "╔"><!ENTITY boxdL "╕"><!ENTITY boxDl "╖"><!ENTITY boxDL "╗"><!ENTITY boxuR "╘"><!ENTITY boxUr "╙"><!ENTITY boxUR "╚"><!ENTITY boxuL "╛"><!ENTITY boxUl "╜"><!ENTITY boxUL "╝"><!ENTITY boxvR "╞"><!ENTITY boxVr "╟"><!ENTITY boxVR "╠"><!ENTITY boxvL "╡"><!ENTITY boxVl "╢"><!ENTITY boxVL "╣"><!ENTITY boxHd "╤"><!ENTITY boxhD "╥"><!ENTITY boxHD "╦"><!ENTITY boxHu "╧"><!ENTITY boxhU "╨"><!ENTITY boxHU "╩"><!ENTITY boxvH "╪"><!ENTITY boxVh "╫"><!ENTITY boxVH "╬"><!ENTITY uhblk "▀"><!ENTITY lhblk "▄"><!ENTITY block "█"><!ENTITY blk14 "░"><!ENTITY blk12 "▒"><!ENTITY blk34 "▓"><!ENTITY squ "□"><!ENTITY square "□"><!ENTITY Square "□"><!ENTITY squf "▪"><!ENTITY squarf "▪"><!ENTITY blacksquare "▪"><!ENTITY FilledVerySmallSquare "▪"><!ENTITY EmptyVerySmallSquare "▫"><!ENTITY rect "▭"><!ENTITY marker "▮"><!ENTITY fltns "▱"><!ENTITY xutri "△"><!ENTITY bigtriangleup "△"><!ENTITY utrif "▴"><!ENTITY blacktriangle "▴"><!ENTITY utri "▵"><!ENTITY triangle "▵"><!ENTITY rtrif "▸"><!ENTITY blacktriangleright "▸"><!ENTITY rtri "▹"><!ENTITY triangleright "▹"><!ENTITY xdtri "▽"><!ENTITY bigtriangledown "▽"><!ENTITY dtrif "▾"><!ENTITY blacktriangledown "▾"><!ENTITY dtri "▿"><!ENTITY triangledown "▿"><!ENTITY ltrif "◂"><!ENTITY blacktriangleleft "◂"><!ENTITY ltri "◃"><!ENTITY triangleleft "◃"><!ENTITY loz "◊"><!ENTITY lozenge "◊"><!ENTITY cir "○"><!ENTITY tridot "◬"><!ENTITY xcirc "◯"><!ENTITY bigcirc "◯"><!ENTITY ultri "◸"><!ENTITY urtri "◹"><!ENTITY lltri "◺"><!ENTITY EmptySmallSquare "◻"><!ENTITY FilledSmallSquare "◼"><!ENTITY starf "★"><!ENTITY bigstar "★"><!ENTITY star "☆"><!ENTITY phone "☎"><!ENTITY female "♀"><!ENTITY male "♂"><!ENTITY spades "♠"><!ENTITY spadesuit "♠"><!ENTITY clubs "♣"><!ENTITY clubsuit "♣"><!ENTITY hearts "♥"><!ENTITY heartsuit "♥"><!ENTITY diams "♦"><!ENTITY diamondsuit "♦"><!ENTITY sung "♪"><!ENTITY flat "♭"><!ENTITY natur "♮"><!ENTITY natural "♮"><!ENTITY sharp "♯"><!ENTITY check "✓"><!ENTITY checkmark "✓"><!ENTITY cross "✗"><!ENTITY malt "✠"><!ENTITY maltese "✠"><!ENTITY sext "✶"><!ENTITY VerticalSeparator "❘"><!ENTITY lbbrk "❲"><!ENTITY rbbrk "❳"><!ENTITY bsolhsub "⟈"><!ENTITY suphsol "⟉"><!ENTITY lobrk "⟦"><!ENTITY LeftDoubleBracket "⟦"><!ENTITY robrk "⟧"><!ENTITY RightDoubleBracket "⟧"><!ENTITY lang "⟨"><!ENTITY LeftAngleBracket "⟨"><!ENTITY langle "⟨"><!ENTITY rang "⟩"><!ENTITY RightAngleBracket "⟩"><!ENTITY rangle "⟩"><!ENTITY Lang "⟪"><!ENTITY Rang "⟫"><!ENTITY loang "⟬"><!ENTITY roang "⟭"><!ENTITY xlarr "⟵"><!ENTITY longleftarrow "⟵"><!ENTITY LongLeftArrow "⟵"><!ENTITY xrarr "⟶"><!ENTITY longrightarrow "⟶"><!ENTITY LongRightArrow "⟶"><!ENTITY xharr "⟷"><!ENTITY longleftrightarrow "⟷"><!ENTITY LongLeftRightArrow "⟷"><!ENTITY xlArr "⟸"><!ENTITY Longleftarrow "⟸"><!ENTITY DoubleLongLeftArrow "⟸"><!ENTITY xrArr "⟹"><!ENTITY Longrightarrow "⟹"><!ENTITY DoubleLongRightArrow "⟹"><!ENTITY xhArr "⟺"><!ENTITY Longleftrightarrow "⟺"><!ENTITY DoubleLongLeftRightArrow "⟺"><!ENTITY xmap "⟼"><!ENTITY longmapsto "⟼"><!ENTITY dzigrarr "⟿"><!ENTITY nvlArr "⤂"><!ENTITY nvrArr "⤃"><!ENTITY nvHarr "⤄"><!ENTITY Map "⤅"><!ENTITY lbarr "⤌"><!ENTITY rbarr "⤍"><!ENTITY bkarow "⤍"><!ENTITY lBarr "⤎"><!ENTITY rBarr "⤏"><!ENTITY dbkarow "⤏"><!ENTITY RBarr "⤐"><!ENTITY drbkarow "⤐"><!ENTITY DDotrahd "⤑"><!ENTITY UpArrowBar "⤒"><!ENTITY DownArrowBar "⤓"><!ENTITY Rarrtl "⤖"><!ENTITY latail "⤙"><!ENTITY ratail "⤚"><!ENTITY lAtail "⤛"><!ENTITY rAtail "⤜"><!ENTITY larrfs "⤝"><!ENTITY rarrfs "⤞"><!ENTITY larrbfs "⤟"><!ENTITY rarrbfs "⤠"><!ENTITY nwarhk "⤣"><!ENTITY nearhk "⤤"><!ENTITY searhk "⤥"><!ENTITY hksearow "⤥"><!ENTITY swarhk "⤦"><!ENTITY hkswarow "⤦"><!ENTITY nwnear "⤧"><!ENTITY nesear "⤨"><!ENTITY toea "⤨"><!ENTITY seswar "⤩"><!ENTITY tosa "⤩"><!ENTITY swnwar "⤪"><!ENTITY rarrc "⤳"><!ENTITY nrarrc "⤳̸"><!ENTITY cudarrr "⤵"><!ENTITY ldca "⤶"><!ENTITY rdca "⤷"><!ENTITY cudarrl "⤸"><!ENTITY larrpl "⤹"><!ENTITY curarrm "⤼"><!ENTITY cularrp "⤽"><!ENTITY rarrpl "⥅"><!ENTITY harrcir "⥈"><!ENTITY Uarrocir "⥉"><!ENTITY lurdshar "⥊"><!ENTITY ldrushar "⥋"><!ENTITY LeftRightVector "⥎"><!ENTITY RightUpDownVector "⥏"><!ENTITY DownLeftRightVector "⥐"><!ENTITY LeftUpDownVector "⥑"><!ENTITY LeftVectorBar "⥒"><!ENTITY RightVectorBar "⥓"><!ENTITY RightUpVectorBar "⥔"><!ENTITY RightDownVectorBar "⥕"><!ENTITY DownLeftVectorBar "⥖"><!ENTITY DownRightVectorBar "⥗"><!ENTITY LeftUpVectorBar "⥘"><!ENTITY LeftDownVectorBar "⥙"><!ENTITY LeftTeeVector "⥚"><!ENTITY RightTeeVector "⥛"><!ENTITY RightUpTeeVector "⥜"><!ENTITY RightDownTeeVector "⥝"><!ENTITY DownLeftTeeVector "⥞"><!ENTITY DownRightTeeVector "⥟"><!ENTITY LeftUpTeeVector "⥠"><!ENTITY LeftDownTeeVector "⥡"><!ENTITY lHar "⥢"><!ENTITY uHar "⥣"><!ENTITY rHar "⥤"><!ENTITY dHar "⥥"><!ENTITY luruhar "⥦"><!ENTITY ldrdhar "⥧"><!ENTITY ruluhar "⥨"><!ENTITY rdldhar "⥩"><!ENTITY lharul "⥪"><!ENTITY llhard "⥫"><!ENTITY rharul "⥬"><!ENTITY lrhard "⥭"><!ENTITY udhar "⥮"><!ENTITY UpEquilibrium "⥮"><!ENTITY duhar "⥯"><!ENTITY ReverseUpEquilibrium "⥯"><!ENTITY RoundImplies "⥰"><!ENTITY erarr "⥱"><!ENTITY simrarr "⥲"><!ENTITY larrsim "⥳"><!ENTITY rarrsim "⥴"><!ENTITY rarrap "⥵"><!ENTITY ltlarr "⥶"><!ENTITY gtrarr "⥸"><!ENTITY subrarr "⥹"><!ENTITY suplarr "⥻"><!ENTITY lfisht "⥼"><!ENTITY rfisht "⥽"><!ENTITY ufisht "⥾"><!ENTITY dfisht "⥿"><!ENTITY lopar "⦅"><!ENTITY ropar "⦆"><!ENTITY lbrke "⦋"><!ENTITY rbrke "⦌"><!ENTITY lbrkslu "⦍"><!ENTITY rbrksld "⦎"><!ENTITY lbrksld "⦏"><!ENTITY rbrkslu "⦐"><!ENTITY langd "⦑"><!ENTITY rangd "⦒"><!ENTITY lparlt "⦓"><!ENTITY rpargt "⦔"><!ENTITY gtlPar "⦕"><!ENTITY ltrPar "⦖"><!ENTITY vzigzag "⦚"><!ENTITY vangrt "⦜"><!ENTITY angrtvbd "⦝"><!ENTITY ange "⦤"><!ENTITY range "⦥"><!ENTITY dwangle "⦦"><!ENTITY uwangle "⦧"><!ENTITY angmsdaa "⦨"><!ENTITY angmsdab "⦩"><!ENTITY angmsdac "⦪"><!ENTITY angmsdad "⦫"><!ENTITY angmsdae "⦬"><!ENTITY angmsdaf "⦭"><!ENTITY angmsdag "⦮"><!ENTITY angmsdah "⦯"><!ENTITY bemptyv "⦰"><!ENTITY demptyv "⦱"><!ENTITY cemptyv "⦲"><!ENTITY raemptyv "⦳"><!ENTITY laemptyv "⦴"><!ENTITY ohbar "⦵"><!ENTITY omid "⦶"><!ENTITY opar "⦷"><!ENTITY operp "⦹"><!ENTITY olcross "⦻"><!ENTITY odsold "⦼"><!ENTITY olcir "⦾"><!ENTITY ofcir "⦿"><!ENTITY olt "⧀"><!ENTITY ogt "⧁"><!ENTITY cirscir "⧂"><!ENTITY cirE "⧃"><!ENTITY solb "⧄"><!ENTITY bsolb "⧅"><!ENTITY boxbox "⧉"><!ENTITY trisb "⧍"><!ENTITY rtriltri "⧎"><!ENTITY LeftTriangleBar "⧏"><!ENTITY NotLeftTriangleBar "⧏̸"><!ENTITY RightTriangleBar "⧐"><!ENTITY NotRightTriangleBar "⧐̸"><!ENTITY iinfin "⧜"><!ENTITY infintie "⧝"><!ENTITY nvinfin "⧞"><!ENTITY eparsl "⧣"><!ENTITY smeparsl "⧤"><!ENTITY eqvparsl "⧥"><!ENTITY lozf "⧫"><!ENTITY blacklozenge "⧫"><!ENTITY RuleDelayed "⧴"><!ENTITY dsol "⧶"><!ENTITY xodot "⨀"><!ENTITY bigodot "⨀"><!ENTITY xoplus "⨁"><!ENTITY bigoplus "⨁"><!ENTITY xotime "⨂"><!ENTITY bigotimes "⨂"><!ENTITY xuplus "⨄"><!ENTITY biguplus "⨄"><!ENTITY xsqcup "⨆"><!ENTITY bigsqcup "⨆"><!ENTITY qint "⨌"><!ENTITY iiiint "⨌"><!ENTITY fpartint "⨍"><!ENTITY cirfnint "⨐"><!ENTITY awint "⨑"><!ENTITY rppolint "⨒"><!ENTITY scpolint "⨓"><!ENTITY npolint "⨔"><!ENTITY pointint "⨕"><!ENTITY quatint "⨖"><!ENTITY intlarhk "⨗"><!ENTITY pluscir "⨢"><!ENTITY plusacir "⨣"><!ENTITY simplus "⨤"><!ENTITY plusdu "⨥"><!ENTITY plussim "⨦"><!ENTITY plustwo "⨧"><!ENTITY mcomma "⨩"><!ENTITY minusdu "⨪"><!ENTITY loplus "⨭"><!ENTITY roplus "⨮"><!ENTITY Cross "⨯"><!ENTITY timesd "⨰"><!ENTITY timesbar "⨱"><!ENTITY smashp "⨳"><!ENTITY lotimes "⨴"><!ENTITY rotimes "⨵"><!ENTITY otimesas "⨶"><!ENTITY Otimes "⨷"><!ENTITY odiv "⨸"><!ENTITY triplus "⨹"><!ENTITY triminus "⨺"><!ENTITY tritime "⨻"><!ENTITY iprod "⨼"><!ENTITY intprod "⨼"><!ENTITY amalg "⨿"><!ENTITY capdot "⩀"><!ENTITY ncup "⩂"><!ENTITY ncap "⩃"><!ENTITY capand "⩄"><!ENTITY cupor "⩅"><!ENTITY cupcap "⩆"><!ENTITY capcup "⩇"><!ENTITY cupbrcap "⩈"><!ENTITY capbrcup "⩉"><!ENTITY cupcup "⩊"><!ENTITY capcap "⩋"><!ENTITY ccups "⩌"><!ENTITY ccaps "⩍"><!ENTITY ccupssm "⩐"><!ENTITY And "⩓"><!ENTITY Or "⩔"><!ENTITY andand "⩕"><!ENTITY oror "⩖"><!ENTITY orslope "⩗"><!ENTITY andslope "⩘"><!ENTITY andv "⩚"><!ENTITY orv "⩛"><!ENTITY andd "⩜"><!ENTITY ord "⩝"><!ENTITY wedbar "⩟"><!ENTITY sdote "⩦"><!ENTITY simdot "⩪"><!ENTITY congdot "⩭"><!ENTITY ncongdot "⩭̸"><!ENTITY easter "⩮"><!ENTITY apacir "⩯"><!ENTITY apE "⩰"><!ENTITY napE "⩰̸"><!ENTITY eplus "⩱"><!ENTITY pluse "⩲"><!ENTITY Esim "⩳"><!ENTITY Colone "⩴"><!ENTITY Equal "⩵"><!ENTITY eDDot "⩷"><!ENTITY ddotseq "⩷"><!ENTITY equivDD "⩸"><!ENTITY ltcir "⩹"><!ENTITY gtcir "⩺"><!ENTITY ltquest "⩻"><!ENTITY gtquest "⩼"><!ENTITY les "⩽"><!ENTITY LessSlantEqual "⩽"><!ENTITY leqslant "⩽"><!ENTITY nles "⩽̸"><!ENTITY NotLessSlantEqual "⩽̸"><!ENTITY nleqslant "⩽̸"><!ENTITY ges "⩾"><!ENTITY GreaterSlantEqual "⩾"><!ENTITY geqslant "⩾"><!ENTITY nges "⩾̸"><!ENTITY NotGreaterSlantEqual "⩾̸"><!ENTITY ngeqslant "⩾̸"><!ENTITY lesdot "⩿"><!ENTITY gesdot "⪀"><!ENTITY lesdoto "⪁"><!ENTITY gesdoto "⪂"><!ENTITY lesdotor "⪃"><!ENTITY gesdotol "⪄"><!ENTITY lap "⪅"><!ENTITY lessapprox "⪅"><!ENTITY gap "⪆"><!ENTITY gtrapprox "⪆"><!ENTITY lne "⪇"><!ENTITY lneq "⪇"><!ENTITY gne "⪈"><!ENTITY gneq "⪈"><!ENTITY lnap "⪉"><!ENTITY lnapprox "⪉"><!ENTITY gnap "⪊"><!ENTITY gnapprox "⪊"><!ENTITY lEg "⪋"><!ENTITY lesseqqgtr "⪋"><!ENTITY gEl "⪌"><!ENTITY gtreqqless "⪌"><!ENTITY lsime "⪍"><!ENTITY gsime "⪎"><!ENTITY lsimg "⪏"><!ENTITY gsiml "⪐"><!ENTITY lgE "⪑"><!ENTITY glE "⪒"><!ENTITY lesges "⪓"><!ENTITY gesles "⪔"><!ENTITY els "⪕"><!ENTITY eqslantless "⪕"><!ENTITY egs "⪖"><!ENTITY eqslantgtr "⪖"><!ENTITY elsdot "⪗"><!ENTITY egsdot "⪘"><!ENTITY el "⪙"><!ENTITY eg "⪚"><!ENTITY siml "⪝"><!ENTITY simg "⪞"><!ENTITY simlE "⪟"><!ENTITY simgE "⪠"><!ENTITY LessLess "⪡"><!ENTITY NotNestedLessLess "⪡̸"><!ENTITY GreaterGreater "⪢"><!ENTITY NotNestedGreaterGreater "⪢̸"><!ENTITY glj "⪤"><!ENTITY gla "⪥"><!ENTITY ltcc "⪦"><!ENTITY gtcc "⪧"><!ENTITY lescc "⪨"><!ENTITY gescc "⪩"><!ENTITY smt "⪪"><!ENTITY lat "⪫"><!ENTITY smte "⪬"><!ENTITY smtes "⪬︀"><!ENTITY late "⪭"><!ENTITY lates "⪭︀"><!ENTITY bumpE "⪮"><!ENTITY pre "⪯"><!ENTITY preceq "⪯"><!ENTITY PrecedesEqual "⪯"><!ENTITY npre "⪯̸"><!ENTITY npreceq "⪯̸"><!ENTITY NotPrecedesEqual "⪯̸"><!ENTITY sce "⪰"><!ENTITY succeq "⪰"><!ENTITY SucceedsEqual "⪰"><!ENTITY nsce "⪰̸"><!ENTITY nsucceq "⪰̸"><!ENTITY NotSucceedsEqual "⪰̸"><!ENTITY prE "⪳"><!ENTITY scE "⪴"><!ENTITY prnE "⪵"><!ENTITY precneqq "⪵"><!ENTITY scnE "⪶"><!ENTITY succneqq "⪶"><!ENTITY prap "⪷"><!ENTITY precapprox "⪷"><!ENTITY scap "⪸"><!ENTITY succapprox "⪸"><!ENTITY prnap "⪹"><!ENTITY precnapprox "⪹"><!ENTITY scnap "⪺"><!ENTITY succnapprox "⪺"><!ENTITY Pr "⪻"><!ENTITY Sc "⪼"><!ENTITY subdot "⪽"><!ENTITY supdot "⪾"><!ENTITY subplus "⪿"><!ENTITY supplus "⫀"><!ENTITY submult "⫁"><!ENTITY supmult "⫂"><!ENTITY subedot "⫃"><!ENTITY supedot "⫄"><!ENTITY subE "⫅"><!ENTITY subseteqq "⫅"><!ENTITY nsubE "⫅̸"><!ENTITY nsubseteqq "⫅̸"><!ENTITY supE "⫆"><!ENTITY supseteqq "⫆"><!ENTITY nsupE "⫆̸"><!ENTITY nsupseteqq "⫆̸"><!ENTITY subsim "⫇"><!ENTITY supsim "⫈"><!ENTITY subnE "⫋"><!ENTITY subsetneqq "⫋"><!ENTITY vsubnE "⫋︀"><!ENTITY varsubsetneqq "⫋︀"><!ENTITY supnE "⫌"><!ENTITY supsetneqq "⫌"><!ENTITY vsupnE "⫌︀"><!ENTITY varsupsetneqq "⫌︀"><!ENTITY csub "⫏"><!ENTITY csup "⫐"><!ENTITY csube "⫑"><!ENTITY csupe "⫒"><!ENTITY subsup "⫓"><!ENTITY supsub "⫔"><!ENTITY subsub "⫕"><!ENTITY supsup "⫖"><!ENTITY suphsub "⫗"><!ENTITY supdsub "⫘"><!ENTITY forkv "⫙"><!ENTITY topfork "⫚"><!ENTITY mlcp "⫛"><!ENTITY Dashv "⫤"><!ENTITY DoubleLeftTee "⫤"><!ENTITY Vdashl "⫦"><!ENTITY Barv "⫧"><!ENTITY vBar "⫨"><!ENTITY vBarv "⫩"><!ENTITY Vbar "⫫"><!ENTITY Not "⫬"><!ENTITY bNot "⫭"><!ENTITY rnmid "⫮"><!ENTITY cirmid "⫯"><!ENTITY midcir "⫰"><!ENTITY topcir "⫱"><!ENTITY nhpar "⫲"><!ENTITY parsim "⫳"><!ENTITY parsl "⫽"><!ENTITY nparsl "⫽⃥"><!ENTITY fflig "ff"><!ENTITY filig "fi"><!ENTITY fllig "fl"><!ENTITY ffilig "ffi"><!ENTITY ffllig "ffl"><!ENTITY Ascr "𝒜"><!ENTITY Cscr "𝒞"><!ENTITY Dscr "𝒟"><!ENTITY Gscr "𝒢"><!ENTITY Jscr "𝒥"><!ENTITY Kscr "𝒦"><!ENTITY Nscr "𝒩"><!ENTITY Oscr "𝒪"><!ENTITY Pscr "𝒫"><!ENTITY Qscr "𝒬"><!ENTITY Sscr "𝒮"><!ENTITY Tscr "𝒯"><!ENTITY Uscr "𝒰"><!ENTITY Vscr "𝒱"><!ENTITY Wscr "𝒲"><!ENTITY Xscr "𝒳"><!ENTITY Yscr "𝒴"><!ENTITY Zscr "𝒵"><!ENTITY ascr "𝒶"><!ENTITY bscr "𝒷"><!ENTITY cscr "𝒸"><!ENTITY dscr "𝒹"><!ENTITY fscr "𝒻"><!ENTITY hscr "𝒽"><!ENTITY iscr "𝒾"><!ENTITY jscr "𝒿"><!ENTITY kscr "𝓀"><!ENTITY lscr "𝓁"><!ENTITY mscr "𝓂"><!ENTITY nscr "𝓃"><!ENTITY pscr "𝓅"><!ENTITY qscr "𝓆"><!ENTITY rscr "𝓇"><!ENTITY sscr "𝓈"><!ENTITY tscr "𝓉"><!ENTITY uscr "𝓊"><!ENTITY vscr "𝓋"><!ENTITY wscr "𝓌"><!ENTITY xscr "𝓍"><!ENTITY yscr "𝓎"><!ENTITY zscr "𝓏"><!ENTITY Afr "𝔄"><!ENTITY Bfr "𝔅"><!ENTITY Dfr "𝔇"><!ENTITY Efr "𝔈"><!ENTITY Ffr "𝔉"><!ENTITY Gfr "𝔊"><!ENTITY Jfr "𝔍"><!ENTITY Kfr "𝔎"><!ENTITY Lfr "𝔏"><!ENTITY Mfr "𝔐"><!ENTITY Nfr "𝔑"><!ENTITY Ofr "𝔒"><!ENTITY Pfr "𝔓"><!ENTITY Qfr "𝔔"><!ENTITY Sfr "𝔖"><!ENTITY Tfr "𝔗"><!ENTITY Ufr "𝔘"><!ENTITY Vfr "𝔙"><!ENTITY Wfr "𝔚"><!ENTITY Xfr "𝔛"><!ENTITY Yfr "𝔜"><!ENTITY afr "𝔞"><!ENTITY bfr "𝔟"><!ENTITY cfr "𝔠"><!ENTITY dfr "𝔡"><!ENTITY efr "𝔢"><!ENTITY ffr "𝔣"><!ENTITY gfr "𝔤"><!ENTITY hfr "𝔥"><!ENTITY ifr "𝔦"><!ENTITY jfr "𝔧"><!ENTITY kfr "𝔨"><!ENTITY lfr "𝔩"><!ENTITY mfr "𝔪"><!ENTITY nfr "𝔫"><!ENTITY ofr "𝔬"><!ENTITY pfr "𝔭"><!ENTITY qfr "𝔮"><!ENTITY rfr "𝔯"><!ENTITY sfr "𝔰"><!ENTITY tfr "𝔱"><!ENTITY ufr "𝔲"><!ENTITY vfr "𝔳"><!ENTITY wfr "𝔴"><!ENTITY xfr "𝔵"><!ENTITY yfr "𝔶"><!ENTITY zfr "𝔷"><!ENTITY Aopf "𝔸"><!ENTITY Bopf "𝔹"><!ENTITY Dopf "𝔻"><!ENTITY Eopf "𝔼"><!ENTITY Fopf "𝔽"><!ENTITY Gopf "𝔾"><!ENTITY Iopf "𝕀"><!ENTITY Jopf "𝕁"><!ENTITY Kopf "𝕂"><!ENTITY Lopf "𝕃"><!ENTITY Mopf "𝕄"><!ENTITY Oopf "𝕆"><!ENTITY Sopf "𝕊"><!ENTITY Topf "𝕋"><!ENTITY Uopf "𝕌"><!ENTITY Vopf "𝕍"><!ENTITY Wopf "𝕎"><!ENTITY Xopf "𝕏"><!ENTITY Yopf "𝕐"><!ENTITY aopf "𝕒"><!ENTITY bopf "𝕓"><!ENTITY copf "𝕔"><!ENTITY dopf "𝕕"><!ENTITY eopf "𝕖"><!ENTITY fopf "𝕗"><!ENTITY gopf "𝕘"><!ENTITY hopf "𝕙"><!ENTITY iopf "𝕚"><!ENTITY jopf "𝕛"><!ENTITY kopf "𝕜"><!ENTITY lopf "𝕝"><!ENTITY mopf "𝕞"><!ENTITY nopf "𝕟"><!ENTITY oopf "𝕠"><!ENTITY popf "𝕡"><!ENTITY qopf "𝕢"><!ENTITY ropf "𝕣"><!ENTITY sopf "𝕤"><!ENTITY topf "𝕥"><!ENTITY uopf "𝕦"><!ENTITY vopf "𝕧"><!ENTITY wopf "𝕨"><!ENTITY xopf "𝕩"><!ENTITY yopf "𝕪"><!ENTITY zopf "𝕫"> )xmlxmlxml"; } |