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:
Timothy Flynn 2025-05-13 07:06:33 -04:00 committed by Andrew Kaster
commit 7280ed6312
Notes: github-actions[bot] 2025-05-14 08:06:48 +00:00
206 changed files with 448 additions and 0 deletions

View file

@ -44,4 +44,5 @@ void BarProp::initialize(JS::Realm& realm)
WEB_SET_PROTOTYPE_FOR_INTERFACE(BarProp);
Base::initialize(realm);
}
}

View file

@ -27,4 +27,5 @@ public:
private:
virtual void initialize(JS::Realm&) override;
};
}

View file

@ -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);
}
}

View file

@ -1117,4 +1117,5 @@ void CanvasRenderingContext2D::set_filter(String filter)
// 3. If parsedValue is failure, then return.
}
}

View file

@ -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);
}
}

View file

@ -28,4 +28,5 @@ ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
#undef __ENUMERATE
GlobalEventHandlers::~GlobalEventHandlers() = default;
}

View file

@ -80,6 +80,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLAnchorElement>() const { return is_html_anchor_element(); }
}

View file

@ -63,6 +63,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLAreaElement>() const { return is_html_area_element(); }
}

View file

@ -31,6 +31,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLBRElement>() const { return is_html_br_element(); }
}

View file

@ -42,6 +42,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLBaseElement>() const { return is_html_base_element(); }
}

View file

@ -50,6 +50,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLBodyElement>() const { return is_html_body_element(); }
}

View file

@ -102,6 +102,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLButtonElement>() const { return is_html_button_element(); }
}

View file

@ -35,6 +35,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLDivElement>() const { return is_html_div_element(); }
}

View file

@ -238,6 +238,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLElement>() const { return is_html_element(); }
}

View file

@ -30,6 +30,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLEmbedElement>() const { return is_html_embed_element(); }
}

View file

@ -62,6 +62,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLFieldSetElement>() const { return is_html_fieldset_element(); }
}

View file

@ -158,6 +158,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLFormElement>() const { return is_html_form_element(); }
}

View file

@ -41,6 +41,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLFrameSetElement>() const { return is_html_frameset_element(); }
}

View file

@ -27,6 +27,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLHeadElement>() const { return is_html_head_element(); }
}

View file

@ -33,6 +33,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLHtmlElement>() const { return is_html_html_element(); }
}

View file

@ -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(); }
}

View file

@ -164,6 +164,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLImageElement>() const { return is_html_image_element(); }
}

View file

@ -395,6 +395,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLInputElement>() const { return is_html_input_element(); }
}

View file

@ -335,6 +335,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLMediaElement>() const { return is_html_media_element(); }
}

View file

@ -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))));
}
}

View file

@ -102,6 +102,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLObjectElement>() const { return is_html_object_element(); }
}

View file

@ -59,6 +59,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLProgressElement>() const { return is_html_progress_element(); }
}

View file

@ -147,6 +147,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLScriptElement>() const { return is_html_script_element(); }
}

View file

@ -32,6 +32,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLSpanElement>() const { return is_html_span_element(); }
}

View file

@ -41,6 +41,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTableCellElement>() const { return is_html_table_cell_element(); }
}

View file

@ -70,6 +70,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTableElement>() const { return is_html_table_element(); }
}

View file

@ -44,6 +44,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTableRowElement>() const { return is_html_table_row_element(); }
}

View file

@ -46,6 +46,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTableSectionElement>() const { return is_html_table_section_element(); }
}

View file

@ -40,6 +40,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTemplateElement>() const { return is_html_template_element(); }
}

View file

@ -31,6 +31,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTitleElement>() const { return is_html_title_element(); }
}

View file

@ -78,6 +78,8 @@ private:
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::NavigableContainer>() const { return is_navigable_container(); }
}

View file

@ -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));
}
};
}

View file

@ -42,4 +42,5 @@ private:
GC::Ref<SessionHistoryEntry> m_session_history_entry;
};
}

View file

@ -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);
}

View file

@ -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,

View file

@ -18,7 +18,9 @@
# include <LibGC/ForeignCell.h>
namespace Web {
class SpeculativeHTMLParser;
}
#endif

View file

@ -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);
}

View file

@ -444,4 +444,5 @@ void SourceSet::normalize_source_densities(DOM::Element const& element)
}
}
}
}

View file

@ -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);
}