Commit graph

51605 commits

Author SHA1 Message Date
Andi Gallo
db121c7af1 LibWeb: Handle leading whitespace in grid-template-* block components
We're already handling whitespace between components, do the same for
leading whitespace. Fixes crash on https://distill.pub/2021/gnn-intro.
2023-06-18 13:41:15 +02:00
Tim Ledbetter
586b47cede Kernel: Put loopback adapter debug spam behind a flag
This significantly increases loopback adapter speed in normal use.
2023-06-18 08:50:33 +01:00
Ben Wiederhake
0184fc5e43 Everywhere: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes 2023-06-18 08:47:51 +01:00
Ben Wiederhake
2ebd79bc76 LibCore: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
Ben Wiederhake
2b2e0a4c5a Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
Ben Wiederhake
8ae60dd234 Kernel: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
Ben Wiederhake
041f5e931d AK: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
Ben Wiederhake
3d3dfc8da8 AK: Introduce AK_MAKE_DEFAULT_MOVABLE macro for easier default impls 2023-06-18 08:47:51 +01:00
Shannon Booth
ef391de635 LibWeb: Implement Web::FileAPI::Blob::text to spec 2023-06-18 08:34:02 +02:00
Shannon Booth
501b698385 LibWeb: Implement Web::FileAPI::Blob::array_buffer to spec 2023-06-18 08:34:02 +02:00
Shannon Booth
b0bc8f2282 LibWeb: Add ReadableStreamDefaultReader::read_all_bytes_deprecated
This is not to the specification, but as the FIXME comment for the
function states, we need it to be able to properly interface with the
FileAPI spcification, which seems to have not been updated to the non
promise based API.
2023-06-18 08:34:02 +02:00
Shannon Booth
3df10d7fb6 LibWeb: Add Streams::ReadableStreamDefaultReader::read_all_bytes 2023-06-18 08:34:02 +02:00
Shannon Booth
46f9a49bd8 LibWeb: Add Streams::ReadableStreamDefaultReader read-loop reader
This algorithm is used by ReadableStreamDefaultReader to read all bytes
from a given stream. Currently the algorithm used is somewhat naive as
it is recursive, but given the initial use of this reader, it should not
be a problem.
2023-06-18 08:34:02 +02:00
Shannon Booth
f320406a4c LibWeb: Make Bindings::dom_exception_to_throw_completion public API
I found myself needing to call this method when attempting to implement
Blob::text and Blob::array_buffer. Turns out that the only caller
outside of the Detail namespace  already had a FIXME to make this a
public API - so let's do that.
2023-06-18 08:34:02 +02:00
Andi Gallo
c5eeb303d8 LibWeb: Don't cap used width by available width from a constraint
In compute_table_box_width_inside_table_wrapper, we should only consider
available_width when it's valid. Values which come from {min,
max}-content constraints aren't meaningful and shouldn't be considered
for the cap.
2023-06-18 08:27:24 +02:00
MacDue
a910c4d984 LibWeb: Fix end position for objectBoundingBox SVG <radialGradient>s
The translation to the bounding box location is handled by the gradient
transform, also doing it here breaks things.

This fixes the MDN <radialGradient> example.
2023-06-17 22:25:26 +01:00
Kenneth Myhra
57626c4f9a LibWeb: Migrate WebSockets::WebSocket to String 2023-06-17 20:38:20 +02:00
Kenneth Myhra
c03c0ec900 AK: Add URL::to_string() returning a String
For convenience wire up a to_string() method which returns a new String.
2023-06-17 20:38:20 +02:00
Sam Atkins
b264d29515 Snake: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
46f365df5c MasterWord: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
2dc96155f7 GameOfLife: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
f3b08ffc8a SpaceAnalyzer: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
aa7346d23e HexEditor: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
200892868a ThemeEditor: Add a recent files list 2023-06-17 20:36:03 +02:00
Sam Atkins
16240942ba ThemeEditor: Add a Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
ae6bde6847 GMLPlayground: Add a Statusbar 2023-06-17 20:36:03 +02:00
Sam Atkins
506f9484e3 LibGUI: Give recent-file actions a nicer status tip
"Open /path/to/file" instead of just "/path/to/file".
2023-06-17 20:36:03 +02:00
Andreas Kling
c374541711 LibWeb: Use correct reference for abspos elements with % height sizes
Absolutely positioned elements should have their percentage sizes
resolved against the padding box of the containing block, not the
content box.

From CSS-POSITION-3 <https://www.w3.org/TR/css-position-3/#def-cb>

"..the containing block is formed by the padding edge of the ancestor.."
2023-06-17 20:35:19 +02:00
Luke Wilde
357174d8fd LibJS/Bytecode: Actually get value from super base for computed property 2023-06-17 20:26:14 +02:00
Luke Wilde
1116ba191a LibJS/Bytecode: Implement optional chaining 2023-06-17 20:26:14 +02:00
Malik Ammar Faisal
c9088fa6ec LibJS: Add tests for new Obj with optional chain 2023-06-17 20:01:38 +02:00
Malik Ammar Faisal
5c913d9cc4 LibJS: Correctly handle parentheses and new Object
Parses `new Object()?.foo`, `(new Object)?.foo`
and shows syntax error on `new Object?.foo`
2023-06-17 20:01:38 +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
f902d4d5e7 AK: Introduce fallible SourceGenerator API 2023-06-17 17:48:06 +01:00
Sam Atkins
747d1aaa98 AK: Use String internally for SourceGenerator
Also sneak in a little error propagation. We keep the existing
DeprecatedString API for now.
2023-06-17 17:48:06 +01:00
Sam Atkins
9c05b83540 AK: Use consume_until in SourceGenerator
This got fixed a while ago to not consume the stop character, so we can
remove the workaround.
2023-06-17 17:48:06 +01:00
Sam Atkins
c8eafd3700 AK: Remove SourceGenerator::as_string()
Turns out nobody uses this!
2023-06-17 17:48:06 +01:00
Andreas Kling
eee4b6eca7 LibJS/Bytecode: Let var without initializer codegen to nothing
Otherwise we incorrectly overwrite the binding with `undefined` at the
point where the `var` statement is.

Fixes 9 test262 tests. :^)
2023-06-17 15:37:33 +02:00
Andreas Kling
743943a042 LibJS/Bytecode: Reorder function compilation to ensure correct hoisting
Fixes 37 test262 tests. :^)

Co-authored-by: Luke Wilde <lukew@serenityos.org>
2023-06-17 15:37:33 +02:00
Andreas Kling
9c568282dc Ladybird+LibJS: Add CLI option to run browser with LibJS bytecode VM
This required quite a bit of plumbing, but now you can run

    ladybird --use-bytecode
2023-06-17 14:16:45 +02:00
Luke Wilde
7ec7015750 LibWeb: Create an audio document for audio/ MIME types on navigation 2023-06-17 14:16:26 +02:00
stelar7
d6db924d47 LibWeb: Implement CSS rem() 2023-06-17 12:13:28 +01:00
stelar7
dc042662d1 LibWeb: Implement CSS mod() 2023-06-17 12:13:28 +01:00
stelar7
b2230c826b LibWeb: Implement CSS round() 2023-06-17 12:13:28 +01:00