diff options
Diffstat (limited to 'Userland/Libraries/LibWeb')
30 files changed, 67 insertions, 67 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp index 694f321066..c9e1a2ae58 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp @@ -18,7 +18,7 @@ CSSGroupingRule::~CSSGroupingRule() { } -size_t CSSGroupingRule::insert_rule(StringView const&, size_t) +size_t CSSGroupingRule::insert_rule(StringView, size_t) { // https://www.w3.org/TR/cssom-1/#insert-a-css-rule TODO(); diff --git a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h index 108de57469..af12208697 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h @@ -23,7 +23,7 @@ public: CSSRuleList const& css_rules() const { return m_rules; } CSSRuleList& css_rules() { return m_rules; } - size_t insert_rule(StringView const& rule, size_t index = 0); + size_t insert_rule(StringView rule, size_t index = 0); void delete_rule(size_t index); virtual void for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const; diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 314660fbdf..d52c1045e4 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -147,7 +147,7 @@ void TokenStream<T>::dump_all_tokens() } } -Parser::Parser(ParsingContext const& context, StringView const& input, String const& encoding) +Parser::Parser(ParsingContext const& context, StringView input, String const& encoding) : m_context(context) , m_tokenizer(input, encoding) , m_tokens(m_tokenizer.parse()) @@ -3685,7 +3685,7 @@ Optional<Selector::SimpleSelector::ANPlusBPattern> Parser::parse_a_n_plus_b_patt auto is_dashndash = [](StyleComponentValueRule const& value) -> bool { return value.is(Token::Type::Ident) && value.token().ident().equals_ignoring_case("-n-"sv); }; - auto is_delim = [](StyleComponentValueRule const& value, StringView const& delim) -> bool { + auto is_delim = [](StyleComponentValueRule const& value, StringView delim) -> bool { return value.is(Token::Type::Delim) && value.token().delim().equals_ignoring_case(delim); }; auto is_n_dimension = [](StyleComponentValueRule const& value) -> bool { @@ -4208,7 +4208,7 @@ OwnPtr<CalculatedStyleValue::CalcSum> Parser::parse_calc_sum(ParsingContext cons return make<CalculatedStyleValue::CalcSum>(parsed_calc_product.release_nonnull(), move(additional)); } -bool Parser::has_ignored_vendor_prefix(StringView const& string) +bool Parser::has_ignored_vendor_prefix(StringView string) { if (!string.starts_with('-')) return false; @@ -4223,7 +4223,7 @@ bool Parser::has_ignored_vendor_prefix(StringView const& string) namespace Web { -RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const& context, StringView const& css) +RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const& context, StringView css) { if (css.is_empty()) return CSS::CSSStyleSheet::create({}); @@ -4231,7 +4231,7 @@ RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const& context, StringV return parser.parse_as_stylesheet(); } -RefPtr<CSS::PropertyOwningCSSStyleDeclaration> parse_css_declaration(CSS::ParsingContext const& context, StringView const& css) +RefPtr<CSS::PropertyOwningCSSStyleDeclaration> parse_css_declaration(CSS::ParsingContext const& context, StringView css) { if (css.is_empty()) return CSS::PropertyOwningCSSStyleDeclaration::create({}, {}); @@ -4239,7 +4239,7 @@ RefPtr<CSS::PropertyOwningCSSStyleDeclaration> parse_css_declaration(CSS::Parsin return parser.parse_as_list_of_declarations(); } -RefPtr<CSS::StyleValue> parse_css_value(CSS::ParsingContext const& context, StringView const& string, CSS::PropertyID property_id) +RefPtr<CSS::StyleValue> parse_css_value(CSS::ParsingContext const& context, StringView string, CSS::PropertyID property_id) { if (string.is_empty()) return {}; @@ -4253,25 +4253,25 @@ RefPtr<CSS::CSSRule> parse_css_rule(CSS::ParsingContext const& context, StringVi return parser.parse_as_rule(); } -Optional<CSS::SelectorList> parse_selector(CSS::ParsingContext const& context, StringView const& selector_text) +Optional<CSS::SelectorList> parse_selector(CSS::ParsingContext const& context, StringView selector_text) { CSS::Parser parser(context, selector_text); return parser.parse_as_selector(); } -RefPtr<CSS::MediaQuery> parse_media_query(CSS::ParsingContext const& context, StringView const& string) +RefPtr<CSS::MediaQuery> parse_media_query(CSS::ParsingContext const& context, StringView string) { CSS::Parser parser(context, string); return parser.parse_as_media_query(); } -NonnullRefPtrVector<CSS::MediaQuery> parse_media_query_list(CSS::ParsingContext const& context, StringView const& string) +NonnullRefPtrVector<CSS::MediaQuery> parse_media_query_list(CSS::ParsingContext const& context, StringView string) { CSS::Parser parser(context, string); return parser.parse_as_media_query_list(); } -RefPtr<CSS::Supports> parse_css_supports(CSS::ParsingContext const& context, StringView const& string) +RefPtr<CSS::Supports> parse_css_supports(CSS::ParsingContext const& context, StringView string) { if (string.is_empty()) return {}; @@ -4279,7 +4279,7 @@ RefPtr<CSS::Supports> parse_css_supports(CSS::ParsingContext const& context, Str return parser.parse_as_supports(); } -RefPtr<CSS::StyleValue> parse_html_length(DOM::Document const& document, StringView const& string) +RefPtr<CSS::StyleValue> parse_html_length(DOM::Document const& document, StringView string) { auto integer = string.to_int(); if (integer.has_value()) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h index 6592e73dc4..1377bf2ea4 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h @@ -80,7 +80,7 @@ private: class Parser { public: - Parser(ParsingContext const&, StringView const& input, String const& encoding = "utf-8"); + Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); ~Parser(); // The normal parser entry point, for parsing stylesheets. @@ -260,7 +260,7 @@ private: Optional<Supports::InParens> parse_supports_in_parens(TokenStream<StyleComponentValueRule>&); Optional<Supports::Feature> parse_supports_feature(TokenStream<StyleComponentValueRule>&); - static bool has_ignored_vendor_prefix(StringView const&); + static bool has_ignored_vendor_prefix(StringView); ParsingContext m_context; @@ -273,15 +273,15 @@ private: namespace Web { -RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const&, StringView const&); -RefPtr<CSS::PropertyOwningCSSStyleDeclaration> parse_css_declaration(CSS::ParsingContext const&, StringView const&); -RefPtr<CSS::StyleValue> parse_css_value(CSS::ParsingContext const&, StringView const&, CSS::PropertyID property_id = CSS::PropertyID::Invalid); -Optional<CSS::SelectorList> parse_selector(CSS::ParsingContext const&, StringView const&); +RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const&, StringView); +RefPtr<CSS::PropertyOwningCSSStyleDeclaration> parse_css_declaration(CSS::ParsingContext const&, StringView); +RefPtr<CSS::StyleValue> parse_css_value(CSS::ParsingContext const&, StringView, CSS::PropertyID property_id = CSS::PropertyID::Invalid); +Optional<CSS::SelectorList> parse_selector(CSS::ParsingContext const&, StringView); RefPtr<CSS::CSSRule> parse_css_rule(CSS::ParsingContext const&, StringView); -RefPtr<CSS::MediaQuery> parse_media_query(CSS::ParsingContext const&, StringView const&); -NonnullRefPtrVector<CSS::MediaQuery> parse_media_query_list(CSS::ParsingContext const&, StringView const&); -RefPtr<CSS::Supports> parse_css_supports(CSS::ParsingContext const&, StringView const&); +RefPtr<CSS::MediaQuery> parse_media_query(CSS::ParsingContext const&, StringView); +NonnullRefPtrVector<CSS::MediaQuery> parse_media_query_list(CSS::ParsingContext const&, StringView); +RefPtr<CSS::Supports> parse_css_supports(CSS::ParsingContext const&, StringView); -RefPtr<CSS::StyleValue> parse_html_length(DOM::Document const&, StringView const&); +RefPtr<CSS::StyleValue> parse_html_length(DOM::Document const&, StringView); } diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp index 9c4602606a..d7f2808720 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp @@ -191,7 +191,7 @@ static inline bool is_E(u32 code_point) namespace Web::CSS { -Tokenizer::Tokenizer(const StringView& input, const String& encoding) +Tokenizer::Tokenizer(StringView input, const String& 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 d557bee3db..201ac94ae2 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.h @@ -66,7 +66,7 @@ public: class Tokenizer { public: - explicit Tokenizer(const StringView& input, const String& encoding); + explicit Tokenizer(StringView input, const String& encoding); [[nodiscard]] Vector<Token> parse(); diff --git a/Userland/Libraries/LibWeb/CSS/Serialize.cpp b/Userland/Libraries/LibWeb/CSS/Serialize.cpp index 07e8eb7555..e43a5e03c3 100644 --- a/Userland/Libraries/LibWeb/CSS/Serialize.cpp +++ b/Userland/Libraries/LibWeb/CSS/Serialize.cpp @@ -24,7 +24,7 @@ void escape_a_character_as_code_point(StringBuilder& builder, u32 character) } // https://www.w3.org/TR/cssom-1/#serialize-an-identifier -void serialize_an_identifier(StringBuilder& builder, StringView const& ident) +void serialize_an_identifier(StringBuilder& builder, StringView ident) { Utf8View characters { ident }; auto first_character = characters.is_empty() ? 0 : *characters.begin(); @@ -76,7 +76,7 @@ void serialize_an_identifier(StringBuilder& builder, StringView const& ident) } // https://www.w3.org/TR/cssom-1/#serialize-a-string -void serialize_a_string(StringBuilder& builder, StringView const& string) +void serialize_a_string(StringBuilder& builder, StringView string) { Utf8View characters { string }; @@ -108,7 +108,7 @@ void serialize_a_string(StringBuilder& builder, StringView const& string) } // https://www.w3.org/TR/cssom-1/#serialize-a-url -void serialize_a_url(StringBuilder& builder, StringView const& url) +void serialize_a_url(StringBuilder& builder, StringView url) { // To serialize a URL means to create a string represented by "url(", // followed by the serialization of the URL as a string, followed by ")". @@ -131,21 +131,21 @@ String escape_a_character_as_code_point(u32 character) return builder.to_string(); } -String serialize_an_identifier(StringView const& ident) +String serialize_an_identifier(StringView ident) { StringBuilder builder; serialize_an_identifier(builder, ident); return builder.to_string(); } -String serialize_a_string(StringView const& string) +String serialize_a_string(StringView string) { StringBuilder builder; serialize_a_string(builder, string); return builder.to_string(); } -String serialize_a_url(StringView const& url) +String serialize_a_url(StringView url) { StringBuilder builder; serialize_a_url(builder, url); diff --git a/Userland/Libraries/LibWeb/CSS/Serialize.h b/Userland/Libraries/LibWeb/CSS/Serialize.h index 01281efbbb..15ca58151b 100644 --- a/Userland/Libraries/LibWeb/CSS/Serialize.h +++ b/Userland/Libraries/LibWeb/CSS/Serialize.h @@ -14,14 +14,14 @@ namespace Web::CSS { void escape_a_character(StringBuilder&, u32 character); void escape_a_character_as_code_point(StringBuilder&, u32 character); -void serialize_an_identifier(StringBuilder&, StringView const& ident); -void serialize_a_string(StringBuilder&, StringView const& string); -void serialize_a_url(StringBuilder&, StringView const& url); +void serialize_an_identifier(StringBuilder&, StringView ident); +void serialize_a_string(StringBuilder&, StringView string); +void serialize_a_url(StringBuilder&, StringView url); String escape_a_character(u32 character); String escape_a_character_as_code_point(u32 character); -String serialize_an_identifier(StringView const& ident); -String serialize_a_string(StringView const& string); -String serialize_a_url(StringView const& url); +String serialize_an_identifier(StringView ident); +String serialize_a_string(StringView string); +String serialize_a_url(StringView url); } diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 3b2e13ce56..8c78d203b4 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -705,7 +705,7 @@ JS::Interpreter& Document::interpreter() return *m_interpreter; } -JS::Value Document::run_javascript(const StringView& source, const StringView& filename) +JS::Value Document::run_javascript(StringView source, StringView filename) { auto parser = JS::Parser(JS::Lexer(source, filename)); auto program = parser.parse_program(); diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index e9623c896c..98c65e68b9 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -177,7 +177,7 @@ public: JS::Realm& realm(); JS::Interpreter& interpreter(); - JS::Value run_javascript(const StringView& source, const StringView& filename = "(unknown)"); + JS::Value run_javascript(StringView source, StringView filename = "(unknown)"); NonnullRefPtr<Element> create_element(const String& tag_name); NonnullRefPtr<Element> create_element_ns(const String& namespace_, const String& qualifed_name); diff --git a/Userland/Libraries/LibWeb/DOM/Event.h b/Userland/Libraries/LibWeb/DOM/Event.h index cbd65fdc0d..80963e100d 100644 --- a/Userland/Libraries/LibWeb/DOM/Event.h +++ b/Userland/Libraries/LibWeb/DOM/Event.h @@ -61,7 +61,7 @@ public: double time_stamp() const; const FlyString& type() const { return m_type; } - void set_type(const StringView& type) { m_type = type; } + void set_type(StringView type) { m_type = type; } RefPtr<EventTarget> target() const { return m_target; } void set_target(EventTarget* target) { m_target = target; } diff --git a/Userland/Libraries/LibWeb/DOMTreeModel.cpp b/Userland/Libraries/LibWeb/DOMTreeModel.cpp index 0fdf89666e..ccde46a4c7 100644 --- a/Userland/Libraries/LibWeb/DOMTreeModel.cpp +++ b/Userland/Libraries/LibWeb/DOMTreeModel.cpp @@ -94,7 +94,7 @@ int DOMTreeModel::column_count(const GUI::ModelIndex&) const return 1; } -static String with_whitespace_collapsed(const StringView& string) +static String with_whitespace_collapsed(StringView string) { StringBuilder builder; for (size_t i = 0; i < string.length(); ++i) { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp b/Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp index d0e6d90083..6371b62d8f 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/Entities.cpp @@ -10,7 +10,7 @@ namespace Web { namespace HTML { -Optional<EntityMatch> code_points_from_entity(const StringView& entity) +Optional<EntityMatch> code_points_from_entity(StringView entity) { constexpr struct { StringView entity; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/Entities.h b/Userland/Libraries/LibWeb/HTML/Parser/Entities.h index 937a3985e4..1b56616acb 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/Entities.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/Entities.h @@ -17,7 +17,7 @@ struct EntityMatch { StringView entity; }; -Optional<EntityMatch> code_points_from_entity(const StringView&); +Optional<EntityMatch> code_points_from_entity(StringView); } } diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index 1a7ada5a10..3919802f57 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -118,7 +118,7 @@ static bool is_html_integration_point(DOM::Element const& element) return false; } -RefPtr<DOM::Document> parse_html_document(const StringView& data, const AK::URL& url, const String& encoding) +RefPtr<DOM::Document> parse_html_document(StringView data, const AK::URL& url, const String& encoding) { auto document = DOM::Document::create(url); HTMLParser parser(document, data, encoding); @@ -126,7 +126,7 @@ RefPtr<DOM::Document> parse_html_document(const StringView& data, const AK::URL& return document; } -HTMLParser::HTMLParser(DOM::Document& document, const StringView& input, const String& encoding) +HTMLParser::HTMLParser(DOM::Document& document, StringView input, const String& encoding) : m_tokenizer(input, encoding) , m_document(document) { @@ -3107,7 +3107,7 @@ DOM::Document& HTMLParser::document() return *m_document; } -NonnullRefPtrVector<DOM::Node> HTMLParser::parse_html_fragment(DOM::Element& context_element, const StringView& markup) +NonnullRefPtrVector<DOM::Node> HTMLParser::parse_html_fragment(DOM::Element& context_element, StringView markup) { auto temp_document = DOM::Document::create(); HTMLParser parser(*temp_document, markup, "utf-8"); @@ -3193,7 +3193,7 @@ String HTMLParser::serialize_html_fragment(DOM::Node const& node) Yes, }; - auto escape_string = [](StringView const& string, AttributeMode attribute_mode) -> String { + auto escape_string = [](StringView string, AttributeMode attribute_mode) -> String { // https://html.spec.whatwg.org/multipage/parsing.html#escapingString StringBuilder builder; for (auto& ch : string) { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h index c30c374e7a..9805e43094 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.h @@ -39,11 +39,11 @@ namespace Web::HTML { __ENUMERATE_INSERTION_MODE(AfterAfterBody) \ __ENUMERATE_INSERTION_MODE(AfterAfterFrameset) -RefPtr<DOM::Document> parse_html_document(const StringView&, const AK::URL&, const String& encoding); +RefPtr<DOM::Document> parse_html_document(StringView, const AK::URL&, const String& encoding); class HTMLParser { public: - HTMLParser(DOM::Document&, const StringView& input, const String& encoding); + HTMLParser(DOM::Document&, StringView input, const String& encoding); ~HTMLParser(); static NonnullOwnPtr<HTMLParser> create_with_uncertain_encoding(DOM::Document&, const ByteBuffer& input); @@ -52,7 +52,7 @@ public: DOM::Document& document(); - static NonnullRefPtrVector<DOM::Node> parse_html_fragment(DOM::Element& context_element, const StringView&); + static NonnullRefPtrVector<DOM::Node> parse_html_fragment(DOM::Element& context_element, StringView); static String serialize_html_fragment(DOM::Node const& node); enum class InsertionMode { diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp index 98d268bab5..737fec0507 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp @@ -2639,7 +2639,7 @@ _StartOfFunction: } } -bool HTMLTokenizer::consume_next_if_match(StringView const& string, CaseSensitivity case_sensitivity) +bool HTMLTokenizer::consume_next_if_match(StringView string, CaseSensitivity case_sensitivity) { for (size_t i = 0; i < string.length(); ++i) { auto code_point = peek_code_point(i); @@ -2678,7 +2678,7 @@ void HTMLTokenizer::create_new_token(HTMLToken::Type type) m_current_token.set_start_position({}, nth_last_position(offset)); } -HTMLTokenizer::HTMLTokenizer(StringView const& input, String const& encoding) +HTMLTokenizer::HTMLTokenizer(StringView input, String const& encoding) { auto* decoder = TextCodec::decoder_for(encoding); VERIFY(decoder); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h index e70e97398e..23c14cba6e 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h @@ -100,7 +100,7 @@ namespace Web::HTML { class HTMLTokenizer { public: - explicit HTMLTokenizer(StringView const& input, String const& encoding); + explicit HTMLTokenizer(StringView input, String const& encoding); enum class State { #define __ENUMERATE_TOKENIZER_STATE(state) state, @@ -125,7 +125,7 @@ private: void skip(size_t count); Optional<u32> next_code_point(); Optional<u32> peek_code_point(size_t offset) const; - bool consume_next_if_match(StringView const&, CaseSensitivity = CaseSensitivity::CaseSensitive); + bool consume_next_if_match(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive); void create_new_token(HTMLToken::Type); bool current_end_tag_token_is_appropriate() const; String consume_current_builder(); diff --git a/Userland/Libraries/LibWeb/InProcessWebView.cpp b/Userland/Libraries/LibWeb/InProcessWebView.cpp index 02db62aa31..7fa34ca567 100644 --- a/Userland/Libraries/LibWeb/InProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/InProcessWebView.cpp @@ -295,7 +295,7 @@ void InProcessWebView::reload() load(url()); } -void InProcessWebView::load_html(const StringView& html, const AK::URL& url) +void InProcessWebView::load_html(StringView html, const AK::URL& url) { page().top_level_browsing_context().loader().load_html(html, url); } diff --git a/Userland/Libraries/LibWeb/InProcessWebView.h b/Userland/Libraries/LibWeb/InProcessWebView.h index 3cb56133ef..b51a384e2c 100644 --- a/Userland/Libraries/LibWeb/InProcessWebView.h +++ b/Userland/Libraries/LibWeb/InProcessWebView.h @@ -24,7 +24,7 @@ class InProcessWebView final public: virtual ~InProcessWebView() override; - void load_html(const StringView&, const AK::URL&); + void load_html(StringView, const AK::URL&); void load_empty_document(); DOM::Document* document(); diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp index e2aec8e005..2fd2ebdccc 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp @@ -26,7 +26,7 @@ TextNode::~TextNode() { } -static bool is_all_whitespace(const StringView& string) +static bool is_all_whitespace(StringView string) { for (size_t i = 0; i < string.length(); ++i) { if (!is_ascii_space(string[i])) @@ -313,7 +313,7 @@ void TextNode::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint& positi verify_cast<Label>(*parent()).handle_mousemove_on_label({}, position, button); } -TextNode::ChunkIterator::ChunkIterator(StringView const& text, LayoutMode layout_mode, bool wrap_lines, bool respect_linebreaks) +TextNode::ChunkIterator::ChunkIterator(StringView text, LayoutMode layout_mode, bool wrap_lines, bool respect_linebreaks) : m_layout_mode(layout_mode) , m_wrap_lines(wrap_lines) , m_respect_linebreaks(respect_linebreaks) diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.h b/Userland/Libraries/LibWeb/Layout/TextNode.h index fe561fba58..82fb9a0441 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.h +++ b/Userland/Libraries/LibWeb/Layout/TextNode.h @@ -37,7 +37,7 @@ public: class ChunkIterator { public: - ChunkIterator(StringView const& text, LayoutMode, bool wrap_lines, bool respect_linebreaks); + ChunkIterator(StringView text, LayoutMode, bool wrap_lines, bool respect_linebreaks); Optional<Chunk> next(); private: diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 5eb2d9481b..50d9d8075b 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -210,7 +210,7 @@ bool FrameLoader::load(const AK::URL& url, Type type) return load(request, type); } -void FrameLoader::load_html(const StringView& html, const AK::URL& url) +void FrameLoader::load_html(StringView html, const AK::URL& url) { auto document = DOM::Document::create(url); HTML::HTMLParser parser(document, html, "utf-8"); diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.h b/Userland/Libraries/LibWeb/Loader/FrameLoader.h index 7e87e93a81..277e5a9ab4 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.h +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.h @@ -29,7 +29,7 @@ public: bool load(const AK::URL&, Type); bool load(LoadRequest&, Type); - void load_html(const StringView&, const AK::URL&); + void load_html(StringView, const AK::URL&); BrowsingContext& browsing_context() { return m_browsing_context; } const BrowsingContext& browsing_context() const { return m_browsing_context; } diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp index a5b7ccf693..dbdbbc6249 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp @@ -80,7 +80,7 @@ void OutOfProcessWebView::load(const AK::URL& url) client().async_load_url(url); } -void OutOfProcessWebView::load_html(const StringView& html, const AK::URL& url) +void OutOfProcessWebView::load_html(StringView html, const AK::URL& url) { m_url = url; client().async_load_html(html, url); diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.h b/Userland/Libraries/LibWeb/OutOfProcessWebView.h index 6acdbfce56..e788f37d14 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.h @@ -27,7 +27,7 @@ public: AK::URL url() const { return m_url; } void load(const AK::URL&); - void load_html(const StringView&, const AK::URL&); + void load_html(StringView, const AK::URL&); void load_empty_document(); void debug_request(const String& request, const String& argument = {}); diff --git a/Userland/Libraries/LibWeb/Page/Page.cpp b/Userland/Libraries/LibWeb/Page/Page.cpp index aa9e1be847..3557a7c078 100644 --- a/Userland/Libraries/LibWeb/Page/Page.cpp +++ b/Userland/Libraries/LibWeb/Page/Page.cpp @@ -41,7 +41,7 @@ void Page::load(LoadRequest& request) top_level_browsing_context().loader().load(request, FrameLoader::Type::Navigation); } -void Page::load_html(const StringView& html, const AK::URL& url) +void Page::load_html(StringView html, const AK::URL& url) { top_level_browsing_context().loader().load_html(html, url); } diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h index 4af4be19bc..4b5e007204 100644 --- a/Userland/Libraries/LibWeb/Page/Page.h +++ b/Userland/Libraries/LibWeb/Page/Page.h @@ -45,7 +45,7 @@ public: void load(const AK::URL&); void load(LoadRequest&); - void load_html(const StringView&, const AK::URL&); + 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); diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp index fc96c83e1a..5b7e29aa4f 100644 --- a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp +++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp @@ -25,7 +25,7 @@ String url_encode(const Vector<QueryParam>& pairs, AK::URL::PercentEncodeSet per return builder.to_string(); } -Vector<QueryParam> url_decode(StringView const& input) +Vector<QueryParam> url_decode(StringView input) { // 1. Let sequences be the result of splitting input on 0x26 (&). auto sequences = input.split_view('&'); diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.h b/Userland/Libraries/LibWeb/URL/URLSearchParams.h index 0adb6c2db3..94b07509e9 100644 --- a/Userland/Libraries/LibWeb/URL/URLSearchParams.h +++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.h @@ -18,7 +18,7 @@ struct QueryParam { String value; }; String url_encode(const Vector<QueryParam>&, AK::URL::PercentEncodeSet); -Vector<QueryParam> url_decode(StringView const&); +Vector<QueryParam> url_decode(StringView); class URLSearchParams : public Bindings::Wrappable , public RefCounted<URLSearchParams> { |