mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 16:28:54 +00:00
Everywhere: Change west consts caught by clang-format-21 to east consts
This commit is contained in:
parent
829437c11d
commit
b17783bb10
Notes:
github-actions[bot]
2025-08-29 17:20:11 +00:00
Author: https://github.com/Lubrsi
Commit: b17783bb10
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6023
Reviewed-by: https://github.com/tcl3 ✅
49 changed files with 80 additions and 80 deletions
|
@ -138,7 +138,7 @@ ErrorOr<void> ConfigFile::reparse()
|
|||
return {};
|
||||
}
|
||||
|
||||
Optional<ByteString> ConfigFile::read_entry_optional(const AK::ByteString& group, const AK::ByteString& key) const
|
||||
Optional<ByteString> ConfigFile::read_entry_optional(AK::ByteString const& group, AK::ByteString const& key) const
|
||||
{
|
||||
if (!has_key(group, key))
|
||||
return {};
|
||||
|
|
|
@ -150,7 +150,7 @@ private:
|
|||
|
||||
template<>
|
||||
struct AK::Traits<JS::TransitionKey> : public DefaultTraits<JS::TransitionKey> {
|
||||
static unsigned hash(const JS::TransitionKey& key)
|
||||
static unsigned hash(JS::TransitionKey const& key)
|
||||
{
|
||||
return pair_int_hash(key.attributes.bits(), Traits<JS::PropertyKey>::hash(key.property_key));
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void RequestClient::certificate_requested(i32 request_id)
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<WebSocket> RequestClient::websocket_connect(const URL::URL& url, ByteString const& origin, Vector<ByteString> const& protocols, Vector<ByteString> const& extensions, HTTP::HeaderMap const& request_headers)
|
||||
RefPtr<WebSocket> RequestClient::websocket_connect(URL::URL const& url, ByteString const& origin, Vector<ByteString> const& protocols, Vector<ByteString> const& extensions, HTTP::HeaderMap const& request_headers)
|
||||
{
|
||||
auto websocket_id = m_next_websocket_id++;
|
||||
IPCProxy::async_websocket_connect(websocket_id, url, origin, protocols, extensions, request_headers);
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
RefPtr<Request> start_request(ByteString const& method, URL::URL const&, HTTP::HeaderMap const& request_headers = {}, ReadonlyBytes request_body = {}, Core::ProxyData const& = {});
|
||||
|
||||
RefPtr<WebSocket> websocket_connect(const URL::URL&, ByteString const& origin = {}, Vector<ByteString> const& protocols = {}, Vector<ByteString> const& extensions = {}, HTTP::HeaderMap const& request_headers = {});
|
||||
RefPtr<WebSocket> websocket_connect(URL::URL const&, ByteString const& origin = {}, Vector<ByteString> const& protocols = {}, Vector<ByteString> const& extensions = {}, HTTP::HeaderMap const& request_headers = {});
|
||||
|
||||
void ensure_connection(URL::URL const&, ::RequestServer::CacheLevel);
|
||||
|
||||
|
|
|
@ -546,8 +546,8 @@ public:
|
|||
CSS::ShapeRendering shape_rendering() const { return m_noninherited.shape_rendering; }
|
||||
|
||||
CSS::LengthBox const& inset() const { return m_noninherited.inset; }
|
||||
const CSS::LengthBox& margin() const { return m_noninherited.margin; }
|
||||
const CSS::LengthBox& padding() const { return m_noninherited.padding; }
|
||||
CSS::LengthBox const& margin() const { return m_noninherited.margin; }
|
||||
CSS::LengthBox const& padding() const { return m_noninherited.padding; }
|
||||
|
||||
BorderData const& border_left() const { return m_noninherited.border_left; }
|
||||
BorderData const& border_top() const { return m_noninherited.border_top; }
|
||||
|
@ -555,10 +555,10 @@ public:
|
|||
BorderData const& border_bottom() const { return m_noninherited.border_bottom; }
|
||||
|
||||
bool has_noninitial_border_radii() const { return m_noninherited.has_noninitial_border_radii; }
|
||||
const CSS::BorderRadiusData& border_bottom_left_radius() const { return m_noninherited.border_bottom_left_radius; }
|
||||
const CSS::BorderRadiusData& border_bottom_right_radius() const { return m_noninherited.border_bottom_right_radius; }
|
||||
const CSS::BorderRadiusData& border_top_left_radius() const { return m_noninherited.border_top_left_radius; }
|
||||
const CSS::BorderRadiusData& border_top_right_radius() const { return m_noninherited.border_top_right_radius; }
|
||||
CSS::BorderRadiusData const& border_bottom_left_radius() const { return m_noninherited.border_bottom_left_radius; }
|
||||
CSS::BorderRadiusData const& border_bottom_right_radius() const { return m_noninherited.border_bottom_right_radius; }
|
||||
CSS::BorderRadiusData const& border_top_left_radius() const { return m_noninherited.border_top_left_radius; }
|
||||
CSS::BorderRadiusData const& border_top_right_radius() const { return m_noninherited.border_top_right_radius; }
|
||||
|
||||
CSS::Overflow overflow_x() const { return m_noninherited.overflow_x; }
|
||||
CSS::Overflow overflow_y() const { return m_noninherited.overflow_y; }
|
||||
|
@ -921,8 +921,8 @@ public:
|
|||
void set_min_height(CSS::Size const& height) { m_noninherited.min_height = height; }
|
||||
void set_max_height(CSS::Size const& height) { m_noninherited.max_height = height; }
|
||||
void set_inset(CSS::LengthBox const& inset) { m_noninherited.inset = inset; }
|
||||
void set_margin(const CSS::LengthBox& margin) { m_noninherited.margin = margin; }
|
||||
void set_padding(const CSS::LengthBox& padding) { m_noninherited.padding = padding; }
|
||||
void set_margin(CSS::LengthBox const& margin) { m_noninherited.margin = margin; }
|
||||
void set_padding(CSS::LengthBox const& padding) { m_noninherited.padding = padding; }
|
||||
void set_overflow_x(CSS::Overflow value) { m_noninherited.overflow_x = value; }
|
||||
void set_overflow_y(CSS::Overflow value) { m_noninherited.overflow_y = value; }
|
||||
void set_list_style_type(CSS::ListStyleType value) { m_inherited.list_style_type = value; }
|
||||
|
|
|
@ -58,7 +58,7 @@ SameSite same_site_from_string(StringView same_site_mode)
|
|||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-15.html#section-5.1.2
|
||||
Optional<String> canonicalize_domain(const URL::URL& url)
|
||||
Optional<String> canonicalize_domain(URL::URL const& url)
|
||||
{
|
||||
if (!url.host().has_value())
|
||||
return {};
|
||||
|
|
|
@ -48,7 +48,7 @@ struct WEB_API Cookie {
|
|||
WEB_API StringView same_site_to_string(SameSite same_site_mode);
|
||||
WEB_API SameSite same_site_from_string(StringView same_site_mode);
|
||||
|
||||
WEB_API Optional<String> canonicalize_domain(const URL::URL& url);
|
||||
WEB_API Optional<String> canonicalize_domain(URL::URL const& url);
|
||||
WEB_API bool path_matches(StringView request_path, StringView cookie_path);
|
||||
|
||||
}
|
||||
|
|
|
@ -458,7 +458,7 @@ GC::Ref<Document> Document::create_for_fragment_parsing(JS::Realm& realm)
|
|||
return realm.create<Document>(realm, URL::about_blank(), TemporaryDocumentForFragmentParsing::Yes);
|
||||
}
|
||||
|
||||
Document::Document(JS::Realm& realm, const URL::URL& url, TemporaryDocumentForFragmentParsing temporary_document_for_fragment_parsing)
|
||||
Document::Document(JS::Realm& realm, URL::URL const& url, TemporaryDocumentForFragmentParsing temporary_document_for_fragment_parsing)
|
||||
: ParentNode(realm, *this, NodeType::DOCUMENT_NODE)
|
||||
, m_page(Bindings::principal_host_defined_page(realm))
|
||||
, m_style_computer(realm.heap().allocate<CSS::StyleComputer>(*this))
|
||||
|
|
|
@ -246,7 +246,7 @@ public:
|
|||
Optional<String> encoding_parse_and_serialize_url(StringView) const;
|
||||
|
||||
CSS::StyleComputer& style_computer() { return *m_style_computer; }
|
||||
const CSS::StyleComputer& style_computer() const { return *m_style_computer; }
|
||||
CSS::StyleComputer const& style_computer() const { return *m_style_computer; }
|
||||
|
||||
CSS::StyleSheetList& style_sheets();
|
||||
CSS::StyleSheetList const& style_sheets() const;
|
||||
|
|
|
@ -3398,7 +3398,7 @@ i32 Element::ordinal_value()
|
|||
auto reversed = false;
|
||||
|
||||
if (owner->is_html_olist_element()) {
|
||||
auto const* ol_element = static_cast<const HTML::HTMLOListElement*>(owner);
|
||||
auto const* ol_element = static_cast<HTML::HTMLOListElement const*>(owner);
|
||||
numbering = ol_element->starting_value().value();
|
||||
reversed = ol_element->has_attribute(HTML::AttributeNames::reversed);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ String Node::base_uri() const
|
|||
return document().base_url().to_string();
|
||||
}
|
||||
|
||||
const HTML::HTMLAnchorElement* Node::enclosing_link_element() const
|
||||
HTML::HTMLAnchorElement const* Node::enclosing_link_element() const
|
||||
{
|
||||
for (auto* node = this; node; node = node->parent()) {
|
||||
auto const* anchor_element = as_if<HTML::HTMLAnchorElement>(*node);
|
||||
|
@ -145,12 +145,12 @@ const HTML::HTMLAnchorElement* Node::enclosing_link_element() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const HTML::HTMLElement* Node::enclosing_html_element() const
|
||||
HTML::HTMLElement const* Node::enclosing_html_element() const
|
||||
{
|
||||
return first_ancestor_of_type<HTML::HTMLElement>();
|
||||
}
|
||||
|
||||
const HTML::HTMLElement* Node::enclosing_html_element_with_attribute(FlyString const& attribute) const
|
||||
HTML::HTMLElement const* Node::enclosing_html_element_with_attribute(FlyString const& attribute) const
|
||||
{
|
||||
for (auto* node = this; node; node = node->parent()) {
|
||||
if (auto* html_element = as_if<HTML::HTMLElement>(*node); html_element && html_element->has_attribute(attribute))
|
||||
|
|
|
@ -291,9 +291,9 @@ public:
|
|||
|
||||
GC::Ptr<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(FlyString const&) const;
|
||||
HTML::HTMLAnchorElement const* enclosing_link_element() const;
|
||||
HTML::HTMLElement const* enclosing_html_element() const;
|
||||
HTML::HTMLElement const* enclosing_html_element_with_attribute(FlyString const&) const;
|
||||
|
||||
Utf16String child_text_content() const;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Web::DOM {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(ParentNode);
|
||||
|
||||
static bool contains_named_namespace(const CSS::SelectorList& selectors)
|
||||
static bool contains_named_namespace(CSS::SelectorList const& selectors)
|
||||
{
|
||||
for (auto const& selector : selectors) {
|
||||
for (auto const& compound_selector : selector->compound_selectors()) {
|
||||
|
|
|
@ -467,13 +467,13 @@ Optional<URL::URL> parse(StringView input, Optional<URL::URL const&> base_url, O
|
|||
if (blob_url_entry.has_value()) {
|
||||
url->set_blob_url_entry(URL::BlobURLEntry {
|
||||
.object = blob_url_entry->object.visit(
|
||||
[](const GC::Root<FileAPI::Blob>& blob) -> URL::BlobURLEntry::Object {
|
||||
[](GC::Root<FileAPI::Blob> const& blob) -> URL::BlobURLEntry::Object {
|
||||
return URL::BlobURLEntry::Blob {
|
||||
.type = blob->type(),
|
||||
.data = MUST(ByteBuffer::copy(blob->raw_bytes())),
|
||||
};
|
||||
},
|
||||
[](const GC::Root<MediaSourceExtensions::MediaSource>&) -> URL::BlobURLEntry::Object { return URL::BlobURLEntry::MediaSource {}; }),
|
||||
[](GC::Root<MediaSourceExtensions::MediaSource> const&) -> URL::BlobURLEntry::Object { return URL::BlobURLEntry::MediaSource {}; }),
|
||||
.environment { .origin = blob_url_entry->environment->origin() },
|
||||
});
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ GC::Ref<WebIDL::Promise> Blob::text()
|
|||
return WebIDL::upon_fulfillment(*promise, GC::create_function(heap(), [&vm](JS::Value first_argument) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
auto const& object = first_argument.as_object();
|
||||
VERIFY(is<JS::ArrayBuffer>(object));
|
||||
auto const& buffer = static_cast<const JS::ArrayBuffer&>(object).buffer();
|
||||
auto const& buffer = static_cast<JS::ArrayBuffer const&>(object).buffer();
|
||||
|
||||
auto decoder = TextCodec::decoder_for("UTF-8"sv);
|
||||
auto utf8_text = TRY_OR_THROW_OOM(vm, TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, buffer));
|
||||
|
@ -415,7 +415,7 @@ GC::Ref<WebIDL::Promise> Blob::array_buffer()
|
|||
return WebIDL::upon_fulfillment(*promise, GC::create_function(heap(), [&realm](JS::Value first_argument) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
auto const& object = first_argument.as_object();
|
||||
VERIFY(is<JS::ArrayBuffer>(object));
|
||||
auto const& buffer = static_cast<const JS::ArrayBuffer&>(object).buffer();
|
||||
auto const& buffer = static_cast<JS::ArrayBuffer const&>(object).buffer();
|
||||
|
||||
return JS::ArrayBuffer::create(realm, buffer);
|
||||
}));
|
||||
|
|
|
@ -510,7 +510,7 @@ void HTMLDialogElement::invoker_command_steps(DOM::Element& invoker, String& com
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interactive-elements.html#nearest-clicked-dialog
|
||||
GC::Ptr<HTMLDialogElement> HTMLDialogElement::nearest_clicked_dialog(UIEvents::PointerEvent const& event, const GC::Ptr<DOM::Node> target)
|
||||
GC::Ptr<HTMLDialogElement> HTMLDialogElement::nearest_clicked_dialog(UIEvents::PointerEvent const& event, GC::Ptr<DOM::Node> const target)
|
||||
{
|
||||
// To find the nearest clicked dialog, given a PointerEvent event:
|
||||
|
||||
|
@ -542,7 +542,7 @@ GC::Ptr<HTMLDialogElement> HTMLDialogElement::nearest_clicked_dialog(UIEvents::P
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interactive-elements.html#light-dismiss-open-dialogs
|
||||
void HTMLDialogElement::light_dismiss_open_dialogs(UIEvents::PointerEvent const& event, const GC::Ptr<DOM::Node> target)
|
||||
void HTMLDialogElement::light_dismiss_open_dialogs(UIEvents::PointerEvent const& event, GC::Ptr<DOM::Node> const target)
|
||||
{
|
||||
// To light dismiss open dialogs, given a PointerEvent event:
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ JS::Uint8ClampedArray* ImageData::data()
|
|||
return m_data;
|
||||
}
|
||||
|
||||
const JS::Uint8ClampedArray* ImageData::data() const
|
||||
JS::Uint8ClampedArray const* ImageData::data() const
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
Gfx::Bitmap const& bitmap() const { return *m_bitmap; }
|
||||
|
||||
JS::Uint8ClampedArray* data();
|
||||
const JS::Uint8ClampedArray* data() const;
|
||||
JS::Uint8ClampedArray const* data() const;
|
||||
|
||||
Bindings::PredefinedColorSpace color_space() const { return m_color_space; }
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable(GC::Ptr
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#concept-bcc-content-document
|
||||
const DOM::Document* NavigableContainer::content_document() const
|
||||
DOM::Document const* NavigableContainer::content_document() const
|
||||
{
|
||||
// 1. If container's content navigable is null, then return null.
|
||||
if (m_content_navigable == nullptr)
|
||||
|
@ -175,7 +175,7 @@ DOM::Document const* NavigableContainer::content_document_without_origin_check()
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content-other.html#dom-media-getsvgdocument
|
||||
const DOM::Document* NavigableContainer::get_svg_document() const
|
||||
DOM::Document const* NavigableContainer::get_svg_document() const
|
||||
{
|
||||
// 1. Let document be this element's content document.
|
||||
auto const* document = content_document();
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
GC::Ptr<Navigable> content_navigable() { return m_content_navigable; }
|
||||
GC::Ptr<Navigable const> content_navigable() const { return m_content_navigable.ptr(); }
|
||||
|
||||
const DOM::Document* content_document() const;
|
||||
DOM::Document const* content_document() const;
|
||||
DOM::Document const* content_document_without_origin_check() const;
|
||||
|
||||
HTML::WindowProxy* content_window();
|
||||
|
|
|
@ -260,7 +260,7 @@ void HTMLParser::run(HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point
|
|||
flush_character_insertions();
|
||||
}
|
||||
|
||||
void HTMLParser::run(const URL::URL& url, HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point)
|
||||
void HTMLParser::run(URL::URL const& url, HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point)
|
||||
{
|
||||
m_document->set_url(url);
|
||||
m_document->set_source(m_tokenizer.source());
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
static GC::Ref<HTMLParser> create(DOM::Document&, StringView input, StringView encoding);
|
||||
|
||||
void run(HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
|
||||
void run(const URL::URL&, HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
|
||||
void run(URL::URL const&, HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
|
||||
|
||||
static void the_end(GC::Ref<DOM::Document>, GC::Ptr<HTMLParser> = nullptr);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ void ListOfActiveFormattingElements::add_marker()
|
|||
m_entries.append({ nullptr });
|
||||
}
|
||||
|
||||
bool ListOfActiveFormattingElements::contains(const DOM::Element& element) const
|
||||
bool ListOfActiveFormattingElements::contains(DOM::Element const& element) const
|
||||
{
|
||||
for (auto& entry : m_entries) {
|
||||
if (entry.element.ptr() == &element)
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
};
|
||||
|
||||
bool is_empty() const { return m_entries.is_empty(); }
|
||||
bool contains(const DOM::Element&) const;
|
||||
bool contains(DOM::Element const&) const;
|
||||
|
||||
void add(DOM::Element& element);
|
||||
void add_marker();
|
||||
|
|
|
@ -36,7 +36,7 @@ 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, Vector<FlyString> const& list) const
|
||||
bool StackOfOpenElements::has_in_scope_impl(DOM::Element const& target_node, Vector<FlyString> const& list) const
|
||||
{
|
||||
for (auto& element : m_elements.in_reverse()) {
|
||||
if (element.ptr() == &target_node)
|
||||
|
@ -47,7 +47,7 @@ bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vec
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_scope(const DOM::Element& target_node) const
|
||||
bool StackOfOpenElements::has_in_scope(DOM::Element const& target_node) const
|
||||
{
|
||||
return has_in_scope_impl(target_node, s_base_list);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::contains(const DOM::Element& element) const
|
||||
bool StackOfOpenElements::contains(DOM::Element const& element) const
|
||||
{
|
||||
for (auto& element_on_stack : m_elements) {
|
||||
if (&element == element_on_stack.ptr())
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
void replace(DOM::Element const& to_remove, GC::Ref<DOM::Element> to_add);
|
||||
void insert_immediately_below(GC::Ref<DOM::Element> element_to_add, DOM::Element const& target);
|
||||
|
||||
const DOM::Element& current_node() const { return *m_elements.last(); }
|
||||
DOM::Element const& current_node() const { return *m_elements.last(); }
|
||||
DOM::Element& current_node() { return *m_elements.last(); }
|
||||
|
||||
bool has_in_scope(FlyString const& tag_name) const;
|
||||
|
@ -41,9 +41,9 @@ public:
|
|||
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 has_in_scope(DOM::Element const&) const;
|
||||
|
||||
bool contains(const DOM::Element&) const;
|
||||
bool contains(DOM::Element const&) const;
|
||||
[[nodiscard]] bool contains_template_element() const;
|
||||
|
||||
auto const& elements() const { return m_elements; }
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
private:
|
||||
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;
|
||||
bool has_in_scope_impl(DOM::Element const& target_node, Vector<FlyString> const&) const;
|
||||
|
||||
Vector<GC::Ref<DOM::Element>> m_elements;
|
||||
};
|
||||
|
|
|
@ -19,6 +19,6 @@ enum class SameOriginFallbackFlag {
|
|||
Yes,
|
||||
};
|
||||
|
||||
[[nodiscard]] WEB_API GC::Ref<Fetch::Infrastructure::Request> create_potential_CORS_request(JS::VM&, const URL::URL&, Optional<Fetch::Infrastructure::Request::Destination>, CORSSettingAttribute, SameOriginFallbackFlag = SameOriginFallbackFlag::No);
|
||||
[[nodiscard]] WEB_API GC::Ref<Fetch::Infrastructure::Request> create_potential_CORS_request(JS::VM&, URL::URL const&, Optional<Fetch::Infrastructure::Request::Destination>, CORSSettingAttribute, SameOriginFallbackFlag = SameOriginFallbackFlag::No);
|
||||
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ ScriptFetchOptions get_descendant_script_fetch_options(ScriptFetchOptions const&
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#resolving-a-module-integrity-metadata
|
||||
String resolve_a_module_integrity_metadata(const URL::URL& url, EnvironmentSettingsObject& settings_object)
|
||||
String resolve_a_module_integrity_metadata(URL::URL const& url, EnvironmentSettingsObject& settings_object)
|
||||
{
|
||||
// 1. Let map be settingsObject's global object's import map.
|
||||
auto map = as<UniversalGlobalScopeMixin>(settings_object.global_object()).import_map();
|
||||
|
|
|
@ -34,7 +34,7 @@ void TextTrackList::visit_edges(JS::Cell::Visitor& visitor)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#dom-texttracklist-item
|
||||
JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> TextTrackList::internal_get_own_property(const JS::PropertyKey& property_name) const
|
||||
JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> TextTrackList::internal_get_own_property(JS::PropertyKey const& property_name) const
|
||||
{
|
||||
// To determine the value of an indexed property of a TextTrackList object for a given index index, the user
|
||||
// agent must return the indexth text track in the list represented by the TextTrackList object.
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
BreakNode(DOM::Document&, HTML::HTMLBRElement&, GC::Ref<CSS::ComputedProperties>);
|
||||
virtual ~BreakNode() override;
|
||||
|
||||
const HTML::HTMLBRElement& dom_node() const { return as<HTML::HTMLBRElement>(*Node::dom_node()); }
|
||||
HTML::HTMLBRElement const& dom_node() const { return as<HTML::HTMLBRElement>(*Node::dom_node()); }
|
||||
|
||||
private:
|
||||
virtual bool is_break_node() const final { return true; }
|
||||
|
|
|
@ -886,7 +886,7 @@ void FormattingContext::compute_width_for_absolutely_positioned_replaced_element
|
|||
auto margin_right = computed_values.margin().right();
|
||||
auto static_position = m_state.get(box).static_position();
|
||||
|
||||
auto to_px = [&](const CSS::LengthPercentage& l) {
|
||||
auto to_px = [&](CSS::LengthPercentage const& l) {
|
||||
return l.to_px(box, width_of_containing_block);
|
||||
};
|
||||
|
||||
|
@ -1305,7 +1305,7 @@ void FormattingContext::compute_height_for_absolutely_positioned_replaced_elemen
|
|||
auto margin_bottom = computed_values.margin().bottom();
|
||||
auto static_position = m_state.get(box).static_position();
|
||||
|
||||
auto to_px = [&](const CSS::LengthPercentage& l) {
|
||||
auto to_px = [&](CSS::LengthPercentage const& l) {
|
||||
return l.to_px(box, height_of_containing_block);
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
static bool is_inside_associated_label(LabelableNode const&, CSSPixelPoint);
|
||||
static bool is_associated_label_hovered(LabelableNode const&);
|
||||
|
||||
const HTML::HTMLLabelElement& dom_node() const { return static_cast<const HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
|
||||
HTML::HTMLLabelElement const& dom_node() const { return static_cast<HTML::HTMLLabelElement const&>(*BlockContainer::dom_node()); }
|
||||
HTML::HTMLLabelElement& dom_node() { return static_cast<HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
|
||||
|
||||
void handle_mousedown_on_label(Badge<Painting::TextPaintable>, CSSPixelPoint, unsigned button);
|
||||
|
|
|
@ -247,7 +247,7 @@ public:
|
|||
|
||||
Gfx::Font const& first_available_font() const;
|
||||
Vector<CSS::BackgroundLayerData> const& background_layers() const { return computed_values().background_layers(); }
|
||||
const CSS::AbstractImageStyleValue* list_style_image() const { return m_list_style_image; }
|
||||
CSS::AbstractImageStyleValue const* list_style_image() const { return m_list_style_image; }
|
||||
|
||||
GC::Ref<NodeWithStyle> create_anonymous_wrapper() const;
|
||||
|
||||
|
@ -334,7 +334,7 @@ inline Gfx::Font const& Node::font(float scale_factor) const
|
|||
return font.with_size(font.point_size() * scale_factor);
|
||||
}
|
||||
|
||||
inline const CSS::ImmutableComputedValues& Node::computed_values() const
|
||||
inline CSS::ImmutableComputedValues const& Node::computed_values() const
|
||||
{
|
||||
VERIFY(has_style_or_parent_with_style());
|
||||
|
||||
|
|
|
@ -1187,7 +1187,7 @@ bool TableFormattingContext::use_fixed_mode_layout() const
|
|||
return table_box().computed_values().table_layout() == CSS::TableLayout::Fixed && (width.is_length() || width.is_percentage() || width.is_min_content() || width.is_fit_content());
|
||||
}
|
||||
|
||||
bool TableFormattingContext::border_is_less_specific(const CSS::BorderData& a, const CSS::BorderData& b)
|
||||
bool TableFormattingContext::border_is_less_specific(CSS::BorderData const& a, CSS::BorderData const& b)
|
||||
{
|
||||
// Implements criteria for steps 1, 2 and 3 of border conflict resolution algorithm, as described in
|
||||
// https://www.w3.org/TR/CSS22/tables.html#border-conflict-resolution.
|
||||
|
@ -1236,7 +1236,7 @@ bool TableFormattingContext::border_is_less_specific(const CSS::BorderData& a, c
|
|||
return false;
|
||||
}
|
||||
|
||||
const CSS::BorderData& TableFormattingContext::border_data_conflicting_edge(TableFormattingContext::ConflictingEdge const& conflicting_edge)
|
||||
CSS::BorderData const& TableFormattingContext::border_data_conflicting_edge(TableFormattingContext::ConflictingEdge const& conflicting_edge)
|
||||
{
|
||||
auto const& style = conflicting_edge.element->computed_values();
|
||||
switch (conflicting_edge.side) {
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
return as<TableWrapper>(*table_box().containing_block());
|
||||
}
|
||||
|
||||
static bool border_is_less_specific(const CSS::BorderData& a, const CSS::BorderData& b);
|
||||
static bool border_is_less_specific(CSS::BorderData const& a, CSS::BorderData const& b);
|
||||
|
||||
virtual void parent_context_did_dimension_child_root_box() override;
|
||||
|
||||
|
@ -150,7 +150,7 @@ private:
|
|||
|
||||
static TableFormattingContext::ConflictingEdge const& winning_conflicting_edge(TableFormattingContext::ConflictingEdge const& a, TableFormattingContext::ConflictingEdge const& b);
|
||||
|
||||
static const CSS::BorderData& border_data_conflicting_edge(ConflictingEdge const& conflicting_edge);
|
||||
static CSS::BorderData const& border_data_conflicting_edge(ConflictingEdge const& conflicting_edge);
|
||||
static Painting::PaintableBox::BorderDataWithElementKind const border_data_with_element_kind_from_conflicting_edge(ConflictingEdge const& conflicting_edge);
|
||||
|
||||
class BorderConflictFinder {
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
TextNode(DOM::Document&, DOM::Text&);
|
||||
virtual ~TextNode() override;
|
||||
|
||||
const DOM::Text& dom_node() const { return static_cast<const DOM::Text&>(*Node::dom_node()); }
|
||||
DOM::Text const& dom_node() const { return static_cast<DOM::Text const&>(*Node::dom_node()); }
|
||||
|
||||
Utf16String const& text_for_rendering() const;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
Vector<TextBlock> const& text_blocks();
|
||||
void invalidate_text_blocks_cache() { m_text_blocks.clear(); }
|
||||
|
||||
const DOM::Document& dom_node() const { return static_cast<const DOM::Document&>(*Node::dom_node()); }
|
||||
DOM::Document const& dom_node() const { return static_cast<DOM::Document const&>(*Node::dom_node()); }
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ ContentFilter::ContentFilter() = default;
|
|||
|
||||
ContentFilter::~ContentFilter() = default;
|
||||
|
||||
bool ContentFilter::is_filtered(const URL::URL& url) const
|
||||
bool ContentFilter::is_filtered(URL::URL const& url) const
|
||||
{
|
||||
if (!filtering_enabled())
|
||||
return false;
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
bool filtering_enabled() const { return m_filtering_enabled; }
|
||||
void set_filtering_enabled(bool const enabled) { m_filtering_enabled = enabled; }
|
||||
|
||||
bool is_filtered(const URL::URL&) const;
|
||||
bool is_filtered(URL::URL const&) const;
|
||||
ErrorOr<void> set_patterns(ReadonlySpan<String>);
|
||||
|
||||
private:
|
||||
|
|
|
@ -17,7 +17,7 @@ LoadRequest::LoadRequest()
|
|||
{
|
||||
}
|
||||
|
||||
LoadRequest LoadRequest::create_for_url_on_page(const URL::URL& url, Page* page)
|
||||
LoadRequest LoadRequest::create_for_url_on_page(URL::URL const& url, Page* page)
|
||||
{
|
||||
LoadRequest request;
|
||||
request.set_url(url);
|
||||
|
|
|
@ -21,7 +21,7 @@ class WEB_API LoadRequest {
|
|||
public:
|
||||
LoadRequest();
|
||||
|
||||
static LoadRequest create_for_url_on_page(const URL::URL& url, Page* page);
|
||||
static LoadRequest create_for_url_on_page(URL::URL const& url, Page* page);
|
||||
|
||||
// The main resource is the file being displayed in a frame (unlike subresources like images, scripts, etc.)
|
||||
// If a main resource fails with an HTTP error, we may still display its content if non-empty, e.g a custom 404 page.
|
||||
|
|
|
@ -345,7 +345,7 @@ static void set_user_selection(GC::Ptr<DOM::Node> anchor_node, size_t anchor_off
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interactive-elements.html#run-light-dismiss-activities
|
||||
static void light_dismiss_activities(UIEvents::PointerEvent const& event, const GC::Ptr<DOM::Node> target)
|
||||
static void light_dismiss_activities(UIEvents::PointerEvent const& event, GC::Ptr<DOM::Node> const target)
|
||||
{
|
||||
// To run light dismiss activities, given a PointerEvent event:
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ bool SVGSymbolElement::is_direct_child_of_use_shadow_tree() const
|
|||
return false;
|
||||
}
|
||||
|
||||
auto host = static_cast<const DOM::ShadowRoot&>(*maybe_shadow_root).host();
|
||||
auto host = static_cast<DOM::ShadowRoot const&>(*maybe_shadow_root).host();
|
||||
return is<SVGUseElement>(host);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ struct Formatter<Web::WebIDL::Exception> : Formatter<FormatString> {
|
|||
|
||||
if (value.is_object()) {
|
||||
auto& object = value.as_object();
|
||||
static const JS::PropertyKey message_property_key { "message"_utf16_fly_string };
|
||||
static JS::PropertyKey const message_property_key { "message"_utf16_fly_string };
|
||||
auto has_message_or_error = object.has_own_property(message_property_key);
|
||||
if (!has_message_or_error.is_error() && has_message_or_error.value()) {
|
||||
auto message_object = object.get_without_side_effects(message_property_key);
|
||||
|
|
|
@ -92,7 +92,7 @@ void XMLDocumentBuilder::set_doctype(XML::Doctype doctype)
|
|||
m_document->insert_before(document_type, m_document->first_child(), false);
|
||||
}
|
||||
|
||||
void XMLDocumentBuilder::element_start(const XML::Name& name, OrderedHashMap<XML::Name, ByteString> const& attributes)
|
||||
void XMLDocumentBuilder::element_start(XML::Name const& name, OrderedHashMap<XML::Name, ByteString> const& attributes)
|
||||
{
|
||||
if (m_has_error)
|
||||
return;
|
||||
|
@ -184,7 +184,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, OrderedHashMap<XML
|
|||
m_current_node = node.ptr();
|
||||
}
|
||||
|
||||
void XMLDocumentBuilder::element_end(const XML::Name& name)
|
||||
void XMLDocumentBuilder::element_end(XML::Name const& name)
|
||||
{
|
||||
if (m_has_error)
|
||||
return;
|
||||
|
|
|
@ -87,7 +87,7 @@ CookieJar::~CookieJar()
|
|||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-15.html#section-5.8.3
|
||||
String CookieJar::get_cookie(const URL::URL& url, Web::Cookie::Source source)
|
||||
String CookieJar::get_cookie(URL::URL const& url, Web::Cookie::Source source)
|
||||
{
|
||||
m_transient_storage.purge_expired_cookies();
|
||||
|
||||
|
@ -118,7 +118,7 @@ String CookieJar::get_cookie(const URL::URL& url, Web::Cookie::Source source)
|
|||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
void CookieJar::set_cookie(const URL::URL& url, Web::Cookie::ParsedCookie const& parsed_cookie, Web::Cookie::Source source)
|
||||
void CookieJar::set_cookie(URL::URL const& url, Web::Cookie::ParsedCookie const& parsed_cookie, Web::Cookie::Source source)
|
||||
{
|
||||
auto domain = Web::Cookie::canonicalize_domain(url);
|
||||
if (!domain.has_value())
|
||||
|
@ -233,7 +233,7 @@ void CookieJar::expire_cookies_with_time_offset(AK::Duration offset)
|
|||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-15.html#name-storage-model
|
||||
void CookieJar::store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, const URL::URL& url, String canonicalized_domain, Web::Cookie::Source source)
|
||||
void CookieJar::store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, URL::URL const& url, String canonicalized_domain, Web::Cookie::Source source)
|
||||
{
|
||||
// 1. A user agent MAY ignore a received cookie in its entirety. See Section 5.3.
|
||||
|
||||
|
@ -502,7 +502,7 @@ void CookieJar::store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, con
|
|||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-15.html#section-5.8.3
|
||||
Vector<Web::Cookie::Cookie> CookieJar::get_matching_cookies(const URL::URL& url, StringView canonicalized_domain, Web::Cookie::Source source, MatchingCookiesSpecMode mode)
|
||||
Vector<Web::Cookie::Cookie> CookieJar::get_matching_cookies(URL::URL const& url, StringView canonicalized_domain, Web::Cookie::Source source, MatchingCookiesSpecMode mode)
|
||||
{
|
||||
auto now = UnixDateTime::now();
|
||||
|
||||
|
|
|
@ -87,8 +87,8 @@ public:
|
|||
|
||||
~CookieJar();
|
||||
|
||||
String get_cookie(const URL::URL& url, Web::Cookie::Source source);
|
||||
void set_cookie(const URL::URL& url, Web::Cookie::ParsedCookie const& parsed_cookie, Web::Cookie::Source source);
|
||||
String get_cookie(URL::URL const& url, Web::Cookie::Source source);
|
||||
void set_cookie(URL::URL const& url, Web::Cookie::ParsedCookie const& parsed_cookie, Web::Cookie::Source source);
|
||||
void update_cookie(Web::Cookie::Cookie);
|
||||
void dump_cookies();
|
||||
void clear_all_cookies();
|
||||
|
@ -109,8 +109,8 @@ private:
|
|||
WebDriver,
|
||||
};
|
||||
|
||||
void store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, const URL::URL& url, String canonicalized_domain, Web::Cookie::Source source);
|
||||
Vector<Web::Cookie::Cookie> get_matching_cookies(const URL::URL& url, StringView canonicalized_domain, Web::Cookie::Source source, MatchingCookiesSpecMode mode = MatchingCookiesSpecMode::RFC6265);
|
||||
void store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, URL::URL const& url, String canonicalized_domain, Web::Cookie::Source source);
|
||||
Vector<Web::Cookie::Cookie> get_matching_cookies(URL::URL const& url, StringView canonicalized_domain, Web::Cookie::Source source, MatchingCookiesSpecMode mode = MatchingCookiesSpecMode::RFC6265);
|
||||
|
||||
Optional<PersistedStorage> m_persisted_storage;
|
||||
TransientStorage m_transient_storage;
|
||||
|
|
|
@ -142,7 +142,7 @@ Tab::Tab(BrowserWindow* window, RefPtr<WebView::WebContentClient> parent_client,
|
|||
m_hover_label->hide();
|
||||
};
|
||||
|
||||
view().on_load_start = [this](const URL::URL& url, bool) {
|
||||
view().on_load_start = [this](URL::URL const& url, bool) {
|
||||
auto url_serialized = qstring_from_ak_string(url.serialize());
|
||||
|
||||
m_title = url_serialized;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
WebContentView(QWidget* window, RefPtr<WebView::WebContentClient> parent_client = nullptr, size_t page_index = 0, WebContentViewInitialState initial_state = {});
|
||||
virtual ~WebContentView() override;
|
||||
|
||||
Function<String(const URL::URL&, Web::HTML::ActivateTab)> on_tab_open_request;
|
||||
Function<String(URL::URL const&, Web::HTML::ActivateTab)> on_tab_open_request;
|
||||
|
||||
virtual void paintEvent(QPaintEvent*) override;
|
||||
virtual void resizeEvent(QResizeEvent*) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue