LibWeb: Correct some spec typos
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

Corresponds to 285a58bf30
This commit is contained in:
Sam Atkins 2025-04-09 12:45:18 +01:00 committed by Alexander Kalenik
parent 4a5863bcdb
commit 9dbeecb73d
Notes: github-actions[bot] 2025-04-10 09:18:08 +00:00
11 changed files with 23 additions and 22 deletions

View file

@ -448,7 +448,7 @@ GC::Ptr<DOM::Document> load_document(HTML::NavigationParams const& navigation_pa
// sourceSnapshotParams, and initiatorOrigin.
}
// -> A supported image, video, or audio type
// -> a supported image, video, or audio type
if (type.is_image()
|| type.is_audio_or_video()) {
// Return the result of loading a media document given navigationParams and type.

View file

@ -2548,7 +2548,7 @@ JS::ThrowCompletionOr<void> Element::upgrade_element(GC::Ref<HTML::CustomElement
// FIXME: 9. If element is a form-associated custom element, then:
// 1. Reset the form owner of element. If element is associated with a form element, then enqueue a custom element callback reaction with element, callback name "formAssociatedCallback", and « the associated form ».
// 2. If element is disabled, then enqueue a custom element callback reaction with element, callback name "formDisabledCallback" and « true ».
// 2. If element is disabled, then enqueue a custom element callback reaction with element, callback name "formDisabledCallback", and « true ».
// 10. Set element's custom element state to "custom".
set_custom_element_state(CustomElementState::Custom);

View file

@ -233,7 +233,7 @@ static Optional<YearAndMonth> parse_a_month_component(GenericLexer& input)
{
// 1. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence is
// not at least four characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer.
// Let that number be the year.
// Let year be that number.
auto year_string = input.consume_while(is_ascii_digit);
if (year_string.length() < 4)
return {};
@ -252,8 +252,8 @@ static Optional<YearAndMonth> parse_a_month_component(GenericLexer& input)
return {};
// 4. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence is not
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let that
// number be the month.
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let month
// be that number.
auto month_string = input.consume_while(is_ascii_digit);
if (month_string.length() != 2)
return {};
@ -301,7 +301,7 @@ Optional<WeekYearAndWeek> parse_a_week_string(StringView input_view)
// 3. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence is
// not at least four characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer.
// Let that number be the year.
// Let year be that number.
auto year_string = input.consume_while(is_ascii_digit);
if (year_string.length() < 4)
return {};
@ -325,8 +325,8 @@ Optional<WeekYearAndWeek> parse_a_week_string(StringView input_view)
return {};
// 7. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence is not
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let that
// number be the week.
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let week
// be that number.
auto week_string = input.consume_while(is_ascii_digit);
if (week_string.length() != 2)
return {};
@ -365,8 +365,8 @@ static Optional<YearMonthDay> parse_a_date_component(GenericLexer& input)
return {};
// 4. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence is not
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let that
// number be the day.
// exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer. Let day
// be that number.
auto day_string = input.consume_while(is_ascii_digit);
if (day_string.length() != 2)
return {};
@ -406,7 +406,7 @@ static Optional<HourMinuteSecond> parse_a_time_component(GenericLexer& input)
{
// 1. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence
// is not exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten
// integer. Let that number be the hour.
// integer. Let hour be that number.
auto hour_string = input.consume_while(is_ascii_digit);
if (hour_string.length() != 2)
return {};
@ -426,7 +426,7 @@ static Optional<HourMinuteSecond> parse_a_time_component(GenericLexer& input)
// 4. Collect a sequence of code points that are ASCII digits from input given position. If the collected sequence
// is not exactly two characters long, then fail. Otherwise, interpret the resulting sequence as a base-ten integer.
// Let that number be the minute.
// Let minute be that number.
auto minute_string = input.consume_while(is_ascii_digit);
if (minute_string.length() != 2)
return {};

View file

@ -389,7 +389,7 @@ void EventSource::process_field(StringView field, StringView value)
{
// -> If the field name is "event"
if (field == "event"sv) {
// Set the event type buffer to field value.
// Set the event type buffer to the field value.
m_event_type = MUST(String::from_utf8(value));
}
// -> If the field name is "data"

View file

@ -280,7 +280,7 @@ HTMLLinkElement::LinkProcessingOptions HTMLLinkElement::create_link_options()
options.policy_container = document.policy_container();
// document document
options.document = &document;
// FIXME: cryptographic nonce metadata The current value of el's [[CryptographicNonce]] internal slot
// FIXME: cryptographic nonce metadata the current value of el's [[CryptographicNonce]] internal slot
// fetch priority the state of el's fetchpriority content attribute
options.fetch_priority = Fetch::Infrastructure::request_priority_from_string(get_attribute_value(HTML::AttributeNames::fetchpriority)).value_or(Fetch::Infrastructure::Request::Priority::Auto);

View file

@ -1008,7 +1008,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(URL::URL const& url_r
// 6. Let byteRange, which is "entire resource" or a (number, number or "until end") tuple, be the byte range required to satisfy missing data in
// media data. This value is implementation-defined and may rely on codec, network conditions or other heuristics. The user-agent may determine
// to fetch the resource in full, in which case byteRange would be "entire resource", to fetch from a byte offset until the end, in which case
// byteRange would be (number, "until end"), or to fetch a range between two byte offsets, im which case byteRange would be a (number, number)
// byteRange would be (number, "until end"), or to fetch a range between two byte offsets, in which case byteRange would be a (number, number)
// tuple representing the two offsets.
ByteRange byte_range = EntireResource {};

View file

@ -384,7 +384,7 @@ ByteString run_encoding_sniffing_algorithm(DOM::Document& document, ByteBuffer c
return maybe_transport_encoding;
}
// 5. Optionally prescan the byte stream to determine its encoding, with the end condition being when the user agent decides that scanning further bytes would not
// 5. Optionally, prescan the byte stream to determine its encoding, with the end condition being when the user agent decides that scanning further bytes would not
// be efficient. User agents are encouraged to only prescan the first 1024 bytes. User agents may decide that scanning any bytes is not efficient, in which case
// these substeps are entirely skipped.
// The aforementioned algorithm returns either a character encoding or failure. If it returns a character encoding, then return the same encoding, with confidence tentative.

View file

@ -80,7 +80,7 @@ JS::Completion ClassicScript::run(RethrowErrors rethrow_errors, GC::Ptr<JS::Envi
// 1. Let realm be the realm of script.
auto& realm = this->realm();
// 2. Check if we can run script with realm. If this returns "do not run" then return NormalCompletion(empty).
// 2. Check if we can run script with realm. If this returns "do not run", then return NormalCompletion(empty).
if (can_run_script(realm) == RunScriptDecision::DoNotRun)
return JS::normal_completion(JS::js_undefined());

View file

@ -152,7 +152,7 @@ WebIDL::ExceptionOr<URL::URL> resolve_module_specifier(Optional<Script&> referri
}
}
// 11. If result is null, set result be the result of resolving an imports match given normalizedSpecifier, asURL, and importMap's imports.
// 11. If result is null, set result to the result of resolving an imports match given normalizedSpecifier, asURL, and importMap's imports.
if (!result.has_value())
result = TRY(resolve_imports_match(normalized_specifier.to_byte_string(), as_url, import_map.imports()));

View file

@ -378,7 +378,8 @@ i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler
}));
};
// 13. Set uniqueHandle to the result of running steps after a timeout given global, "setTimeout/setInterval", timeout, completionStep.
// 13. Set uniqueHandle to the result of running steps after a timeout given global, "setTimeout/setInterval",
// timeout, and completionStep.
// FIXME: run_steps_after_a_timeout() needs to be updated to return a unique internal value that can be used here.
run_steps_after_a_timeout_impl(timeout, move(completion_step), id);
@ -994,7 +995,7 @@ void WindowOrWorkerGlobalScopeMixin::report_an_exception(JS::Value exception, Om
if (false) {
// FIXME: 1. Let workerObject be the Worker object associated with global.
// FIXME: 2. Set notHandled be the result of firing an event named error at workerObject, using ErrorEvent,
// FIXME: 2. Set notHandled to the result of firing an event named error at workerObject, using ErrorEvent,
// with the cancelable attribute initialized to true, and additional attributes initialized
// according to errorInfo.

View file

@ -568,8 +568,8 @@ GC::Ref<HTML::DragEvent> DragAndDropEventHandler::fire_a_drag_and_drop_event(
if (!name.is_one_of(HTML::EventNames::dragleave, HTML::EventNames::dragend))
event_init.cancelable = true;
// 11. Initialize event's mouse and key attributes initialized according to the state of the input devices as they
// would be for user interaction events.
// 11. Initialize event's mouse and key attributes according to the state of the input devices as they would be for
// user interaction events.
event_init.ctrl_key = (modifiers & UIEvents::Mod_Ctrl) != 0;
event_init.shift_key = (modifiers & UIEvents::Mod_Shift) != 0;
event_init.alt_key = (modifiers & UIEvents::Mod_Alt) != 0;