mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Convert Ladybird notes in spec steps to // NB: ...
We have a couple of ways to designate spec notes and (our) developer notes in comments, but we never really settled on a single approach. As a result, we have a bit of a mixed bag of note comments on our hands. To the extent that I could find them, I changed developer notes to `// NB: ...` and changed spec notes to `// NOTE: ...`. The rationale for this is that in most web specs, notes are prefixed by `NOTE: ...` so this makes it easier to copy paste verbatim. The choice for `NB: ...` is pretty arbitrary, but it makes it stand out from the regular spec notes and it was already in wide use in our codebase.
This commit is contained in:
parent
9394c9a10b
commit
41eb7251e4
Notes:
github-actions[bot]
2025-11-18 14:09:02 +00:00
Author: https://github.com/gmta
Commit: 41eb7251e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6841
Reviewed-by: https://github.com/trflynn89
11 changed files with 52 additions and 44 deletions
|
|
@ -154,9 +154,9 @@ bool HTMLButtonElement::has_activation_behavior() const
|
|||
return true;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:activation-behaviour
|
||||
void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
{
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:activation-behaviour
|
||||
// 1. If element is disabled, then return.
|
||||
if (!enabled())
|
||||
return;
|
||||
|
|
@ -223,8 +223,12 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
|||
return;
|
||||
}
|
||||
|
||||
// 5. Let continue be the result of firing an event named command at target, using CommandEvent, with its command attribute initialized to command, its source attribute initialized to element, and its cancelable and composed attributes initialized to true.
|
||||
// SPEC-NOTE: DOM standard issue #1328 tracks how to better standardize associated event data in a way which makes sense on Events. Currently an event attribute initialized to a value cannot also have a getter, and so an internal slot (or map of additional fields) is required to properly specify this.
|
||||
// 5. Let continue be the result of firing an event named command at target, using CommandEvent, with its
|
||||
// command attribute initialized to command, its source attribute initialized to element, and its cancelable
|
||||
// and composed attributes initialized to true.
|
||||
// NOTE: DOM standard issue #1328 tracks how to better standardize associated event data in a way which makes
|
||||
// sense on Events. Currently an event attribute initialized to a value cannot also have a getter, and so
|
||||
// an internal slot (or map of additional fields) is required to properly specify this.
|
||||
CommandEventInit event_init {};
|
||||
event_init.command = command;
|
||||
event_init.source = this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue