Kenneth Myhra
59a21c6274
LibWeb: Port CustomEvent to new String
2023-04-07 22:41:01 +02:00
Kenneth Myhra
4d87072201
LibWeb: Port {HTML,UIEvents,XHR}::EventNames to new String
2023-04-06 23:49:08 +02:00
Luke Wilde
32e27bc7fa
LibWeb: Add a bunch of missing CEReactions
...
This is almost guaranteed not to be all CEReactions we need to add, but
this puts us in a much better situation.
2023-04-06 11:36:56 +02:00
Luke Wilde
034aaf3f51
LibWeb: Introduce CustomElementRegistry and creating custom elements
...
The main missing feature here is form associated custom elements.
2023-04-06 11:36:56 +02:00
Kenneth Myhra
03d6cb88ff
LibWeb: Port KeyboardEvent to new String
2023-04-06 08:41:43 +02:00
Andreas Kling
d4b2544dc5
LibWeb: Make the Node.compareDocumentPosition() return value enum public
...
This will allow other parts of LibWeb to understand these values.
2023-03-30 14:12:07 +02:00
Srikavin Ramkumar
4a82f9bd03
LibWeb: Allow attachshadow for elements with valid custom element names
2023-03-28 07:18:09 -04:00
Srikavin Ramkumar
47a466865c
LibWeb: Return HTMLElement for valid custom element tag names
2023-03-28 07:18:09 -04:00
Srikavin Ramkumar
149e442c24
LibWeb: Iterate codepoints instead of characters in is_valid_name
2023-03-28 07:18:09 -04:00
Simon Wanner
9e00ef0849
LibWeb: Pass scope in ParentNode::query_selector_all
2023-03-21 10:45:19 +01:00
Simon Wanner
4e6fb65ea3
LibWeb: Pass scope in ParentNode::query_selector
2023-03-21 10:45:19 +01:00
Simon Wanner
f3ba44a9f2
LibWeb: Pass scope in Element::closest
2023-03-21 10:45:19 +01:00
Simon Wanner
d55373067d
LibWeb: Pass scope in Element::matches
2023-03-21 10:45:19 +01:00
Simon Wanner
03c225b023
LibWeb: Move Element.prototype.style to ElementCSSInlineStyle mixin
...
Also adds the `PutForwards` extended attribute allowing setting the
style property.
2023-03-20 20:37:40 -04:00
Simon Wanner
a5a3913e39
LibWeb+LibWebView: Show shadow roots in the DOM inspector
2023-03-18 20:14:52 +01:00
Timothy Flynn
8a8340b3cd
LibWeb: Port MutationRecord types to FlyString
...
Co-authored-by: Luke Wilde <lukew@serenityos.org>
2023-03-18 19:50:45 +01:00
Timothy Flynn
db2ba5f1d9
LibWeb: Initialize static web strings during main-thread VM creation
...
These are currently initialized in a [[gnu::constructor]], which has a
weird initialization order. These constructors are invoked before main()
and, incidentally, before any user-defined default constructors of the
static strings they are initializing.
This will become an issue when these strings are ported to FlyString,
which has a user-defined default constructor. In that scenario, when the
FlyString constructor is executed after the [[gnu::constructor]], the
strings will be "reset" to the empty string.
Instead of relying on a non-standard compiler extension here, let's just
initialize these strings explicitly during main-thread VM creation, as
this now happens in WebContent's main().
2023-03-18 19:50:45 +01:00
Andreas Kling
7f632ee6f8
LibWeb: Fix bogus callback comparisons in EventTarget
...
When CallbackType::callback was converted from Object& to NNGCP<Object>,
we started comparing the addresses of NNGCPs instead of the addresses of
Objects.
That broke the Discord login form, and this patch fixes it.
Regression from 7c0c1c8f49
.
2023-03-18 16:37:09 +01:00
Matthew Olsson
7c0c1c8f49
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
2023-03-15 08:48:49 +01:00
Linus Groh
4da68384e6
LibWeb/HTML: Make Window::m{location,navigator} lazily allocated
...
This now matches the other window-owned objects, which already do this:
m_crypto, m_performance, m_screen.
2023-03-11 17:53:50 +00:00
Andreas Kling
1cf5737e9e
LibWeb: Add fast_is<T>() for various types stood out in a profile
2023-03-11 10:46:26 +01:00
Andreas Kling
e8f5085669
LibWeb: Implement Range.createContextualFragment()
2023-03-10 14:58:55 +01:00
Andreas Kling
fb6d6a985f
LibWeb: Implement Element.setAttributeNode{,NS}()
2023-03-10 14:56:29 +01:00
Andreas Kling
8c5c78f1f1
LibWeb: Implement Document.createAttribute{,NS}()
2023-03-10 14:56:03 +01:00
Andreas Kling
a504ac3e2a
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
...
Let's make it clear that these functions deal with ASCII case only.
2023-03-10 13:15:44 +01:00
Aliaksandr Kalenik
9d03b57c96
LibWeb: Add readiness()
getter in Document
...
This getter returns the same readiness state of document as
`ready_state()` getter that is already present returns but without
allocating string.
2023-03-08 13:08:04 -05:00
Andreas Kling
2042993997
LibWeb: Convert DOM::Element::m_classes to the new AK::FlyString
...
This makes selector matching significantly faster by not forcing us to
convert from FlyString to DeprecatedFlyString when matching class
selectors. :^)
2023-03-08 13:19:15 +01:00
Linus Groh
606b9ff6f3
LibWeb/HTML: Port Window.getSelection() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
2b6d9cca1a
LibWeb/HTML: Port Window.scroll() to IDL
...
...with various changes required due to ScrollBehavior / ScrollOptions
moving from Element.idl to Window.idl.
2023-03-07 23:33:34 +00:00
Linus Groh
40b4ee88de
LibWeb/HTML: Port Window.scroll{X,Y} / Window.page{X,Y}Offset to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
c42496187b
LibWeb/HTML: Port Window.history to IDL
2023-03-07 23:33:34 +00:00
Luke Wilde
80fad65e5b
LibWeb: Add function to EventTarget that says if it has any listeners
...
Required by XHR to determine if it should use CORS-preflight if its
upload object has any event listeners.
2023-03-07 11:51:12 +00:00
Andreas Kling
689ca370d4
Everywhere: Remove NonnullRefPtr.h includes
2023-03-06 23:46:35 +01:00
Matthew Olsson
c0b2fa74ac
LibWeb: Fix a few const-ness issues
2023-03-06 13:05:43 +00:00
Matthew Olsson
70a2ca7fc0
LibJS: Handle both const and non-const Ts in Handle<T>::create()
...
Again, the const-ness only really involves Heap-internal metadata, so
the callers shouldn't care about mutations here.
2023-03-06 13:05:43 +00:00
Kenneth Myhra
eed69e5093
LibWeb: Port MessageEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
d0f904dd4c
LibWeb: Port MediaQueryListEvent to new String
2023-03-05 18:25:59 +00:00
Linus Groh
11b40dbcf5
LibWeb/WebIDL: Store SimpleException message as a String{,View} variant
2023-03-03 19:50:36 +00:00
Timothy Flynn
4734214ac1
LibWeb: Skip over grapheme clusters on left/right arrow key presses
...
Currently, if you use the left/right arrow keys to move over a multi-
code point glyph, we will move through that glyph one code point at a
time. This means you can "pause" your movement in the middle of a glyph
and delete a subsection of a grapheme cluster. This now moves the cursor
across the entire cluster.
2023-03-01 14:24:01 +00:00
Timothy Flynn
2c4acba883
LibWeb: Convert Web::DOM::Position::to_deprecated_string to String
2023-03-01 14:24:01 +00:00
Luke Wilde
54f58e2662
LibWeb: Restore proper functionality of legacy platform objects
...
With the GC heap conversion, the functionality of legacy platform
objects was broken. This is because the generated implementation of one
of them was used for all of them, removing functionality such as
deletion.
This re-adds all functionality, where questions such as "does the
object support indexed properties?" is instead answered by virtual
functions instead of by the IDL generator checking the presence of
certain keywords/attributes.
2023-02-28 12:36:14 +01:00
Andreas Kling
7e76a51cb0
LibWeb: Rename Layout::InitialContainingBlock to Layout::Viewport
...
The name "initial containing block" was wrong for this, as it doesn't
correspond to the HTML element, and that's specifically what it's
supposed to do! :^)
2023-02-28 12:21:56 +01:00
Kenneth Myhra
dcbe927b48
LibWeb: Make factory method of Selection::Selection fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
ec0049441c
LibWeb: Make factory methods of Geometry::DOMRect fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
9b190b9509
LibWeb: Make factory method of Geometry::DOMRectList fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
459959b297
LibWeb: Make factory method of HTML::BrowsingContext fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
ff92324fa5
LibWeb: Make factory method of DOM::ElementFactory fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
1f48081ee4
LibWeb: Make factory methods of IDLEventListener and NodeFilter fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
587cf355ed
LibWeb: Make factory methods of UIEvents::UIEvent fallible
...
This affects calls to FocusEvent::create() since FocusEvent does not
implement its own create() method.
2023-02-22 09:55:33 +01:00
Kenneth Myhra
a401cff4e2
LibWeb: Make factory methods of UIEvents::KeyboardEvent fallible
2023-02-22 09:55:33 +01:00