diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 8faedbd21ae..edbd84152a0 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -198,9 +198,9 @@ static GC::Ref obtain_a_browsing_context_to_use_for_a_nav // 9. If swapGroup is false, then: if (!swap_group) { // 1. If coopEnforcementResult's would need a browsing context group switch due to report-only is true, - // set browsing context's virtual browsing context group ID to a new unique identifier. + // set browsingContext's virtual browsing context group ID to a new unique identifier. if (coop_enforcement_result.would_need_a_browsing_context_group_switch_due_to_report_only) { - // FIXME: set browsing context's virtual browsing context group ID to a new unique identifier. + // FIXME: set browsingContext's virtual browsing context group ID to a new unique identifier. } // 2. Return browsingContext. @@ -3945,7 +3945,7 @@ void Document::destroy_a_document_and_its_descendants(GC::Ptractive_window(), GC::create_function(heap(), [&heap = heap(), &number_destroyed, child_navigable = child_navigable.ptr()] { diff --git a/Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp b/Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp index f20acc43c13..996fb03a85a 100644 --- a/Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp +++ b/Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp @@ -224,8 +224,7 @@ JS::ThrowCompletionOr cross_origin_set(JS::VM& vm, JS::Object& object, JS: // 3. If desc.[[Set]] is present and its value is not undefined, then: if (descriptor->set.has_value() && *descriptor->set) { - // FIXME: Spec issue, `setter` isn't being defined. - // 1. Perform ? Call(setter, Receiver, «V»). + // 1. Perform ? Call(desc.[[Set]], Receiver, « V »). TRY(JS::call(vm, *descriptor->set, receiver, value)); // 2. Return true. diff --git a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp index ad4910f3ece..4b9fa0710fd 100644 --- a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp @@ -124,7 +124,7 @@ WebIDL::ExceptionOr HTMLDialogElement::show() if (has_attribute(AttributeNames::open)) return {}; - // 5. Queue a dialog toggle event task given subject, "closed", and "open". + // 5. Queue a dialog toggle event task given this, "closed", and "open". queue_a_dialog_toggle_event_task("closed"_string, "open"_string); // 6. Add an open attribute to this, whose value is the empty string. diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Libraries/LibWeb/HTML/HTMLImageElement.cpp index 406ef67749b..2364956286f 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -496,7 +496,7 @@ ErrorOr HTMLImageElement::update_the_image_data(bool restart_animations, b // then abort the image request for the current request and the pending request, // set current request's state to unavailable, set pending request to null, and return. - // 3. Let previous URL be the current request's current URL. + // 3. Let previousURL be the current request's current URL. auto previous_url = m_current_request->current_url(); // 4. Let selected source be null and selected pixel density be undefined. @@ -549,7 +549,7 @@ ErrorOr HTMLImageElement::update_the_image_data(bool restart_animations, b m_current_request->set_image_data(entry->image_data); m_current_request->set_state(ImageRequest::State::CompletelyAvailable); - // 5. Prepare current request for presentation given img. + // 5. Prepare current request for presentation given the img element. m_current_request->prepare_for_presentation(*this); // 6. Set current request's current pixel density to selected pixel density. diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index e4bfe296f1f..bc2c55365e2 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -1399,7 +1399,7 @@ WebIDL::ExceptionOr HTMLInputElement::handle_src_attribute(String const& v request->set_credentials_mode(Fetch::Infrastructure::Request::CredentialsMode::Include); request->set_use_url_credentials(true); - // 4. Fetch request, with processResponseEndOfBody set to the following step given response response: + // 4. Fetch request, with processResponseEndOfBody set to the following steps given response response: m_resource_request = SharedResourceRequest::get_or_create(realm, document().page(), request->url()); m_resource_request->add_callbacks( [this, &realm]() { @@ -2376,13 +2376,15 @@ WebIDL::ExceptionOr HTMLInputElement::step_up_or_down(bool is_down, WebIDL } // 8. If the element has a minimum, and value is less than that minimum, then set value to the smallest value that, - // when subtracted from the step base, is an integral multiple of the allowed value step, and that is more than or equal to minimum. + // when subtracted from the step base, is an integral multiple of the allowed value step, and that is more than + // or equal to that minimum. if (maybe_minimum.has_value() && value < *maybe_minimum) { value = AK::max(value, *maybe_minimum); } // 9. If the element has a maximum, and value is greater than that maximum, then set value to the largest value that, - // when subtracted from the step base, is an integral multiple of the allowed value step, and that is less than or equal to maximum. + // when subtracted from the step base, is an integral multiple of the allowed value step, and that is less than + // or equal to that maximum. if (maybe_maximum.has_value() && value > *maybe_maximum) { value = AK::min(value, *maybe_maximum); } diff --git a/Libraries/LibWeb/HTML/HTMLOrSVGElement.cpp b/Libraries/LibWeb/HTML/HTMLOrSVGElement.cpp index 2158479efdd..b0d88aa6c15 100644 --- a/Libraries/LibWeb/HTML/HTMLOrSVGElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLOrSVGElement.cpp @@ -98,7 +98,7 @@ void HTMLOrSVGElement::inserted() [[maybe_unused]] auto policy_container = element.shadow_including_root().document().policy_container(); // FIXME: 2. If CSP list contains a header-delivered Content Security Policy, and element has a - // nonce content attribute attr whose value is not the empty string, then: + // nonce content attribute whose value is not the empty string, then: if (true && element.has_attribute(HTML::AttributeNames::nonce)) { // 2.1. Let nonce be element's [[CryptographicNonce]]. auto nonce = m_cryptographic_nonce; diff --git a/Libraries/LibWeb/HTML/MimeTypeArray.cpp b/Libraries/LibWeb/HTML/MimeTypeArray.cpp index b41b857c6a1..cdb36c9e975 100644 --- a/Libraries/LibWeb/HTML/MimeTypeArray.cpp +++ b/Libraries/LibWeb/HTML/MimeTypeArray.cpp @@ -65,7 +65,7 @@ GC::Ptr MimeTypeArray::item(u32 index) const auto& window = as(HTML::relevant_global_object(*this)); auto mime_types = window.pdf_viewer_mime_type_objects(); - // 2. If index < mimeType's size, then return mimeTypes[index]. + // 2. If index < mimeTypes's size, then return mimeTypes[index]. if (index < mime_types.size()) return mime_types[index]; diff --git a/Libraries/LibWeb/HTML/Navigation.cpp b/Libraries/LibWeb/HTML/Navigation.cpp index 38822ac9624..0d171f121d8 100644 --- a/Libraries/LibWeb/HTML/Navigation.cpp +++ b/Libraries/LibWeb/HTML/Navigation.cpp @@ -605,8 +605,7 @@ GC::Ref Navigation::add_an_upcoming_traverse_api_met /* .committed_promise = */ committed_promise, /* .finished_promise = */ finished_promise); - // 4. Set navigation's upcoming traverse API method trackers[key] to apiMethodTracker. - // FIXME: Fix spec typo key --> destinationKey + // 4. Set navigation's upcoming traverse API method trackers[destinationKey] to apiMethodTracker. m_upcoming_traverse_api_method_trackers.set(destination_key, api_method_tracker); // 5. Return apiMethodTracker. @@ -1116,9 +1115,8 @@ bool Navigation::inner_navigate_event_firing_algorithm( if (navigation_type == Bindings::NavigationType::Traverse) m_suppress_scroll_restoration_during_ongoing_navigation = true; - // FIXME: Fix spec typo "serialied" // 7. If navigationType is "push" or "replace", then run the URL and history update steps given document and - // event's destination's URL, with serialiedData set to event's classic history API state and historyHandling + // event's destination's URL, with serializedData set to event's classic history API state and historyHandling // set to navigationType. if (navigation_type == Bindings::NavigationType::Push || navigation_type == Bindings::NavigationType::Replace) { auto history_handling = navigation_type == Bindings::NavigationType::Push ? HistoryHandlingBehavior::Push : HistoryHandlingBehavior::Replace; diff --git a/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp b/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp index c01022081a3..2efe5bce987 100644 --- a/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp +++ b/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.cpp @@ -83,7 +83,7 @@ bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const // https://html.spec.whatwg.org/multipage/parsing.html#has-an-element-in-the-specific-scope // 1. Initialize node to be the current node (the bottommost node of the stack). for (auto& node : m_elements.in_reverse()) { - // 2. If node is the target node, terminate in a match state. + // 2. If node is target node, terminate in a match state. if (node->local_name() == tag_name) return true; // 3. Otherwise, if node is one of the element types in list, terminate in a failure state. @@ -92,8 +92,8 @@ bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const return false; // 4. Otherwise, set node to the previous entry in the stack of open elements and return to step 2. } - // [4.] (This will never fail, since the loop will always terminate in the previous step if the top of the stack - // — an html element — is reached.) + // NOTE: This will never fail, since the loop will always terminate in the previous step if the top of the stack + // — an html element — is reached. VERIFY_NOT_REACHED(); } diff --git a/Libraries/LibWeb/HTML/Plugin.cpp b/Libraries/LibWeb/HTML/Plugin.cpp index 023ee992090..23e76743fbb 100644 --- a/Libraries/LibWeb/HTML/Plugin.cpp +++ b/Libraries/LibWeb/HTML/Plugin.cpp @@ -89,7 +89,7 @@ GC::Ptr Plugin::item(u32 index) const auto& window = as(HTML::relevant_global_object(*this)); auto mime_types = window.pdf_viewer_mime_type_objects(); - // 2. If index < mimeType's size, then return mimeTypes[index]. + // 2. If index < mimeTypes's size, then return mimeTypes[index]. if (index < mime_types.size()) return mime_types[index]; diff --git a/Libraries/LibWeb/HTML/PotentialCORSRequest.cpp b/Libraries/LibWeb/HTML/PotentialCORSRequest.cpp index b00deb2e95a..af4727bfac5 100644 --- a/Libraries/LibWeb/HTML/PotentialCORSRequest.cpp +++ b/Libraries/LibWeb/HTML/PotentialCORSRequest.cpp @@ -29,8 +29,8 @@ create_potential_CORS_request(JS::VM& vm, URL::URL const& url, Optionalset_url(url); request->set_destination(destination); diff --git a/Libraries/LibWeb/HTML/SourceSet.cpp b/Libraries/LibWeb/HTML/SourceSet.cpp index 8afaf6edaf0..129fb82071f 100644 --- a/Libraries/LibWeb/HTML/SourceSet.cpp +++ b/Libraries/LibWeb/HTML/SourceSet.cpp @@ -419,7 +419,7 @@ void SourceSet::normalize_source_densities(DOM::Element const& element) // 2. Otherwise, if the image source has a width descriptor, // replace the width descriptor with a pixel density descriptor - // with a value of the width descriptor value divided by the source size and a unit of x. + // with a value of the width descriptor value divided by source size and a unit of x. auto descriptor_value_set = false; if (image_source.descriptor.has()) { auto& width_descriptor = image_source.descriptor.get(); diff --git a/Libraries/LibWeb/HTML/TraversableNavigable.cpp b/Libraries/LibWeb/HTML/TraversableNavigable.cpp index f27ecfbbe37..a2c363599ff 100644 --- a/Libraries/LibWeb/HTML/TraversableNavigable.cpp +++ b/Libraries/LibWeb/HTML/TraversableNavigable.cpp @@ -958,13 +958,13 @@ TraversableNavigable::CheckIfUnloadingIsCanceledResult TraversableNavigable::che } } - // 5. Let totalTasks be the size of documentsThatNeedBeforeunload. + // 5. Let totalTasks be the size of documentsToFireBeforeunload. IGNORE_USE_IN_ESCAPING_LAMBDA auto total_tasks = documents_to_fire_beforeunload.size(); // 6. Let completedTasks be 0. IGNORE_USE_IN_ESCAPING_LAMBDA size_t completed_tasks = 0; - // 7. For each document of documents, queue a global task on the navigation and traversal task source given document's relevant global object to run the steps: + // 7. For each document of documentsToFireBeforeunload, queue a global task on the navigation and traversal task source given document's relevant global object to run the steps: for (auto& document : documents_to_fire_beforeunload) { queue_global_task(Task::Source::NavigationAndTraversal, relevant_global_object(*document), GC::create_function(heap(), [document, &final_status, &completed_tasks, &unload_prompt_shown] { // 1. Let (unloadPromptShownForThisDocument, unloadPromptCanceledByThisDocument) be the result of running the steps to fire beforeunload given document and unloadPromptShown.