mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +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
|
@ -71,7 +71,7 @@ void DurationPrototype::initialize(Realm& realm)
|
|||
/* 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). */ \
|
||||
auto duration = TRY(typed_this_object(vm)); \
|
||||
\
|
||||
/* 3. Return 𝔽(duration.[[<unit>]]). */ \
|
||||
/* 3. Return 𝔽(duration.[[<unit>]]). */ \
|
||||
return duration->unit(); \
|
||||
}
|
||||
JS_ENUMERATE_DURATION_UNITS
|
||||
|
|
|
@ -145,15 +145,15 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter)
|
|||
__JS_ENUMERATE(months_in_year) \
|
||||
__JS_ENUMERATE(in_leap_year)
|
||||
|
||||
#define __JS_ENUMERATE(field) \
|
||||
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::field##_getter) \
|
||||
{ \
|
||||
/* 1. Let dateTime be the this value. */ \
|
||||
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
||||
auto date_time = TRY(typed_this_object(vm)); \
|
||||
\
|
||||
#define __JS_ENUMERATE(field) \
|
||||
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::field##_getter) \
|
||||
{ \
|
||||
/* 1. Let dateTime be the this value. */ \
|
||||
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
||||
auto date_time = TRY(typed_this_object(vm)); \
|
||||
\
|
||||
/* 3. Return 𝔽(CalendarISOToDate(dateTime.[[Calendar]], dateTime.[[ISODateTime]].[[ISODate]]).[[<field>]]). */ \
|
||||
return calendar_iso_to_date(date_time->calendar(), date_time->iso_date_time().iso_date).field; \
|
||||
return calendar_iso_to_date(date_time->calendar(), date_time->iso_date_time().iso_date).field; \
|
||||
}
|
||||
JS_ENUMERATE_PLAIN_DATE_TIME_SIMPLE_DATE_FIELDS
|
||||
#undef __JS_ENUMERATE
|
||||
|
@ -191,7 +191,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter)
|
|||
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
||||
auto date_time = TRY(typed_this_object(vm)); \
|
||||
\
|
||||
/* 3. Return 𝔽(dateTime.[[ISODateTime]].[[Time]].[[<field>]]). */ \
|
||||
/* 3. Return 𝔽(dateTime.[[ISODateTime]].[[Time]].[[<field>]]). */ \
|
||||
return date_time->iso_date_time().time.field; \
|
||||
}
|
||||
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
||||
|
|
|
@ -72,7 +72,7 @@ void PlainTimePrototype::initialize(Realm& realm)
|
|||
/* 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). */ \
|
||||
auto temporal_time = TRY(typed_this_object(vm)); \
|
||||
\
|
||||
/* 3. Return 𝔽(temporalTime.[[Time]].[[<field>]]). */ \
|
||||
/* 3. Return 𝔽(temporalTime.[[Time]].[[<field>]]). */ \
|
||||
return temporal_time->time().field; \
|
||||
}
|
||||
JS_ENUMERATE_PLAIN_TIME_FIELDS
|
||||
|
|
|
@ -186,7 +186,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter)
|
|||
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
||||
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
||||
\
|
||||
/* 3. Return 𝔽(CalendarISOToDate(zonedDateTime.[[Calendar]], isoDateTime.[[ISODate]]).[[<field>]]). */ \
|
||||
/* 3. Return 𝔽(CalendarISOToDate(zonedDateTime.[[Calendar]], isoDateTime.[[ISODate]]).[[<field>]]). */ \
|
||||
return calendar_iso_to_date(zoned_date_time->calendar(), iso_date_time.iso_date).field; \
|
||||
}
|
||||
JS_ENUMERATE_ZONED_DATE_TIME_SIMPLE_DATE_FIELDS
|
||||
|
@ -231,7 +231,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter)
|
|||
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
||||
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
||||
\
|
||||
/* 3. Return 𝔽(isoDateTime.[[Time]].[[<field>]]). */ \
|
||||
/* 3. Return 𝔽(isoDateTime.[[Time]].[[<field>]]). */ \
|
||||
return iso_date_time.time.field; \
|
||||
}
|
||||
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue