Commit graph

62892 commits

Author SHA1 Message Date
Andreas Kling
627dcb90bd Meta: Update CONTRIBUTING.md for the new era
- Explain project governance (now driven by the non-profit).
- Amend human language policy to keep language neutral & professional.
- Expand on the project's neutrality in detail.
- Clarify policy on rejection of bad-faith issues/PRs.
2024-07-29 11:11:48 +02:00
sideshowbarker
634b035898 Documentation: Add guidance on X11R6 linking warning message 2024-07-28 23:45:27 -06:00
circl
0af92e05d8 Documentation: Clean up some parts of the build instructions 2024-07-28 20:45:25 -06:00
bbb651
014a069157 WebAudio: Stub remainder of AudioBufferSourceNode 2024-07-28 21:41:15 +02:00
bbb651
779e3072f9 WebAudio: Stub AudioDestinationContext
And expose it through `BaseAudioContext::destination`
2024-07-28 21:41:15 +02:00
bbb651
9c17398429 WebAudio: Import AudioNode directly in GainNode 2024-07-28 21:41:15 +02:00
bbb651
150cef62a0 WebAudio: BiquadFilterNode: Implement AudioParams and stub rest 2024-07-28 21:41:15 +02:00
bbb651
6d33cc2b3a WebAudio: Stub/implement more of AudioNode 2024-07-28 21:41:15 +02:00
Tim Ledbetter
354e5a6624 LibWeb: Set correct prototype for WorkerLocation 2024-07-28 21:40:30 +02:00
doctortheemh
7f40a19c71 LibWeb: Fix some typos with text clips
While working on this section of code, I noticed some older names were
still being used. This just brings them up to date and fixes a couple
moves.
2024-07-28 13:45:40 +02:00
Ali Mohammad Pur
4211639e45 RequestServer+LibHTTP: Cancel requests on client exit
That usually happens in "exceptional" states when the client exits
unexpectedly (crash, force quit mid-load, etc), leading to the job flush
timer firing and attempting to write to a nonexistent object (the
client).

This commit makes RS simply cancel such jobs; cancelled jobs in this
state simply go away instead of sending notifications around.
2024-07-28 13:02:49 +02:00
Diego Frias
41dc58f702 LibWasm: Remove unused ParseError variant 2024-07-28 13:02:36 +02:00
Diego Frias
9800ef6047 LibWasm: Introduce TRY_READ for parser
Convenience macro akin to `TRY` for reading from a stream.
2024-07-28 13:02:36 +02:00
Diego Frias
dc52998341 LibWasm: Remove Module::functions
`Module::functions` created clones of all of the functions in the
module. It provided a _slightly_ better API, but ended up costing around
40ms when instantiating spidermonkey.
2024-07-28 02:56:32 +02:00
Tim Ledbetter
2d95cc01dc UI/Qt: Don't save size and location of popup windows on exit 2024-07-28 00:54:50 +01:00
Ángel Carias
9624e0d2a2 LibWeb/DOM: Implement Node.lookupPrefix
Adds https://dom.spec.whatwg.org/#dom-node-lookupprefix
2024-07-28 00:51:55 +01:00
Sam Atkins
9e32c9329a LibWeb: Reserve enough space for span>1 columns in BorderConflictFinder
This code previously only allocated enough space in
m_col_elements_by_index for 1 slot per column, meaning that columns
with a span > 1 would write off the end of it.
2024-07-27 20:23:14 +01:00
Sam Atkins
0cec68ea99 LibWeb: Correct logic for removing end nodes from HTMLOptionsCollection
This test case would previously crash.

Found with domato.
2024-07-27 20:23:14 +01:00
Aliaksandr Kalenik
f61e54b10c LibGfx: Remove code responsible for glyph rasterization
No longer needed after switching to Skia.
2024-07-27 18:37:40 +01:00
Diego Frias
a168bec7ef AK/SIMDExtras: Fix masking logic in shuffle_or_0 2024-07-27 15:02:37 +02:00
Diego Frias
48f1861ce9 Meta: No longer ignore test-wasm results during testing
Since the Wasm runtime should be fully spec-compliant, we want to make
sure that the spec-tests always pass.
2024-07-27 15:02:37 +02:00
Sam Atkins
6ae2b8c3d9 LibWeb/CSS: Parse custom-idents more consistently
These have a few rules that we didn't follow in most cases:
- CSS-wide keywords are not allowed. (inherit, initial, etc)
- `default` is not allowed.
- The above and any other disallowed identifiers must be tested
  case-insensitively.

This introduces a `parse_custom_ident_value()` method, which takes a
list of disallowed identifier names, and handles the above rules.
2024-07-27 14:45:33 +02:00
Ali Mohammad Pur
d3f089dc26 Utilities/js: Make it possible to exit via two consecutive ^C's
Apparently this is common in the js repl world.
Fixes #743.
2024-07-27 11:49:45 +01:00
Diego Frias
a6ebd100ec AK/LEB128: Speed up reading unsigned LEB128 values
Unroll the first byte as a fast path, and remove a branch. This speeds
up the instantiation of spidermonkey by 10ms.
2024-07-27 08:19:51 +02:00
Diego Frias
fc57f5111d LibWasm: Remove needless and costly copies
Speeds up spidermonkey.wasm instantiation by around 60ms (240ms -> 180ms)
2024-07-27 08:19:51 +02:00
Diego Frias
2192c149e2 LibWasm: Stop using ConstrainedStream for function parsing
Speeds up spidermonkey.wasm instantiation by around 20ms (260ms -> 240ms)
2024-07-27 08:19:51 +02:00
Diego Frias
5cde327d46 LibWasm: Provide size hint when parsing instructions into a vector
Speeds up spidermonkey.wasm instantiation by around 20ms (280ms -> 260ms)
2024-07-27 08:19:51 +02:00
Aliaksandr Kalenik
1bd0871ed8 LibWeb+LibGfx: Use Skia for text rasterization
The main incentive is much better performance. We could have gone a bit
further in optimizing the Skia painter to blit glyphs produced by LibGfx
more efficiently from the glyph atlas, but eventually, we also want Skia
to improve correctness.

This change does not completely replace LibGfx in text handling. It's
still used at all stages, including layout, up until display list
replaying.
2024-07-27 08:18:54 +02:00
Jamie Mansfield
b7f0241ab5 LibWeb: Use "en" as a fallback when setting preferred languages
This will set the preferred languages to [ "en" ] if an empty list is
provided.
2024-07-27 08:18:16 +02:00
Jamie Mansfield
7b105e1ecf LibWeb: Add a default for the navigator's languages
This will mean that non-Qt frontends don't return an empty array.
2024-07-27 08:18:16 +02:00
Andrew Kaster
89a4fa4d24 CI: Only run clang plugins workflow on pushes to master
Enabling the plugins makes the job take ~1h even for small changes.
2024-07-26 13:40:50 -06:00
Andreas Kling
2daaa22a15 LibWeb: Stop trying to guess include paths in IDL codegen
It turns out we were already generating all the necessary include
statements, and we can simply remove all this goofy code soup that
uses the C preprocessor to speculatively look for include files.
2024-07-26 17:33:29 +02:00
Sam Atkins
59778d2b36 LibWeb/CSS: Make CSS Parser::create() infallible
Now that `Tokenizer::tokenize()` just returns a String, there are no
errors to propagate, and we can simplify the user code a bit.
2024-07-26 17:29:20 +02:00
Sam Atkins
89c5f25016 LibWeb/CSS: Remove tiny-oom propagation from CSS Tokenizer 2024-07-26 17:29:20 +02:00
Shannon Booth
22969a8e92 Bindings: Avoid second property index lookup for platform objects
While conceptually is_supported_property_index is a cheap index lookup,
it is not currently cheap for an container such as HTMLAllCollection
that is operating on an uncached collection. Instead - just do the
lookup once. It also happens to look a little nicer to not blindly
dereference an optional.
2024-07-26 14:26:16 +02:00
Shannon Booth
8a5985b87f Bindings: Use is_supported_property_name instead of contains_slow
This uses a faster hashtable lookup in the case of HTMLCollection.

Also port invoke_named_property_setter to FlyString to avoid a
FlyString->String->FlyString conversion that surfaces from this change.
2024-07-26 14:26:16 +02:00
Shannon Booth
9b1af542e7 Bindings: Implement is_supported_property_index in terms of item_value
Greatly simplifying the code :^)
2024-07-26 14:26:16 +02:00
Shannon Booth
c5c1a8fcc7 Bindings: Make item_value return an Optional<JS::Value>
This removes some ambiguity about what the return value should be if
the index is out of range.

Previously, we would sometimes return a JS null, and other times a JS
undefined.

It will also let us fold together the checks for whether an index is a
supported property index, followed by getting the value just afterwards.
2024-07-26 14:26:16 +02:00
Shannon Booth
9b59dc5e8b Bindings: Remove exception handling for named_item_value 2024-07-26 14:26:16 +02:00
Shannon Booth
081c92bf3d Bindings: Remove exception handling for named_item
We don't need this for any case, so just remove it to simplify handling
in PlatformObject.
2024-07-26 14:26:16 +02:00
Andreas Kling
273593afba LibWeb: Don't proceed with Element.click() on disabled form controls
Fixes an infinite reload loop on some of the dom/events/ tests in WPT.
2024-07-26 14:25:04 +02:00
Sam Atkins
696ccc1aa9 LibWeb: Prevent elements with no layout box from modifying counters 2024-07-26 11:04:30 +01:00
Sam Atkins
898e3bd898 Last: LibWeb: Add counter() and counters() functions to content property
These let you format counters' current values as strings for use in
generated content.
2024-07-26 11:04:30 +01:00
Sam Atkins
576a431408 LibWeb: Implement CounterStyleValue
This is `counter(name, style?)` or `counters(name, link, style?)`. The
difference being, `counter()` matches only the nearest level (eg, "1"),
and `counters()` combines all the levels in the tree (eg, "3.4.1").
2024-07-26 11:04:30 +01:00
Sam Atkins
017d6c3314 LibWeb: Implement counter-[increment,reset,set] properties
These control the state of CSS counters.

Parsing code for `reversed(counter-name)` is implemented, but disabled
for now until we are able to resolve values for those.
2024-07-26 11:04:30 +01:00
Sam Atkins
4c42e93853 LibWeb: Format Properties.json 2024-07-26 11:04:30 +01:00
Sam Atkins
ca10fb4129 LibWeb/CSS: Refactor contains_single_none_ident() to actually parse it
The new method is Parser::parse_all_as_single_none_value(), which has a
few advantages:

1. There's no need for user code to manually create a StyleValue.
2. It consumes tokens so that doesn't have to be done manually.
3. Whitespace before or after the `none` is consumed correctly.

It does mean we create and then discard a `none` StyleValue in a couple
of places, namely parsing for `grid-*` properties. We may or may not
want to migrate those to returning the IdentifierStyleValue instead.
2024-07-26 11:04:30 +01:00
Sam Atkins
6f2f91d1f5 LibWeb: Stop computing content in NodeWithStyle::apply_style()
This seems to have been required when pseudo-elements were first
implemented, but has since become unused. It's also awkward because we
don't have access to the DOM Element and its CountersSet at this point.
So, let's remove it.

For reference, Chrome&Firefox both return the computed value for
`content: counter(foo)` as `counter(foo)`, not as the computed string.
So not computing it here seems like the intended behaviour.
2024-07-26 11:04:30 +01:00
Sam Atkins
708f49d906 LibWeb: Give DOM Elements a CountersSet
This represents each element's set of CSS counters.
https://drafts.csswg.org/css-lists-3/#css-counters-set

Counters are resolved while building the tree. Most elements will not
have any counters to keep track of, so as an optimization, we don't
create a CountersSet object until the element actually needs one.

In order to properly support counters on pseudo-elements, the
CountersSet needs to go somewhere else. However, my experiments with
placing it on the Layout::Node kept hitting a wall. For now, this is
fairly simple at least.
2024-07-26 11:04:30 +01:00
Kenneth Myhra
a744a9ebe7 LibWeb: Append fetch record to client's fetch group when request is a
...subresource.
2024-07-26 10:22:17 +02:00