mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
Everywhere: Pass AK::StringView by value
This commit is contained in:
parent
ad5d217e76
commit
8b1108e485
392 changed files with 978 additions and 978 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -17,7 +17,7 @@ struct EntityMatch {
|
|||
StringView entity;
|
||||
};
|
||||
|
||||
Optional<EntityMatch> code_points_from_entity(const StringView&);
|
||||
Optional<EntityMatch> code_points_from_entity(StringView);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = {});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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('&');
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue