This change implements the download, ping, rel, hreflang, and type
attributes using the [Reflect] annotation in the IDL file.
(cherry picked from commit 7562f89d4e2b0dd22430962e102a2195186f8458)
Add fetch group concept from the '2.4. Fetch groups' in
the fetch specs to the environment settings object.
(cherry picked from commit 9e223f6daeb3969d3997084a973b26daff6b4f7e)
Previously, `Node::is_equal_node()` would return true for nodes in
different namespaces that were otherwise equal.
(cherry picked from commit 7ab7be694d1232f4cdc108a2adc88812fc0a9ca9)
This matches the behavior of other browsers. Previously, a click event
was used, so the value was only updated when the mouse was released.
(cherry picked from commit b4b947c60797328d930c8d3de466b8ef292d0ed4)
An input event is now fired when the step up or step down button of an
input element of type number is clicked.
This ensures that any associated <output> element is updated when these
buttons are clicked.
(cherry picked from commit 2a980816e756d727261d53450b4b3f48069d5d50)
Input elements without a defined user-interaction behavior need to fire
an input event when the user changes the element's value in some way.
This change moves the code to do this into its own function and adds
some spec text to explain what is being done.
(cherry picked from commit a3d12e569c88d0dae530657e5bddc18699fb9c9b)
The spec allows setting a constructor on non built-in Iterator objects.
This is a normative change in the Iterator Helpers proposal. See:
https://github.com/tc39/proposal-iterator-helpers/commit/30b3501
(cherry picked from commit fb228a3d850eb5e4b06550823755719a377b41e6)
The spec allows setting the prototype on non built-in Iterator objects.
This is a normative change in the Iterator Helpers proposal. See:
https://github.com/tc39/proposal-iterator-helpers/commit/30b3501
(cherry picked from commit 734e37442db4419b58228e25702bfe176e52f5e3)
The EntryType has three possible values: Fetching, Failed or
ModuleScript. It is possible that we transition from Fetching to Failed
as in #13.1. Change the assertion to include the failed scenario.
Fixes: https://github.com/LadybirdBrowser/ladybird/issues/661
(cherry picked from commit 319bb6353e0ba64fc5e54b32ddb2b38736cedef9)
This fixes some bugs on wpt.dom/events/Event-init-while-dispatching.html,
although the test still fails due to [GH-23722].
[GH-23722]: https://github.com/SerenityOS/serenity/issues/23722
(cherry picked from commit aefab1de38948b0d86a6aed33647e995340859e2)
- Change min track sizing function to be "auto" when flex size is
specified.
- Never check if min track sizing funciton is flexible, because only
max is allowed to be flexible.
- Address FIXME in automatic_minimum_size to avoid regressions after
making two fixes mentioned above.
(cherry picked from commit 3270df476dd46b140e1b9de1e8328647744b56ab)
Areas are disassembled into boundary lines on `build_grid_areas()` step,
so we can always use them to find grid item's position during placement.
This way we support both ways to define area: `grid-template-areas` and
implicitly using `-start` and `-end` boundary line names.
(cherry picked from commit 7a1f3f7ae3af2744e2f99df29baf09153d631b24)
We're expected to handle this situation gracefully, and certainly not
by falling apart like we were.
Found by Domato.
(cherry picked from commit 33207174a9c1c87657e2ae0875cc85cbf41075f8)
If the anchor and focus nodes are not within the same document, we can't
use them for a selection range.
Found by Domato.
(cherry picked from commit 416c4788763baa778465d1d004080d322462c0bf)
Instead of allowing arbitrarily large values (which could eventually
overflow an i32), let's just cap them at the same limit as Firefox does.
Found by Domato.
(cherry picked from commit 4e0edd42b95abf8ad707c64414dbe618313ce89e)
We were incorrectly assuming that setAttribute() could never fail here,
even when passed an invalid name.
Found by Domato.
(cherry picked from commit 093f1dd805f699801079f55d0d490d80b463ccbb)
We already have a FlyString of its value from parsing, and most users
also want a FlyString from it, so let's use that instead of converting
backwards and forwards.
The two users that did want a String are:
- Quotes, which make sense as FlyString instead, so I've converted that.
- Animation names, which should probably be FlyString too, but the code
currently also allows for other kinds of StyleValue, and I don't want
to dive into this right now to figure out if that's needed or not.
(cherry picked from commit 9fb44cb05777c6d7a8a1950258edadfcee6d4e09)
This does not appear to be correct; the `grid-area` property's value is
quite complicated, and not just a string.
(cherry picked from commit d2f04b9f0415ebfebb1d8f6386ff13f8df053674)
This PR adds basic support for loading iCalendar (.ics) files and
parsing VEVENT properties that are currently supported by Calendar
Events: summary, start and end.
The JS::Error types all store their exception messages as a String. So
by using ByteString, we hit the StringView constructor, and end up
allocating the same string twice.
(cherry picked from commit c3f8202d0ca7761caaabf0af5f413dc25337801f)
We had a const and non-const version of this function, with slightly
different behavior (oops!)
This patch consolidates the implementations and keeps only the correct
behavior in there.
Fixes an issue where comments were not collapsible on Hacker News.
(cherry picked from commit 98f88d49de852e1e524655accb39724f1134a23f)
These were being immediately stored in JS::GCPtrs (and dutifully visited
by HTMLParser), so creating temporary handles for them was a complete
waste of time.
(cherry picked from commit f9f11dc51d50746ccb1a82cd304fe30901edc347)
When loading a canned version of reddit.com, we end up parsing many many
shadow tree style sheets of roughly ~170 KiB text each.
None of them have '\r' or '\f', yet we spend 2-3 ms for each sheet just
looping over and reconstructing the text to see if we need to normalize
any newlines.
This patch makes the common case faster in two ways:
- We use TextCodec::Decoder::to_utf8() instead of process()
This way, we do a one-shot fast validation and conversion to UTF-8,
instead of using the generic code-point-at-a-time callback API.
- We scan for '\r' and '\f' before filtering, and if neither is present,
we simply use the unfiltered string.
With these changes, we now spend 0 ms in the filtering function for the
vast majority of style sheets I've seen so far.
(cherry picked from commit dba6216caa71796f25831908035cd9eb0fb54715)
When appending a single Unicode code point, we don't have to go through
the trouble of creating a Utf32View wrapper over it.
(cherry picked from commit 7892ee355df95f6414ab5334d8d997c2c0356a45)
Implement for CreatePerIterationEnvironment for 'for' loops per the Ecma
Standard. This ensures each iteration of a 'for' loop has its own
lexical environment so that variables declared in the loop are scoped to
the current iteration.
(cherry picked from commit dbc2f7ed48f00234f5f94a30b06b83842d9cf4dd)
When traversing the layout tree to find an appropriate box child to
derive the baseline from. Only the child's margin and offset was being
applied. Now we sum each offset on the recursive call.
(cherry picked from commit 3c897e7cf3594f02f559599e1bf28747c9edba13)
The LibELF validate_program_headers method tried to do too many things
at once, and as a result, we had an awkward return type from it.
To be able to simplify it, we no longer allow passing a StringBuilder*
but instead we require to pass an Optional<Elf_Phdr> by reference so
it could be filled with actual ELF program header that corresponds to
an INTERP header if such found.
As a result, we ensure that only certain implementations that actually
care about the ELF interpreter path will actually try to load it on
their own and if they fail, they can have better diagnostics for an
invalid INTERP header.
This change also fixes a bug that on which we failed to execute an ELF
program if the INTERP header is located outside the first 4KiB page of
the ELF file, as the kernel previously didn't have support for looking
beyond that for that header.
Together with a first JSON file for bringing up a fully functional
BuggieBox container, we allow users to take advantage of the kernel
unsharing features that were introduced in earlier commits.