Everywhere: Clean up AD-HOC and FIXME comments without colons

This commit is contained in:
Psychpsyo 2025-11-13 14:05:19 +01:00 committed by Ali Mohammad Pur
parent edccb92da7
commit 100f37995f
Notes: github-actions[bot] 2025-11-14 08:18:37 +00:00
27 changed files with 36 additions and 36 deletions

View file

@ -12,7 +12,7 @@
namespace Crypto {
class BigFraction {
// FIXME Make the whole API more error-friendly. This includes:
// FIXME: Make the whole API more error-friendly. This includes:
// - Propagating errors from BigIntegers
// - Returns errors from BigFraction(numerator, denominator);
// - Duplicate fallible operators with a error-friendly version

View file

@ -1978,7 +1978,7 @@ ThrowCompletionOr<u64> get_rounding_increment_option(VM& vm, Object const& optio
return static_cast<u64>(integer_increment);
}
// AD-HOC
// AD-HOC:
// FIXME: We should add a generic floor() method to our BigInt classes. But for now, since we know we are only dividing
// by powers of 10, we can implement a very situationally specific method to compute the floor of a division.
Crypto::SignedBigInteger big_floor(Crypto::SignedBigInteger const& numerator, Crypto::UnsignedBigInteger const& denominator)

View file

@ -417,7 +417,7 @@ void ArrayBuffer::set_value(size_t byte_index, Value value, [[maybe_unused]] boo
AK::Array<u8, sizeof(T)> raw_bytes;
numeric_to_raw_bytes<T>(vm, value, is_little_endian, raw_bytes);
// FIXME 8. If IsSharedArrayBuffer(arrayBuffer) is true, then
// FIXME: 8. If IsSharedArrayBuffer(arrayBuffer) is true, then
if (false) {
// FIXME: a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
// FIXME: b. Let eventsRecord be the Agent Events Record of execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().

View file

@ -717,7 +717,7 @@ RoundingIncrement maximum_temporal_duration_rounding_increment(Unit unit)
return temporal_units[to_underlying(unit)].maximum_duration_rounding_increment;
}
// AD-HOC
// https://tc39.es/proposal-temporal/#table-temporal-units
Crypto::UnsignedBigInteger const& temporal_unit_length_in_nanoseconds(Unit unit)
{
switch (unit) {

View file

@ -1654,14 +1654,14 @@ Gfx::ShapeFeatures ComputedProperties::font_features() const
// https://www.w3.org/TR/css-fonts-3/#feature-precedence
// FIXME 1. Font features enabled by default, including features required for a given script.
// FIXME: 1. Font features enabled by default, including features required for a given script.
// FIXME 2. If the font is defined via an @font-face rule, the font features implied by the font-feature-settings descriptor in the @font-face rule.
// FIXME: 2. If the font is defined via an @font-face rule, the font features implied by the font-feature-settings descriptor in the @font-face rule.
// 3. Font features implied by the value of the font-variant property, the related font-variant subproperties and any other CSS property that uses OpenType features (e.g. the font-kerning property).
merged_features.update(font_variant_features());
// FIXME 4. Feature settings determined by properties other than font-variant or font-feature-settings. For example, setting a non-default value for the letter-spacing property disables common ligatures.
// FIXME: 4. Feature settings determined by properties other than font-variant or font-feature-settings. For example, setting a non-default value for the letter-spacing property disables common ligatures.
// 5. Font features implied by the value of font-feature-settings property.
merged_features.update(font_feature_settings());

View file

@ -5716,7 +5716,7 @@ RefPtr<GridAutoFlowStyleValue const> Parser::parse_grid_auto_flow_value(TokenStr
// https://www.w3.org/TR/css-grid-2/#track-sizing
RefPtr<StyleValue const> Parser::parse_grid_track_size_list(TokenStream<ComponentValue>& tokens)
{
// none | <track-list> | <auto-track-list> | FIXME subgrid <line-name-list>?
// none | <track-list> | <auto-track-list> | FIXME: subgrid <line-name-list>?
// none
{

View file

@ -779,7 +779,7 @@ WebIDL::ExceptionOr<Document*> Document::open(Optional<String> const&, Optional<
// FIXME: 9. For each shadow-including inclusive descendant node of document, erase all event listeners and handlers given node.
// FIXME 10. If document is the associated Document of document's relevant global object, then erase all event listeners and handlers given document's relevant global object.
// FIXME: 10. If document is the associated Document of document's relevant global object, then erase all event listeners and handlers given document's relevant global object.
// 11. Replace all with null within document, without firing any mutation events.
replace_all(nullptr);
@ -4285,7 +4285,7 @@ void Document::abort()
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#abort-a-document-and-its-descendants
void Document::abort_a_document_and_its_descendants()
{
// FIXME 1. Assert: this is running as part of a task queued on document's relevant agent's event loop.
// FIXME: 1. Assert: this is running as part of a task queued on document's relevant agent's event loop.
// 2. Let descendantNavigables be document's descendant navigables.
auto descendant_navigables = this->descendant_navigables();

View file

@ -36,7 +36,7 @@ GC::Ref<DOM::Document> create_document_for_inline_content(GC::Ptr<HTML::Navigabl
// origin: origin
// opener policy: coop
HTML::OpenerPolicyEnforcementResult coop_enforcement_result {
.url = URL::about_error(), // AD-HOC
.url = URL::about_error(), // AD-HOC: https://github.com/whatwg/html/issues/9122
.origin = origin,
.opener_policy = coop
};

View file

@ -27,7 +27,7 @@ void schedule_a_selectionchange_event(T& target, Document& document)
if (target.has_scheduled_selectionchange_event())
return;
// AD-HOC (https://github.com/w3c/selection-api/issues/338):
// AD-HOC: See https://github.com/w3c/selection-api/issues/338
// Set target's has scheduled selectionchange event to true
target.set_scheduled_selectionchange_event(true);

View file

@ -1865,7 +1865,7 @@ GC::Ref<PendingResponse> http_network_or_cache_fetch(JS::Realm& realm, Infrastru
// 13. Append the Fetch metadata headers for httpRequest.
append_fetch_metadata_headers_for_request(*http_request);
// 14. FIXME If httpRequests initiator is "prefetch", then set a structured field value
// 14. FIXME: If httpRequests initiator is "prefetch", then set a structured field value
// given (`Sec-Purpose`, the token prefetch) in httpRequests header list.
// 15. If httpRequests header list does not contain `User-Agent`, then user agents should append

View file

@ -194,7 +194,7 @@ private:
// A response has an associated redirect taint ("same-origin", "same-site", or "cross-site"), which is initially "same-origin".
RedirectTaint m_redirect_taint { RedirectTaint::SameOrigin };
// FIXME is the type correct?
// FIXME: is the type correct?
u64 current_age() const;
u64 freshness_lifetime() const;
u64 stale_while_revalidate_lifetime() const;

View file

@ -266,7 +266,7 @@ Utf16String FormAssociatedElement::validation_message() const
if (!is_candidate_for_constraint_validation() || satisfies_its_constraints())
return {};
// FIXME
// FIXME:
// 2. Return a suitably localized message that the user agent would show the user if this were the only form
// control with a validity constraint problem. If the user agent would not actually show a textual message in
// such a situation (e.g., it would show a graphical cue instead), then return a suitably localized message that

View file

@ -40,7 +40,7 @@ void HTMLButtonElement::adjust_computed_style(CSS::ComputedProperties& style)
// No-op
} else if (display.is_inline_outside()) {
// Otherwise, if the computed value of 'display' is a value such that the outer display type is 'inline', then behave as 'inline-block'.
// AD-HOC https://github.com/whatwg/html/issues/11857
// AD-HOC: See https://github.com/whatwg/html/issues/11857
style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::InlineBlock)));
} else {
// Otherwise, behave as 'flow-root'.

View file

@ -455,8 +455,8 @@ void HTMLDialogElement::run_dialog_focusing_steps()
// 2. Let control be null
GC::Ptr<Element> control = nullptr;
// FIXME 3. If subject has the autofocus attribute, then set control to subject.
// FIXME 4. If control is null, then set control to the focus delegate of subject.
// FIXME: 3. If subject has the autofocus attribute, then set control to subject.
// FIXME: 4. If control is null, then set control to the focus delegate of subject.
// 5. If control is null, then set control to subject.
if (!control)

View file

@ -1036,7 +1036,7 @@ void HTMLImageElement::upgrade_pending_request_to_current_request()
void HTMLImageElement::handle_failed_fetch()
{
// AD-HOC
// AD-HOC: This should be closer to the spec
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error));
}

View file

@ -126,9 +126,9 @@ WebIDL::ExceptionOr<void> MessagePort::transfer_receiving_steps(HTML::TransferDa
// 1. Set value's has been shipped flag to true.
m_has_been_shipped = true;
// FIXME 2. Move all the tasks that are to fire message events in dataHolder.[[PortMessageQueue]] to the port message queue of value,
// if any, leaving value's port message queue in its initial disabled state, and, if value's relevant global object is a Window,
// associating the moved tasks with value's relevant global object's associated Document.
// 2. FIXME: Move all the tasks that are to fire message events in dataHolder.[[PortMessageQueue]] to the port message queue of value,
// if any, leaving value's port message queue in its initial disabled state, and, if value's relevant global object is a Window,
// associating the moved tasks with value's relevant global object's associated Document.
// 3. If dataHolder.[[RemotePort]] is not null, then entangle dataHolder.[[RemotePort]] and value.
// (This will disentangle dataHolder.[[RemotePort]] from the original port that was transferred.)

View file

@ -650,7 +650,7 @@ Vector<GC::Ref<SessionHistoryEntry>>& Navigable::get_session_history_entries() c
// 1. Let traversable be navigable's traversable navigable.
auto traversable = traversable_navigable();
// FIXME 2. Assert: this is running within traversable's session history traversal queue.
// FIXME: 2. Assert: this is running within traversable's session history traversal queue.
// 3. If navigable is traversable, return traversable's session history entries.
if (this == traversable)
@ -1009,7 +1009,7 @@ static void perform_navigation_params_fetch(JS::Realm& realm, GC::Ref<Navigation
// using opener policy and sandbox the result of navigating to that response.
}
// 13. FIXME If response is not a network error, navigable is a child navigable, and the result of performing a cross-origin resource policy check
// 13. FIXME: If response is not a network error, navigable is a child navigable, and the result of performing a cross-origin resource policy check
// with navigable's container document's origin, navigable's container document's relevant settings object, request's destination, response,
// and true is blocked, then set response to a network error and break.
// NOTE: Here we're running the cross-origin resource policy check against the parent navigable rather than navigable itself

View file

@ -276,7 +276,7 @@ GC::Ref<WebIDL::Promise> OffscreenCanvas::convert_to_blob(Optional<ImageEncodeOp
// FIXME: 1. If the value of this OffscreenCanvas object's [[Detached]] internal slot is set to true, then return a promise rejected with an "InvalidStateError" DOMException.
// FIXME 2. If this OffscreenCanvas object's context mode is 2d and the rendering context's output bitmap's origin-clean flag is set to false, then return a promise rejected with a "SecurityError" DOMException.
// FIXME: 2. If this OffscreenCanvas object's context mode is 2d and the rendering context's output bitmap's origin-clean flag is set to false, then return a promise rejected with a "SecurityError" DOMException.
auto size = bitmap_size_for_canvas();

View file

@ -4754,7 +4754,7 @@ void HTMLParser::process_using_the_rules_for_foreign_content(HTMLToken& token)
// Insert a foreign element for the token, with the adjusted current node's namespace and false.
(void)insert_foreign_element(token, adjusted_current_node()->namespace_uri(), OnlyAddToElementStack::No);
// AD-HOC we don't want to execute script elements just by adding data to it
// AD-HOC: we don't want to execute script elements just by adding data to it
if (token.tag_name() == SVG::TagNames::script && current_node()->namespace_uri() == Namespace::SVG) {
auto& script_element = as<SVG::SVGScriptElement>(*current_node());
script_element.set_parser_inserted({});

View file

@ -380,7 +380,7 @@ static void deactivate_a_document_for_cross_document_navigation(GC::Ref<DOM::Doc
// 5. If potentiallyTriggerViewTransition is false, then:
if (!potentially_trigger_view_transition) {
// FIXME 1. Let firePageSwapBeforeUnload be the following step
// FIXME: 1. Let firePageSwapBeforeUnload be the following step
// 1. Fire the pageswap event given displayedDocument, targetEntry, navigationType, and null.
// 2. Set the ongoing navigation for navigable to null.

View file

@ -557,7 +557,7 @@ i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler
auto& vm = this_impl().vm();
// FIXME 8. Let uniqueHandle be null.
// FIXME: 8. Let uniqueHandle be null.
// 9. Let task be a task that runs the following substeps:
auto task = GC::create_function(vm.heap(), Function<void()>([this, handler = move(handler), timeout, arguments = move(arguments), repeat, id, initiating_script, previous_id, &vm, &realm]() {

View file

@ -55,7 +55,7 @@ GC::Ptr<NavigationTiming::PerformanceNavigation> Performance::navigation()
{
auto& realm = this->realm();
if (!m_navigation) {
// FIXME actually determine values for these
// FIXME: actually determine values for these
u16 type = 0;
u16 redirect_count = 0;

View file

@ -50,7 +50,7 @@ void MathMLMspaceElement::apply_presentational_hints(GC::Ref<CSS::CascadedProper
// If the height attribute is absent, invalid or a percentage then the requested line-ascent is 0. Otherwise the
// requested line-ascent is the resolved value of the height attribute, clamping negative values to 0.
auto height_value = parse_non_percentage_value(AttributeNames::height);
// FIXME set the line-ascent
// FIXME: set the line-ascent
// If both the height and depth attributes are present, valid and not a percentage then they are used as a
// presentational hint setting the element's height property to the concatenation of the
@ -60,7 +60,7 @@ void MathMLMspaceElement::apply_presentational_hints(GC::Ref<CSS::CascadedProper
auto depth_value = parse_non_percentage_value(AttributeNames::depth);
if (height_value && depth_value) {
// FIXME set the presentational hint to calculate height + depth
// FIXME: set the presentational hint to calculate height + depth
} else if (height_value) {
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::Height, height_value.release_nonnull());
} else if (depth_value) {

View file

@ -353,7 +353,7 @@ static void update(JS::VM& vm, GC::Ref<Job> job)
// 1. For each importUrl → storedResponse of newestWorkers script resource map:
if (false) {
// FIXME: 1. If importUrl is url, then continue.
// FIXME 2. Let importRequest be a new request whose url is importUrl, client is jobs client, destination is "script", parser metadata
// FIXME: 2. Let importRequest be a new request whose url is importUrl, client is jobs client, destination is "script", parser metadata
// is "not parser-inserted", and whose use-URL-credentials flag is set.
// FIXME: 3. Set importRequests cache mode to "no-cache" if any of the following are true:
// * registrations update via cache mode is "none".

View file

@ -34,10 +34,10 @@ WebIDL::ExceptionOr<Vector<GC::Root<DOM::Node>>> XMLFragmentParser::parse_xml_fr
feed.append(qualified_name);
feed.append('>');
// FIXME
// FIXME:
// declaring all the namespace prefixes that are in scope on that element in the DOM,
// FIXME
// FIXME:
// as well as declaring the default namespace (if any) that is in scope on that element in the DOM.
// A namespace prefix is in scope if the DOM lookupNamespaceURI() method on the element would return a non-null value for that prefix.
// The default namespace is the namespace for which the DOM isDefaultNamespace() method on the element would return true.

View file

@ -279,7 +279,7 @@ void WebSocket::read_server_handshake()
}
if (parts[1] != "101") {
// 1. If the status code is not 101, handle as per HTTP procedures.
// FIXME : This could be a redirect or a 401 authentication request, which we do not handle.
// FIXME: This could be a redirect or a 401 authentication request, which we do not handle.
fail_opening_handshake(ByteString::formatted("Server HTTP Handshake return status {} which isn't supported", parts[1]));
return;
}

View file

@ -393,7 +393,7 @@ TEST_CASE(days_since_epoch)
EXPECT_EQ(days_since_epoch(2'147'483'647, 1, 1), 784351576412); // Guess: 784351576411
EXPECT_EQ(days_since_epoch(2'147'483'647, 12, 31), 784351576776); // Guess: 784351576777
EXPECT_EQ(days_since_epoch(2'147'483'647, 12, 255), 784351577000);
// FIXME shouldn't crash: EXPECT_EQ(days_since_epoch(2'147'483'647, 255, 255), 784351577000);
// FIXME: shouldn't crash: EXPECT_EQ(days_since_epoch(2'147'483'647, 255, 255), 784351577000);
// FIXME: Restrict interface to only take sensible types, and ensure callers pass only sensible values for that type.
}