Kenneth Myhra
90fdd598c2
LibWeb: Make sure we do not generate duplicate variable names
2023-07-15 11:59:39 +02:00
Sam Atkins
618c0402a7
LibWeb: Generate parsing code for CSS math functions
2023-07-15 10:23:33 +02:00
Ali Mohammad Pur
efa55673cd
Meta/CodeGenerators+LibWeb: Add support for 'easing-function' CSS values
...
This commit makes it possible to let properties accept easing functions
as values, which will be used in a later commit to implement
animation-timing-function.
2023-07-13 05:10:41 +02:00
Ali Mohammad Pur
dd073b2711
Meta/CodeGenerators+LibWeb: Implement parsing CSS easing functions
...
This only implements the parser bits, no functionality is implemented,
and no properties are parsed because of this.
2023-07-13 05:10:41 +02:00
Luke Wilde
165abafb80
LibWeb: Add initial implementation of IntersectionObserver
...
The main missing features are rootMargin, proper nested browsing
context support and content clip/clip-path support.
This makes images appear on some sites, such as YouTube and
howstuffworks.com.
2023-07-07 05:27:25 +02:00
Jonah
e9840bfd4e
LibWeb: Build out the ARIA role model
...
We now have implemented the ARIA role model. These classes will
control which states and properties are exposed to end users.
2023-07-06 11:21:36 +01:00
Sam Atkins
38f954cba5
LibWeb: Generate function for what properties resolve percentages to
...
This is required by "determine the type of a calculation".
https://www.w3.org/TR/css-values-4/#determine-the-type-of-a-calculation
2023-07-06 09:28:16 +02:00
Daniel
30e67721ae
Meta: Fix IDL binding generation for dictionary members
...
- Previously was generating bad syntax and missed a snakecase conversion
2023-06-28 05:22:51 +02:00
Sam Atkins
acaf2368ad
CodeGenerators: Port GenerateCSSValueID to new SourceGenerator API
2023-06-17 17:48:06 +01:00
Sam Atkins
acb600496b
CodeGenerators: Port GenerateCSSTransformFunctions to new SourceGen API
2023-06-17 17:48:06 +01:00
Sam Atkins
d197b4b051
CodeGenerators: Port GenerateCSSPropertyID to new SourceGenerator API
2023-06-17 17:48:06 +01:00
Sam Atkins
e7dd5e5b05
CodeGenerators: Port GenerateCSSMediaFeatureID to new SourceGen API
2023-06-17 17:48:06 +01:00
Sam Atkins
17473e3d5e
CodeGenerators: Port GenerateCSSEnums to new SourceGenerator API
2023-06-17 17:48:06 +01:00
Sam Atkins
8e53e5afc4
AK: Propagate errors from SourceGenerator::fork()
2023-06-17 17:48:06 +01:00
Sam Atkins
540cc42618
CodeGenerators: Convert GeneratorUtil to String
...
I may have got a little carried away propagating some of the errors. :^)
2023-06-17 17:48:06 +01:00
Sam Atkins
5cdcd135ab
LibWeb: Add parsing for CSS <paint>
values
...
This gets rid of a couple of FIXMEs in Properties.json :^)
2023-06-16 07:03:57 +02:00
Timothy Flynn
6520a9a849
LibWeb: Support TrackEvent instances with an AudioTrack track type
2023-06-14 17:54:40 +02:00
Sam Atkins
5e3da93f1a
LibWeb: Add RatioStyleValue and parsing
2023-06-09 20:37:51 +02:00
Andreas Kling
7f90b0cab7
LibWeb: Don't override prototype on generated iterator prototypes
...
Generated iterator prototypes already have the IteratorPrototype as
their prototype, but we were incorrectly hijacking them and rerouting
to ObjectPrototype.
Regressed in cfe663435e
.
2023-06-08 10:05:56 +02:00
Andreas Kling
941092e3ad
LibWeb: Make CSS/Properties.json "logical-aliases-for" an array
...
This allows us to specify all aliases properties instead of just one.
2023-06-06 21:02:04 +02:00
Sam Atkins
2d7308cb88
LibWeb: Support infinite range for CSS properties
...
This makes `[-∞,∞]` generate valid code, instead of `return ;`
2023-06-02 20:04:23 +02:00
Sam Atkins
51f75d7071
LibWeb: Generate bounds-checking functions for CSS basic types
2023-06-02 17:46:35 +02:00
Ali Mohammad Pur
0e3fb39a0a
LibWeb: Make 'optional BufferSource' IDL arguments actually optional
...
Previously this was compiled to require an object despite the IDL file
specifying 'optional'.
This commit makes IDLGenerator respect this modifier, and fixes the only
affected instance.
2023-05-30 12:50:13 +02:00
Ali Mohammad Pur
279924242d
LibWeb: Add CSS CompositeStyleValue
...
This represents the value of properties assigned via their shorthands,
and is expanded when computing actual property values.
2023-05-29 05:35:41 +02:00
Karthik Karanth
72507c318a
LibWeb: Add logical-alias-for in Properties.json
...
This allows for succint definitions of logical properties, by allowing
them to inherit initial values, valid identifiers, etc from another
property
2023-05-27 16:02:33 +02:00
Matthew Olsson
f63d027b0b
Meta: Fix unresolvable reference to WebIDL::OperationReturnsPromise
2023-05-27 13:55:14 +02:00
Sam Atkins
f6fae315e3
LibWeb: Add CustomIdentStyleValue, along with parsing for it
...
This corresponds to the `<custom-ident>` type in CSS grammar.
2023-05-25 15:31:20 +01:00
Sam Atkins
6b8f484114
LibWeb: Stop generating now-unused property_accepts_value()
function
2023-05-25 06:36:10 +02:00
Sam Atkins
465ecf37c2
LibWeb: Make property_id_from_string()
return Optional
2023-05-25 06:36:10 +02:00
Sam Atkins
03613dc14d
LibWeb: Make value_id_from_string()
return Optional
2023-05-25 06:36:10 +02:00
Sam Atkins
9b61f79eae
LibWeb: Generate property_accepts_[identifier/type]()
functions
...
These will be used to parse StyleValues more intelligently.
2023-05-25 06:36:10 +02:00
Luke Wilde
a5936864d9
LibWeb: Stub AudioContext constructor
...
This is enough to make Discord not throw up "Well this is awkward" on
login.
2023-05-22 06:07:05 +02:00
Andreas Kling
cfe663435e
LibWeb+LibJS: Don't lazily construct web prototypes in cell constructors
...
It's not safe to allocate from the GC heap while in the constructor of a
GC heap cell. (Because if this ends up triggering a collection, we may
end up trying to call through an uninitialized vtable).
This was already done safely in the initialize() virtual in much of
LibJS and LibWeb. This patch moves the logic for prototypes, mixins,
and CSSStyleDeclaration as well.
Fixes a long-standing GC crash that was pretty easy to reproduce by
refreshing https://vercel.com/
2023-05-21 14:23:58 +02:00
Luke Wilde
d088619560
LibWeb: Capture realm in dictionary to C++ conversion
...
Some types use the realm when converting to C++, such as unions.
2023-05-13 16:31:10 +02:00
Sam Atkins
f4d8a24fe4
LibWeb: Propagate errors from parse_css_value and property_initial_value
2023-05-06 08:07:28 +02:00
MacDue
a5fa5e55ef
LibWeb: Allow specifying a URL for an SVG fill
...
This does not do anything yet, but will allow for gradients later!
2023-04-28 09:42:28 +02:00
Ali Mohammad Pur
7e6341587b
AK+Everywhere: Disallow Error::from_string_view(FooString)
...
That pattern seems to show up a lot in code written by people that
aren't intimately familiar with the lifetime model of Error and Strings.
This commit makes the compiler detect it and present a more helpful
diagnostic than "garbage string at runtime".
2023-04-28 05:55:20 +02:00
Matthew Olsson
b57b3c54cc
LibWeb: Add ReadableStreamBYOBReader to ReadableStreamReader type
2023-04-27 07:57:53 +02:00
Luke Wilde
1b6492d0fb
LibWeb: Return typed array and ArrayBuffer for BufferSource in IDL union
...
Previous this ignored typed arrays and ArrayBuffer, hitting the
fallback JS -> C++ conversion case, typically stringifying them.
2023-04-21 07:59:50 +02:00
Matthew Olsson
c40109628d
LibWeb: Properly reject abrupt completion in clean_up_on_return
2023-04-17 10:27:40 +02:00
Linus Groh
aff1ec6014
LibJS: Port iterator_step() to GCPtr
2023-04-15 16:23:03 +02:00
Linus Groh
b33b0d60e6
LibJS: Port Value::get_method() to GCPtr
2023-04-14 09:59:29 +02:00
Linus Groh
f345f72b55
LibJS: Port Value::to_object() to NonnullGCPtr
2023-04-14 09:59:29 +02:00
Linus Groh
2555d7a36a
LibJS: Make well-known symbol getters return NonnullGCPtr
...
None of these are ever null after the VM has been initialized, as proved
by virtually every caller immediately dereferencing the raw pointer.
2023-04-13 14:29:42 +02:00
Linus Groh
b84f8fb55b
LibJS: Make intrinsics getters return NonnullGCPtr
...
Some of these are allocated upon initialization of the intrinsics, and
some lazily, but in neither case the getters actually return a nullptr.
This saves us a whole bunch of pointer dereferences (as NonnullGCPtr has
an `operator T&()`), and also has the interesting side effect of forcing
us to explicitly use the FunctionObject& overload of call(), as passing
a NonnullGCPtr is ambigous - it could implicitly be turned into a Value
_or_ a FunctionObject& (so we have to dereference manually).
2023-04-13 14:29:42 +02:00
Timothy Flynn
3f1badf9b2
LibWeb: Implement VideoTrack and VideoTrackList
...
This implements the IDL for these types and some event handling around
them.
2023-04-07 16:02:22 +02:00
Matthew Olsson
bdab61ad93
LibWeb: Add the WritableStreamDefaultWriter interface
2023-04-06 22:54:58 +02:00
Luke Wilde
6ebdb9f824
LibWeb: Implement the HTMLConstructor extended attribute
2023-04-06 11:36:56 +02:00
Luke Wilde
e3c3cc9e19
LibWeb: Implement the CEReactions extended attribute
2023-04-06 11:36:56 +02:00
Luke Wilde
686e3a0d94
LibWeb: Support returning a callback function in IDL
2023-04-06 11:36:56 +02:00