mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files: clang-format-19 -i $(find . \ -not \( -path "./\.*" -prune \) \ -not \( -path "./Build/*" -prune \) \ -not \( -path "./Toolchain/*" -prune \) \ -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
This commit is contained in:
parent
66732d2203
commit
27478ec7d4
Notes:
github-actions[bot]
2024-12-28 13:40:37 +00:00
Author: https://github.com/trflynn89
Commit: 27478ec7d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3067
57 changed files with 160 additions and 140 deletions
|
@ -42,7 +42,7 @@ public:
|
||||||
Node()
|
Node()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~Node() {};
|
virtual ~Node() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -94,8 +94,8 @@ public:
|
||||||
~Result() = default;
|
~Result() = default;
|
||||||
|
|
||||||
// For compatibility with TRY().
|
// For compatibility with TRY().
|
||||||
void value() {};
|
void value() { }
|
||||||
void release_value() {};
|
void release_value() { }
|
||||||
|
|
||||||
ErrorType& error()
|
ErrorType& error()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,9 @@ public:
|
||||||
CanonicalCode() = default;
|
CanonicalCode() = default;
|
||||||
CanonicalCode(Vector<size_t> codes, Vector<size_t> values)
|
CanonicalCode(Vector<size_t> codes, Vector<size_t> values)
|
||||||
: m_symbol_codes(move(codes))
|
: m_symbol_codes(move(codes))
|
||||||
, m_symbol_values(move(values)) {};
|
, m_symbol_values(move(values))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static ErrorOr<CanonicalCode> read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
static ErrorOr<CanonicalCode> read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
||||||
static ErrorOr<CanonicalCode> read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
static ErrorOr<CanonicalCode> read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
||||||
|
|
|
@ -64,9 +64,9 @@ SkTypeface const* TypefaceSkia::sk_typeface() const
|
||||||
TypefaceSkia::TypefaceSkia(NonnullOwnPtr<Impl> impl, ReadonlyBytes buffer, int ttc_index)
|
TypefaceSkia::TypefaceSkia(NonnullOwnPtr<Impl> impl, ReadonlyBytes buffer, int ttc_index)
|
||||||
: m_impl(move(impl))
|
: m_impl(move(impl))
|
||||||
, m_buffer(buffer)
|
, m_buffer(buffer)
|
||||||
, m_ttc_index(ttc_index) {
|
, m_ttc_index(ttc_index)
|
||||||
|
{
|
||||||
};
|
}
|
||||||
|
|
||||||
u32 TypefaceSkia::glyph_count() const
|
u32 TypefaceSkia::glyph_count() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void fill_main_tags() const {};
|
virtual void fill_main_tags() const { }
|
||||||
|
|
||||||
mutable HashMap<StringView, String> m_main_tags;
|
mutable HashMap<StringView, String> m_main_tags;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
virtual size_t width() const = 0;
|
virtual size_t width() const = 0;
|
||||||
virtual size_t height() const = 0;
|
virtual size_t height() const = 0;
|
||||||
|
|
||||||
virtual ~MetalTexture() {};
|
virtual ~MetalTexture() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MetalContext : public RefCounted<MetalContext> {
|
class MetalContext : public RefCounted<MetalContext> {
|
||||||
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
virtual OwnPtr<MetalTexture> create_texture_from_iosurface(Core::IOSurfaceHandle const&) = 0;
|
virtual OwnPtr<MetalTexture> create_texture_from_iosurface(Core::IOSurfaceHandle const&) = 0;
|
||||||
|
|
||||||
virtual ~MetalContext() {};
|
virtual ~MetalContext() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
RefPtr<MetalContext> get_metal_context();
|
RefPtr<MetalContext> get_metal_context();
|
||||||
|
|
|
@ -37,10 +37,10 @@ public:
|
||||||
static RefPtr<Gfx::SkiaBackendContext> create_metal_context(MetalContext&);
|
static RefPtr<Gfx::SkiaBackendContext> create_metal_context(MetalContext&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SkiaBackendContext() {};
|
SkiaBackendContext() { }
|
||||||
virtual ~SkiaBackendContext() {};
|
virtual ~SkiaBackendContext() { }
|
||||||
|
|
||||||
virtual void flush_and_submit(SkSurface*) {};
|
virtual void flush_and_submit(SkSurface*) { }
|
||||||
virtual GrDirectContext* sk_context() const = 0;
|
virtual GrDirectContext* sk_context() const = 0;
|
||||||
|
|
||||||
virtual MetalContext& metal_context() = 0;
|
virtual MetalContext& metal_context() = 0;
|
||||||
|
|
|
@ -719,7 +719,7 @@ public:
|
||||||
virtual bool has_name() const = 0;
|
virtual bool has_name() const = 0;
|
||||||
virtual Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const = 0;
|
virtual Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const = 0;
|
||||||
|
|
||||||
virtual ~FunctionNode() {};
|
virtual ~FunctionNode() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FunctionNode(RefPtr<Identifier const> name, ByteString source_text, NonnullRefPtr<Statement const> body, Vector<FunctionParameter> parameters, i32 function_length, FunctionKind kind, bool is_strict_mode, FunctionParsingInsights parsing_insights, bool is_arrow_function, Vector<DeprecatedFlyString> local_variables_names)
|
FunctionNode(RefPtr<Identifier const> name, ByteString source_text, NonnullRefPtr<Statement const> body, Vector<FunctionParameter> parameters, i32 function_length, FunctionKind kind, bool is_strict_mode, FunctionParsingInsights parsing_insights, bool is_arrow_function, Vector<DeprecatedFlyString> local_variables_names)
|
||||||
|
@ -779,7 +779,7 @@ public:
|
||||||
bool has_name() const override { return true; }
|
bool has_name() const override { return true; }
|
||||||
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString) const override { VERIFY_NOT_REACHED(); }
|
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString) const override { VERIFY_NOT_REACHED(); }
|
||||||
|
|
||||||
virtual ~FunctionDeclaration() {};
|
virtual ~FunctionDeclaration() { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_hoisted { false };
|
bool m_is_hoisted { false };
|
||||||
|
@ -806,7 +806,7 @@ public:
|
||||||
|
|
||||||
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const override;
|
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const override;
|
||||||
|
|
||||||
virtual ~FunctionExpression() {};
|
virtual ~FunctionExpression() { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool is_function_expression() const override { return true; }
|
virtual bool is_function_expression() const override { return true; }
|
||||||
|
|
|
@ -48,7 +48,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit IndexedPropertyStorage(IsSimpleStorage is_simple_storage)
|
explicit IndexedPropertyStorage(IsSimpleStorage is_simple_storage)
|
||||||
: m_is_simple_storage(is_simple_storage == IsSimpleStorage::Yes) {};
|
: m_is_simple_storage(is_simple_storage == IsSimpleStorage::Yes)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_simple_storage { false };
|
bool m_is_simple_storage { false };
|
||||||
|
@ -57,7 +59,9 @@ private:
|
||||||
class SimpleIndexedPropertyStorage final : public IndexedPropertyStorage {
|
class SimpleIndexedPropertyStorage final : public IndexedPropertyStorage {
|
||||||
public:
|
public:
|
||||||
SimpleIndexedPropertyStorage()
|
SimpleIndexedPropertyStorage()
|
||||||
: IndexedPropertyStorage(IsSimpleStorage::Yes) {};
|
: IndexedPropertyStorage(IsSimpleStorage::Yes)
|
||||||
|
{
|
||||||
|
}
|
||||||
explicit SimpleIndexedPropertyStorage(Vector<Value>&& initial_values);
|
explicit SimpleIndexedPropertyStorage(Vector<Value>&& initial_values);
|
||||||
|
|
||||||
virtual bool has_index(u32 index) const override;
|
virtual bool has_index(u32 index) const override;
|
||||||
|
@ -99,7 +103,9 @@ class GenericIndexedPropertyStorage final : public IndexedPropertyStorage {
|
||||||
public:
|
public:
|
||||||
explicit GenericIndexedPropertyStorage(SimpleIndexedPropertyStorage&&);
|
explicit GenericIndexedPropertyStorage(SimpleIndexedPropertyStorage&&);
|
||||||
explicit GenericIndexedPropertyStorage()
|
explicit GenericIndexedPropertyStorage()
|
||||||
: IndexedPropertyStorage(IsSimpleStorage::No) {};
|
: IndexedPropertyStorage(IsSimpleStorage::No)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool has_index(u32 index) const override;
|
virtual bool has_index(u32 index) const override;
|
||||||
virtual Optional<ValueAndAttributes> get(u32 index) const override;
|
virtual Optional<ValueAndAttributes> get(u32 index) const override;
|
||||||
|
|
|
@ -468,10 +468,8 @@ private:
|
||||||
|
|
||||||
KeyCallbackMachine m_callback_machine;
|
KeyCallbackMachine m_callback_machine;
|
||||||
|
|
||||||
struct termios m_termios {
|
struct termios m_termios {};
|
||||||
};
|
struct termios m_default_termios {};
|
||||||
struct termios m_default_termios {
|
|
||||||
};
|
|
||||||
bool m_was_interrupted { false };
|
bool m_was_interrupted { false };
|
||||||
bool m_previous_interrupt_was_handled_as_interrupt { true };
|
bool m_previous_interrupt_was_handled_as_interrupt { true };
|
||||||
bool m_was_resized { false };
|
bool m_was_resized { false };
|
||||||
|
|
|
@ -25,7 +25,9 @@ struct Key {
|
||||||
|
|
||||||
Key(unsigned c)
|
Key(unsigned c)
|
||||||
: modifiers(None)
|
: modifiers(None)
|
||||||
, key(c) {};
|
, key(c)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Key(unsigned c, int modifiers)
|
Key(unsigned c, int modifiers)
|
||||||
: modifiers(modifiers)
|
: modifiers(modifiers)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Media {
|
||||||
|
|
||||||
class VideoDecoder {
|
class VideoDecoder {
|
||||||
public:
|
public:
|
||||||
virtual ~VideoDecoder() {};
|
virtual ~VideoDecoder() { }
|
||||||
|
|
||||||
virtual DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ReadonlyBytes sample) = 0;
|
virtual DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ReadonlyBytes sample) = 0;
|
||||||
DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ByteBuffer const& sample) { return receive_sample(timestamp, sample.span()); }
|
DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ByteBuffer const& sample) { return receive_sample(timestamp, sample.span()); }
|
||||||
|
|
|
@ -34,7 +34,7 @@ private:
|
||||||
, m_value(value)
|
, m_value(value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
ColumnCount() {};
|
ColumnCount() { }
|
||||||
|
|
||||||
Type m_type { Type::Auto };
|
Type m_type { Type::Auto };
|
||||||
Optional<int> m_value;
|
Optional<int> m_value;
|
||||||
|
|
|
@ -16,7 +16,9 @@ class Filter {
|
||||||
public:
|
public:
|
||||||
Filter() = default;
|
Filter() = default;
|
||||||
Filter(FilterValueListStyleValue const& filter_value_list)
|
Filter(FilterValueListStyleValue const& filter_value_list)
|
||||||
: m_filter_value_list { filter_value_list } {};
|
: m_filter_value_list { filter_value_list }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static Filter make_none()
|
static Filter make_none()
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,11 +71,17 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
GridTrackPlacement()
|
GridTrackPlacement()
|
||||||
: m_value(Auto {}) {};
|
: m_value(Auto {})
|
||||||
|
{
|
||||||
|
}
|
||||||
GridTrackPlacement(AreaOrLine value)
|
GridTrackPlacement(AreaOrLine value)
|
||||||
: m_value(value) {};
|
: m_value(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
GridTrackPlacement(Span value)
|
GridTrackPlacement(Span value)
|
||||||
: m_value(value) {};
|
: m_value(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Variant<Auto, AreaOrLine, Span> m_value;
|
Variant<Auto, AreaOrLine, Span> m_value;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,8 +23,8 @@ public:
|
||||||
virtual Gfx::IntSize size() const = 0;
|
virtual Gfx::IntSize size() const = 0;
|
||||||
virtual Gfx::Bitmap& bitmap() const = 0;
|
virtual Gfx::Bitmap& bitmap() const = 0;
|
||||||
|
|
||||||
BackingStore() {};
|
BackingStore() { }
|
||||||
virtual ~BackingStore() {};
|
virtual ~BackingStore() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class BitmapBackingStore final : public BackingStore {
|
class BitmapBackingStore final : public BackingStore {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
ReadonlySpan<ColorStop> color_stops() const { return m_color_stops; }
|
ReadonlySpan<ColorStop> color_stops() const { return m_color_stops; }
|
||||||
Optional<float> repeat_length() const { return m_repeat_length; }
|
Optional<float> repeat_length() const { return m_repeat_length; }
|
||||||
|
|
||||||
virtual ~SVGGradientPaintStyle() {};
|
virtual ~SVGGradientPaintStyle() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Vector<ColorStop, 4> m_color_stops;
|
Vector<ColorStop, 4> m_color_stops;
|
||||||
|
|
|
@ -20,7 +20,9 @@ GC::Ref<SVGAnimatedTransformList> SVGAnimatedTransformList::create(JS::Realm& re
|
||||||
SVGAnimatedTransformList::SVGAnimatedTransformList(JS::Realm& realm, GC::Ref<SVGTransformList> base_val, GC::Ref<SVGTransformList> anim_val)
|
SVGAnimatedTransformList::SVGAnimatedTransformList(JS::Realm& realm, GC::Ref<SVGTransformList> base_val, GC::Ref<SVGTransformList> anim_val)
|
||||||
: PlatformObject(realm)
|
: PlatformObject(realm)
|
||||||
, m_base_val(base_val)
|
, m_base_val(base_val)
|
||||||
, m_anim_val(anim_val) {};
|
, m_anim_val(anim_val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SVGAnimatedTransformList::~SVGAnimatedTransformList() = default;
|
SVGAnimatedTransformList::~SVGAnimatedTransformList() = default;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@ GC::Ref<SVGTransform> SVGTransform::create(JS::Realm& realm)
|
||||||
}
|
}
|
||||||
|
|
||||||
SVGTransform::SVGTransform(JS::Realm& realm)
|
SVGTransform::SVGTransform(JS::Realm& realm)
|
||||||
: PlatformObject(realm) {};
|
: PlatformObject(realm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SVGTransform::~SVGTransform() = default;
|
SVGTransform::~SVGTransform() = default;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class XMLHttpRequestEventTarget : public DOM::EventTarget {
|
||||||
WEB_PLATFORM_OBJECT(XMLHttpRequestEventTarget, DOM::EventTarget);
|
WEB_PLATFORM_OBJECT(XMLHttpRequestEventTarget, DOM::EventTarget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~XMLHttpRequestEventTarget() override {};
|
virtual ~XMLHttpRequestEventTarget() override { }
|
||||||
|
|
||||||
#undef __ENUMERATE
|
#undef __ENUMERATE
|
||||||
#define __ENUMERATE(attribute_name, event_name) \
|
#define __ENUMERATE(attribute_name, event_name) \
|
||||||
|
|
|
@ -31,8 +31,8 @@ public:
|
||||||
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override;
|
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override;
|
||||||
virtual Web::CSS::PreferredContrast preferred_contrast() const override;
|
virtual Web::CSS::PreferredContrast preferred_contrast() const override;
|
||||||
virtual Web::CSS::PreferredMotion preferred_motion() const override;
|
virtual Web::CSS::PreferredMotion preferred_motion() const override;
|
||||||
virtual void paint_next_frame() override {};
|
virtual void paint_next_frame() override { }
|
||||||
virtual void process_screenshot_requests() override {};
|
virtual void process_screenshot_requests() override { }
|
||||||
virtual void paint(Web::DevicePixelRect const&, Web::Painting::BackingStore&, Web::PaintOptions = {}) override;
|
virtual void paint(Web::DevicePixelRect const&, Web::Painting::BackingStore&, Web::PaintOptions = {}) override;
|
||||||
virtual void request_file(Web::FileRequest) override;
|
virtual void request_file(Web::FileRequest) override;
|
||||||
virtual bool is_ready_to_paint() const override { return true; }
|
virtual bool is_ready_to_paint() const override { return true; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue