Bastiaan van der Plaat
466153e680
Ladybird+LibWeb: Add basic select element support
2023-12-09 22:06:20 +01:00
Bastiaan van der Plaat
b439431488
LibWeb: Allow hr elements in select and optgroup elements
2023-12-09 22:06:20 +01:00
Andrew Kaster
bab9e75a96
LibWeb: Implement Structured{De}SerializeWithTransfer for transferables
...
This first cut at these APIs only works for platform objects that
implement the Transferable interface from Bindings.
2023-12-09 21:52:28 +01:00
Andrew Kaster
e21d1078a0
LibWeb: Add a Transferable interface to model the transferable property
...
This property is only shared by MessagePort and a few Image related APIs
but is important for the Structured{De}SerializeWithTransfer AOs.
2023-12-09 21:52:28 +01:00
Bastiaan van der Plaat
fef7571931
LibWeb: Add output element value
2023-12-09 21:50:17 +01:00
Bastiaan van der Plaat
f8509e2183
LibWeb: Add input number up down UI buttons
2023-12-09 21:49:38 +01:00
Bastiaan van der Plaat
3bfc2f5e95
LibWeb: Declare optional parse results inlined in if
statements
2023-12-07 16:46:50 -05:00
Bastiaan van der Plaat
1b9a961fb0
LibWeb: Add input stepUp and stepDown functions
2023-12-07 16:46:28 -05:00
Bastiaan van der Plaat
1a63639518
LibWeb: Move logic to check if valueAsNumber applies to its own function
2023-12-07 16:46:28 -05:00
Bastiaan van der Plaat
c0751b2a49
LibWeb: Add basis of the convert number to string algorithm functions
2023-12-07 16:46:28 -05:00
Reimar
4299fb604b
LibWeb: Add window.status property
2023-12-07 11:02:50 -07:00
Dan Klishch
d317309d89
Everywhere: Unport Core::System::current_executable_path from new string
...
Storing paths in AK::String is never correct.
2023-12-07 10:13:21 -07:00
Bastiaan van der Plaat
4966c083df
LibWeb: Remove progress element custom paintable use shadow dom instead
2023-12-07 11:37:01 +01:00
Bastiaan van der Plaat
ca94df3c88
LibWeb: Clean up shadow root of meter element
2023-12-07 11:37:01 +01:00
Andreas Kling
2d69a009fb
LibWeb: Make more JS modules actually run
...
First, we had a logic typo where we were checking parse errors for
non-empty instead of non-null. Fixing this caused more modules to
actually start executing.
As usual, this tripped on some "empty backup incumbent settings object
stack" bugs, so this patch also pushes a module execution context in
two places where it makes sense.
Co-Authored-By: networkException <networkexception@serenityos.org>
2023-12-06 12:58:04 +01:00
Shannon Booth
0cb0d60ac5
LibWeb: Make BrowsingContextGroup & TraversableNavigable return a Page&
...
Removing another batch of uneeded null checks :^)
2023-12-05 09:38:32 +01:00
Shannon Booth
88f8ea7c60
LibWeb: Make BrowsingContex::page() return a Page&
...
This exposed a whole slew of now-unnecessary null checks. :^)
Co-Authored-By: Andreas Kling <kling@serenityos.org>
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
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
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
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
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
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
Shannon Booth
f976ec005c
LibWeb: Port DOM::Document from DeprecatedString
2023-12-02 22:54:53 +01:00
Shannon Booth
c4d3134436
LibWeb: Port NavigatorLanguage from DeprecatedString
2023-12-02 22:54:53 +01:00
Shannon Booth
a8f5ebeddd
LibWeb: Port DOM::Node from DeprecatedString
2023-12-02 22:54:53 +01:00
Shannon Booth
2cf3819caf
LibWeb: Port HTMLFieldSetElement from DeprecatedString
2023-12-02 22:54:53 +01:00
Shannon Booth
cc43dbf56e
LibWeb: Port HTMLTextAreaElement from DeprecatedString
2023-12-02 22:54:53 +01:00
Kemal Zebari
24b9d05ea8
LibWeb/HTML: Implement text attribute in HTMLTitleElement
2023-12-02 10:35:43 +01:00
Timothy Flynn
7e92ff062e
LibWeb: Update the document's cursor after setting an <input>'s value
...
The spec step here explicitly says to "move the text entry cursor
position to the end of the text control".
2023-12-02 10:34:22 +01:00
Timothy Flynn
7edfeb7056
LibWeb: Support committing changes to <input> elements
...
We currently fire the change event on <input> elements when they lose
focus. The spec allows for us to also fire the event when changes are
"committed", so long as such an action makes sense for the input type.
This patch detects when the return key is entered in an <input> element
and uses that as the commit action for text-related types. If no change
has occurred since the last commit, no change event is fired.
2023-12-02 10:34:22 +01:00
Sam Atkins
ef1e942f3e
LibWeb: Use String for getting/setting MediaQueryList media
2023-12-01 20:48:13 +01:00
Sam Atkins
72376ad15a
LibWeb: Add special "potentially delay the load event" logic for iframes
...
`<iframe>`s only potentially delay the load event when their
`current_navigation_was_lazy_loaded` flag is false, so let's wire that
up to the flag's setter, and actually call it!
2023-12-01 10:28:02 +01:00
Sam Atkins
7f509317fd
LibWeb: Allow NavigableContainers to report whether to delay load event
...
Four elements match the "potentially delay the load event" check in the
spec: `<embed>`, `<frame>`, `<iframe>`, and `<object>`. These four are
the same set of elements that are NavigableContainers (or will be once
we implement them) so let's put this logic there.
Note that other things can delay the load event, this is just the name
the spec gives to this particular behaviour.
2023-12-01 10:28:02 +01:00
Sam Atkins
6c5450f9ce
LibWeb: Report if anything is delaying load event, not the count
...
Some elements that delay the load event are more complicated than a
simple count will allow for. We'll implement those in a bit!
2023-12-01 10:28:02 +01:00