Andreas Kling
a6dfc74e93
LibWeb: Only set prototype once for object with IDL interface
...
Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.
Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.
This knocks off a ~1% profile item on Speedometer 3.
2025-04-20 18:43:11 +02:00
Sam Atkins
9dbeecb73d
LibWeb: Correct some spec typos
...
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
2025-04-10 04:01:37 +02:00
Viktor Szépe
5cc371d54c
LibWeb: Fix typos - act II
2025-04-09 15:05:20 +01:00
Shannon Booth
a5df972055
LibWeb: Do not store network errors as a StringView
...
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
This is very clearly a very dangerous API to have, and was causing
a crash on Linux as a result of a stack use-after-free when visiting
https://www.index.hr/ .
Fixes #3901
2025-04-02 11:43:53 +02:00
Psychpsyo
aa243000f3
LibWeb: Implement TimeRanges and HTMLMediaElement.seekable()
2025-02-18 10:45:32 -07:00
Psychpsyo
3952ff4786
LibWeb: Add a stub for HTMLMediaElement.played()
2025-02-18 10:45:32 -07:00
Psychpsyo
14e354bc29
LibWeb: Implement playbackRate
2025-02-10 11:38:02 +00:00
Shannon Booth
903c8860f8
LibWeb: Add metadata to children update steps invocation
...
Currently, this metadata is only provided on the insertion steps,
though I believe it would be useful to extend to the other cases
as well. This metadata can aid in making optimizations for these
steps by providing extra context into the type of change which
was made on the child.
2025-01-30 13:55:40 -07:00
Shannon Booth
14eb081af8
LibWeb: Add missing calls to Base::children_changed
...
Also making sure that it is called at the top of the implementation
for consistency.
2025-01-27 00:10:14 +00:00
Shannon Booth
22a7cd9700
LibWeb: Port Document encoding_parse_url and parse_url to Optional<URL>
...
This ports two more APIs away from URL::is_valid.
2025-01-27 00:03:07 +00:00
Andreas Kling
7269fc3e52
LibWeb: Pass old parent's root to Node::removed_from()
...
This will allow nodes to access the root they've just been removed from.
2025-01-23 21:38:31 +01:00
Timothy Flynn
85b424464a
AK+Everywhere: Rename verify_cast
to as
...
Follow-up to fc20e61e72
.
2025-01-21 11:34:06 -05:00
Timothy Flynn
27478ec7d4
Everywhere: Run clang-format
...
The following command was used to clang-format these files:
clang-format-19 -i $(find . \
-not \( -path "./\.*" -prune \) \
-not \( -path "./Build/*" -prune \) \
-not \( -path "./Toolchain/*" -prune \) \
-type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2024-12-28 05:39:32 -08:00
Andreas Kling
3bfb0534be
LibGC: Rename MarkedVector => RootVector
...
Let's try to make it a bit more clear that this is a Vector of GC roots.
2024-12-26 19:10:44 +01:00
Andrew Kaster
202bf901d7
LibWeb: List supported media types publicly for HTMLMediaElement
2024-12-25 12:02:39 +01:00
Sam Atkins
aa29a3ff6b
LibWeb/HTML: Update resource fetch algorithm to match current spec
...
Changes from https://github.com/whatwg/html/pull/10792
No code changes, only comments.
2024-12-18 19:22:44 +00:00
Shannon Booth
0fa54c2327
LibURL+LibWeb: Make URL::serialize return a String
...
Simplifying a bunch of uneeded error handling around the place.
2024-12-04 16:34:13 +00:00
Shannon Booth
f87041bf3a
LibGC+Everywhere: Factor out a LibGC from LibJS
...
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:
* JS::NonnullGCPtr -> GC::Ref
* JS::GCPtr -> GC::Ptr
* JS::HeapFunction -> GC::Function
* JS::CellImpl -> GC::Cell
* JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
d4f8b598cb
LibWeb: Consolidate the attribute change handlers
...
We currently have 2 virtual methods to inform DOM::Element subclasses
when an attribute has changed, one of which is spec-compliant. This
patch removes the non-compliant variant.
2024-11-14 15:39:02 +01:00
Shannon Booth
9b79a686eb
LibJS+LibWeb: Use realm.create<T> instead of heap.allocate<T>
...
The main motivation behind this is to remove JS specifics of the Realm
from the implementation of the Heap.
As a side effect of this change, this is a bit nicer to read than the
previous approach, and in my opinion, also makes it a little more clear
that this method is specific to a JavaScript Realm.
2024-11-13 16:51:44 -05:00
Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00
Luke
e8a9e8aed5
LibWeb: Add namespace to Element
2020-10-22 15:24:42 +02:00
Luke
1fbe4b2a2f
LibWeb: Add all HTML elements between L and Q
2020-08-09 21:14:51 +02:00