Shannon Booth
af2bcc3b56
LibWeb: Remove Weakable from Web::Page
...
Nothing requires this any more.
2023-12-05 09:38:32 +01:00
Shannon Booth
fd7be22653
LibWeb: Make TraversableNavigable store Page member as NonnullGCPtr
2023-12-05 09:38:32 +01:00
Andreas Kling
bf4c8f4a09
LibWeb: Make BrowsingContext store Page member as NonnullGCPtr
...
No need to use WeakPtr anymore.
Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-12-05 09:38:32 +01:00
Andreas Kling
7c926d04b7
LibWeb: Make BrowsingContextGroup store Page member as NonnullGCPtr
...
No need to use WeakPtr anymore.
2023-12-05 09:38:32 +01:00
Shannon Booth
289ea2db9c
LibWeb: Make ImageRequest store Page member as NonnullGCPtr
...
Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-12-05 09:38:32 +01:00
Shannon Booth
d277ac72e6
LibWeb: Make SharedImageRequest store Page member as NonnullGCPtr
...
This allows us to remove one raw Web::Page& member. Or rather, it
becomes a JS::NonnullGCPtr that we trace like anything else. :^)
Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-12-05 09:38:32 +01:00
Shannon Booth
0ae5c070c7
LibWeb: Make Web::Page GC-allocated
...
This is a first step towards removing the various Page& and Page*
we have littering the engine with "trust me bro" safety guarantees.
Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-12-05 09:38:32 +01:00
Shannon Booth
6e6f3a9a8f
LibWeb: Make Web::PageClient GC-allocated
...
This is a first step towards simplifying the ownership model of
Web::Page. Soon Web::Page will store its WebClient as a
NonnullGCPtr to help solve lifetime issues of the client being
destroyed before the page.
2023-12-05 09:38:32 +01:00
Aliaksandr Kalenik
5c0cd0f484
LibAccelGfx+LibWeb: Add text shadow support in GPU painter
2023-12-05 09:09:56 +01:00
Aliaksandr Kalenik
b5f9c1d003
LibWeb: Use glyph run to represent text in PaintTextShadow command
...
Given that we have a glyph run where the position of each glyph is
calculated for text fragments during layout, we can reuse it to avoid
this work during painting.
2023-12-05 09:09:56 +01:00
Timothy Flynn
05c8d5ba57
Base+Ladybird: Move Ladybird-related HTML files to their own folder
...
Pages like the new tab page, error page, etc. all belong solely to
Ladybird, but are scattered across a couple of subfolders in Base. This
moves them all to Base/res/ladybird.
2023-12-04 19:46:35 -05:00
Bastiaan van der Plaat
2107ab823d
LibWeb: Add basic HTML meter element support
2023-12-04 19:54:43 +00:00
Bastiaan van der Plaat
761d824b72
LibWeb: Add basic parse floating point number function
2023-12-04 19:54:43 +00:00
Bastiaan van der Plaat
3175557cb8
LibWeb: Update progressbar colors to be more pleasant
2023-12-04 19:54:43 +00:00
Timothy Flynn
1236cbd41a
LibWeb+LibWebView+WebContent: Add Inspector IPCs to manipulate DOM nodes
...
This adds the IDL methods and IPC to forward DOM-editing events from the
Inspector WebView to the Inspector client.
2023-12-04 01:33:57 +01:00
Timothy Flynn
18a4455d43
LibWeb: Do not assume a shadow root has a host
...
After commit ff48b7333c
, we remove shadow
roots from elements that are removed from the DOM. Setting a node's
shadow root to null also sets that shadow root's host to null. Thus, the
comment in Node::is_shadow_including_descendant_of that assumes the host
is always non-null is not true.
The test added here would previously crash when interacting with a node
that is a descendant of a removed shadow root.
2023-12-04 01:33:57 +01:00
Timothy Flynn
fd297a3248
LibWeb: Run the unfocusing steps when a click does not focus anything
...
For example, when clicking the document body outside of a focused input
element, we should unfocus that element.
2023-12-04 01:33:57 +01:00
Timothy Flynn
48240a6fc3
LibWeb: Focus the document element when unfocusing an element
...
Otherwise, the currently focused element remains focused.
2023-12-04 01:33:57 +01:00
Timothy Flynn
3c0c300039
LibWeb: Check all entries in the focus chain when unfocusing a node
...
The way this step was currently implemented, we would bail the unfocus
steps if the node isn't the first entry in the chain.
2023-12-04 01:33:57 +01:00
Timothy Flynn
08ee48606d
LibWeb: Fire a change event on input elements in the focus update steps
...
This ensures the change event is received before the blur event.
2023-12-04 01:33:57 +01:00
Timothy Flynn
301d58e2d9
LibWeb: Fire the change
event synchronously when committing changes
...
The spec does not say to do this asynchronously on a task queue.
2023-12-04 01:33:57 +01:00
Andreas Kling
ec081a2ef5
LibWeb: Don't crash on FormData.append() with emoji in name
...
If you can believe it, we were once again using StringBuilder's append()
when we really wanted append_code_point().
2023-12-04 00:04:04 +01:00
Andreas Kling
0d74ced9b5
LibWeb: Don't crash on Document.createElement() with emoji in tag name
...
Once again, we were mistakenly using StringBuilder's append(char) when
we really wanted append_code_point(u32).
2023-12-04 00:04:04 +01:00
Andreas Kling
1b81e0081d
LibWeb: Don't crash on Element.setAttribute() with emoji in name
...
We were mistakenly using StringBuilder's append(char) when we really
wanted append_code_point(u32).
2023-12-04 00:04:04 +01:00
Andreas Kling
dbca63a1db
LibWeb: Don't get stuck in TreeWalker.nextNode() when current detached
...
This fixes a hang on https://reddit.com/
Spec bug: https://github.com/whatwg/dom/issues/1102
2023-12-03 23:16:26 +01:00
Aliaksandr Kalenik
f93cab7679
LibWeb/Painting: Use scaled font for selected text
...
Fixes regression introduced in:
681771d210
2023-12-03 23:16:17 +01:00
Timothy Flynn
b7c0815469
LibWeb: Remove DeprecatedString usage from HTMLScriptElement's text
...
There was some awkward timing between these APIs being added and the
methods they use being ported to String.
2023-12-03 14:48:36 -05:00
Andreas Kling
c0bacc6c4b
LibWeb: Fix two bad capture-by-reference bugs caught by ASAN
...
In both cases, related to fetching/loading modules.
2023-12-03 20:46:55 +01:00
Andreas Kling
62361e40a1
LibWeb: Set a TemporaryExecutionContext when finishing module loads
...
I'm not entirely sure why this is needed, but it's the same ol'
workaround we're using in a bazillion places where we get caught trying
to do JavaScripty things without a running execution context.
2023-12-03 20:46:55 +01:00
Andreas Kling
8b7d27b349
LibJS+LibWeb: More bringing module loading closer to spec
...
In particular, this patch removes three host hooks on JS::VM in favor
of the new JS-side module loading stuff.
2023-12-03 20:46:55 +01:00
Andreas Kling
07f567cd9f
LibJS+LibWeb: Another round of bringing module loading closer to spec
...
In particular, this patch focuses on:
- Updating the old "import assertions" to the new "import attributes"
- Allowing realms as module import referrer
2023-12-03 20:46:55 +01:00
Andreas Kling
b08683e588
LibWeb: Don't capture stack variables by reference in MainThreadVM hooks
2023-12-03 20:46:55 +01:00
Andreas Kling
0817d8bda6
LibJS+LibWeb: Make CyclicModule & GraphLoadingState GC-allocated
...
This allows them to participate in the ownership graph and fixes a
lifetime issue in module loading found by ASAN.
Co-Authored-By: networkException <networkexception@serenityos.org>
2023-12-03 20:46:55 +01:00
Bastiaan van der Plaat
01f000acb0
LibWeb: Add HTML col element span attribute
2023-12-03 20:29:14 +01:00
Bastiaan van der Plaat
7e6fc9c26e
LibWeb: Add textarea cols and rows attribute
2023-12-03 20:29:14 +01:00
Bastiaan van der Plaat
f3db0003c2
LibWeb: Add script element text getter setter
2023-12-03 20:29:14 +01:00
Bastiaan van der Plaat
529fd0a65c
LibWeb: Add HTML legend element form getter
2023-12-03 20:29:14 +01:00
Bastiaan van der Plaat
fb7b03d162
LibWeb: Add support for the input size attribute
2023-12-03 20:29:14 +01:00
Kenneth Myhra
000ea9d73b
LibWeb: Avoid crashing because of empty incumbent settings object stack
...
This fixes an issue where we end up in a state where we have no
execution context + a main thread event loop with an empty incumbent
settings object stack.
2023-12-03 20:28:10 +01:00
Shannon Booth
48aa9fbe07
LibWeb: Implement ReadableByteStreamController.enqueue
2023-12-03 20:26:14 +01:00
Shannon Booth
feb7fbb95d
LibWeb: Implement ReadableStreamBYOBRequest.respond
...
The parameter in IDL is left as an unsigned long instead of an unsigned
long long as the IDL generator does not currently support that.
2023-12-03 20:26:14 +01:00
Shannon Booth
08be5deb3f
LibWeb: Implement AO ReadableByteStreamControllerRespond
2023-12-03 20:26:14 +01:00
Shannon Booth
2ab933e534
LibWeb: Implement AO ReadableByteStreamControllerRespondInternal
2023-12-03 20:26:14 +01:00
Shannon Booth
426cbd8ed3
LibWeb: Implement AO ReadableByteStreamControllerRespondInClosedState
2023-12-03 20:26:14 +01:00
Shannon Booth
be2195cb8c
LibWeb: Implement AO ReadableByteStreamControllerRespondInReadableState
2023-12-03 20:26:14 +01:00
Shannon Booth
0245be70d8
LibWeb: Implement Streams AO CanTransferArrayBuffer
2023-12-03 20:26:14 +01:00
Shannon Booth
9d0700e770
LibWeb: Fix IDL getter for ReadableByteStreamController byobRequest
...
We were previously only returning the controllers current
[[byobRequest]] instead of taking into account pending pull intos.
Rename the getter function which would return the controllers
[[byobRequest]] slot to `raw_byob_request` to differentiate it from
the IDL getter.
This also leaves a FIXME for a spec step which we are also not currently
implementing correctly.
2023-12-03 20:26:14 +01:00
Shannon Booth
1e607f5775
LibWeb: Fix some missing initialize overrides for some Streams classes
...
This is some more motivation for me to get around to automatically
generate these initialize calls at some point.
2023-12-03 20:26:14 +01:00
Shannon Booth
b2a0a41503
LibWeb: Use TypedArrayBase::kind for pull into constructor lookup
2023-12-03 20:26:14 +01:00
Shannon Booth
a9a3dcd952
LibWeb: Use ArrayBufferView in ReadableStreamBYOBRequest
2023-12-03 20:26:14 +01:00