mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
Meta: Enforce newlines around namespaces
This has come up several times during code review, so let's just enforce it using a new clang-format 20 option.
This commit is contained in:
parent
ca9f3673c5
commit
7280ed6312
Notes:
github-actions[bot]
2025-05-14 08:06:48 +00:00
Author: https://github.com/trflynn89
Commit: 7280ed6312
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4715
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/InvalidUsernameException
206 changed files with 448 additions and 0 deletions
|
@ -44,4 +44,5 @@ void BarProp::initialize(JS::Realm& realm)
|
|||
WEB_SET_PROTOTYPE_FOR_INTERFACE(BarProp);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,4 +27,5 @@ public:
|
|||
private:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -89,4 +89,5 @@ WebIDL::ExceptionOr<void> CanvasDrawImage::draw_image(Web::HTML::CanvasImageSour
|
|||
{
|
||||
return draw_image_internal(image, source_x, source_y, source_width, source_height, destination_x, destination_y, destination_width, destination_height);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1117,4 +1117,5 @@ void CanvasRenderingContext2D::set_filter(String filter)
|
|||
|
||||
// 3. If parsedValue is failure, then return.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -314,4 +314,5 @@ void DataTransfer::update_data_transfer_types_list()
|
|||
// 3. Set the DataTransfer object's types array to the result of creating a frozen array from L.
|
||||
m_types = move(types);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,4 +28,5 @@ ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
|
|||
#undef __ENUMERATE
|
||||
|
||||
GlobalEventHandlers::~GlobalEventHandlers() = default;
|
||||
|
||||
}
|
||||
|
|
|
@ -80,6 +80,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLAnchorElement>() const { return is_html_anchor_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -63,6 +63,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLAreaElement>() const { return is_html_area_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLBRElement>() const { return is_html_br_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLBaseElement>() const { return is_html_base_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLBodyElement>() const { return is_html_body_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -102,6 +102,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLButtonElement>() const { return is_html_button_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLDivElement>() const { return is_html_div_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -238,6 +238,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLElement>() const { return is_html_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLEmbedElement>() const { return is_html_embed_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLFieldSetElement>() const { return is_html_fieldset_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -158,6 +158,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLFormElement>() const { return is_html_form_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLFrameSetElement>() const { return is_html_frameset_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLHeadElement>() const { return is_html_head_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLHtmlElement>() const { return is_html_html_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -71,6 +71,8 @@ void run_iframe_load_event_steps(HTML::HTMLIFrameElement&);
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLIFrameElement>() const { return is_html_iframe_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -164,6 +164,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLImageElement>() const { return is_html_image_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -395,6 +395,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLInputElement>() const { return is_html_input_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -335,6 +335,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLMediaElement>() const { return is_html_media_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -240,4 +240,5 @@ void HTMLMeterElement::update_meter_value_element()
|
|||
double position = (value - min) / (max - min) * 100;
|
||||
MUST(m_meter_value_element->style_for_bindings()->set_property(CSS::PropertyID::Width, MUST(String::formatted("{}%", position))));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -102,6 +102,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLObjectElement>() const { return is_html_object_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLProgressElement>() const { return is_html_progress_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -147,6 +147,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLScriptElement>() const { return is_html_script_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLSpanElement>() const { return is_html_span_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTableCellElement>() const { return is_html_table_cell_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -70,6 +70,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTableElement>() const { return is_html_table_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTableRowElement>() const { return is_html_table_row_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTableSectionElement>() const { return is_html_table_section_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTemplateElement>() const { return is_html_template_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTitleElement>() const { return is_html_title_element(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -78,6 +78,8 @@ private:
|
|||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::NavigableContainer>() const { return is_navigable_container(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ private:
|
|||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Formatter<Web::Bindings::NavigationScrollBehavior> : Formatter<StringView> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, Web::Bindings::NavigationScrollBehavior const& value)
|
||||
|
@ -166,4 +167,5 @@ struct Formatter<Web::Bindings::NavigationFocusReset> : Formatter<StringView> {
|
|||
return Formatter<StringView>::format(builder, Web::Bindings::idl_enum_to_string(value));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -42,4 +42,5 @@ private:
|
|||
|
||||
GC::Ref<SessionHistoryEntry> m_session_history_entry;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -111,4 +111,5 @@ struct NonFetchSchemeNavigationParams : JS::Cell {
|
|||
};
|
||||
|
||||
bool check_a_navigation_responses_adherence_to_x_frame_options(GC::Ptr<Fetch::Infrastructure::Response> response, Navigable* navigable, GC::Ref<ContentSecurityPolicy::PolicyList const> csp_list, URL::Origin destination_origin);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
// FIXME: Generate this from the IDL file that just has an enum in it
|
||||
namespace Web::Bindings {
|
||||
|
||||
enum class NavigationType {
|
||||
Push,
|
||||
Replace,
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
# include <LibGC/ForeignCell.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
class SpeculativeHTMLParser;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -102,4 +102,5 @@ void fetch_descendants_of_and_link_a_module_script(JS::Realm&, JavaScriptModuleS
|
|||
Fetch::Infrastructure::Request::Destination fetch_destination_from_module_type(Fetch::Infrastructure::Request::Destination, ByteString const&);
|
||||
|
||||
void fetch_single_module_script(JS::Realm&, URL::URL const&, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination, ScriptFetchOptions const&, JS::Realm& module_map_realm, Web::Fetch::Infrastructure::Request::ReferrerType const&, Optional<JS::ModuleRequest> const&, TopLevelModule, PerformTheFetchHook, OnFetchScriptComplete callback);
|
||||
|
||||
}
|
||||
|
|
|
@ -444,4 +444,5 @@ void SourceSet::normalize_source_densities(DOM::Element const& element)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,4 +34,5 @@ enum class RequireWellFormed {
|
|||
};
|
||||
|
||||
WebIDL::ExceptionOr<String> serialize_node_to_xml_string(GC::Ref<DOM::Node const> root, RequireWellFormed require_well_formed);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue