Commit graph

54778 commits

Author SHA1 Message Date
Shannon Booth 77d32fcb5f LibWeb: Add an initial implementation for Web::FileAPI::FileReader
Some steps are still to be implemented, namely:
 * Properly aborting the read algorithm
 * Handling BinaryString type properly
 * Setting error on any error

But as it stands, this is enough functionality for the basic case of
reading the contents of a blob using the FileReader API.
2023-09-17 16:37:31 -06:00
Shannon Booth 47616210b6 LibWeb: Add HTML::EventNames::loadend 2023-09-17 16:37:31 -06:00
Shannon Booth 3a6339f3dd LibWeb: Mark Blob::get_stream as public
This algorithm may be called from outside of Blob.
2023-09-17 16:37:31 -06:00
Shannon Booth e123492470 LibWeb: Allow ArrayBuffer attributes to be used in IDL
The FileReader IDL has the following entry:
```
readonly attribute (DOMString or ArrayBuffer)? result;
```

This change supports the use ArrayBuffer as a JS built-in in this
definition.
2023-09-17 16:37:31 -06:00
Shannon Booth 132b17406b LibWeb: Add missing String.h include to MimeSniff/MimeType.h
This doesn't cause any compiler errors, but clang-tidy in my editor
certainly complains that this include is missing.
2023-09-17 16:37:31 -06:00
Tim Ledbetter 27b08c0c74 Ports/julius: Add a launcher entry and setup instructions
The CMake-generated Makefile's install target is also no longer used,
as the `julius` binary is the only file we actually need to copy.
2023-09-17 16:29:51 -06:00
Tobias Soppa 9267e24741 LibJS+LibWeb: Track SharedArrayBuffers' shared state
ArrayBuffer no longer stores a plain ByteBuffer internally, but a
DataBlock instead, which encapsulated the ByteBuffer together with
information if it is shared or not.
2023-09-17 16:29:21 -06:00
Dan Klishch 67e07fa4e2 JSSpecCompiler: Introduce ControlFlowOperator nodes 2023-09-17 16:04:42 -06:00
Dan Klishch 81519975c5 JSSpecCompiler: Add reference resolving pass
It replaces UnresolvedReference with Variable, FunctionPointer, or
SlotName nodes. Also, it gathers all variable names from their
declarations.
2023-09-17 16:04:42 -06:00
Dan Klishch 326bac19d9 JSSpecCompiler: Make nodes inherit from Statement or Expression
The distinction between them will become important during CFG building.
2023-09-17 16:04:42 -06:00
Dan Klishch ed5ef4da6d JSSpecCompiler: Make clang-tidy happier, no functional changes 2023-09-17 16:04:42 -06:00
Sam Atkins f0a4baabc7 LibWeb: Support quotes in content values
This adds initial support for `open-quote`, `close-quote`,
`no-open-quote` and `no-close-quote`. We don't yet track the "nesting
level" so we always use the first pair of quotes from the `quotes`
property.
2023-09-17 15:45:52 -06:00
Sam Atkins dc7a52957e LibWeb: Parse and compute CSS quotes property 2023-09-17 15:45:52 -06:00
Tim Ledbetter 1bc081398e find: Add -uid option to filter by owning user ID 2023-09-17 15:29:44 -06:00
Tim Ledbetter d3da8f978e find: Add -gid option to filter by owning group ID 2023-09-17 15:29:44 -06:00
Daniel Bertalan d87fbcccb7 Toolchain+Ports: Update QEMU to 8.1.0
This version contains my patch that adds support for the proprietary
VideoCore mailbox message for reading the kernel command line, so
patches aren't needed anymore.
2023-09-17 15:26:20 -06:00
Sönke Holz a65d6e5e50 LibELF: Use the first PT_LOAD element to calculate base address
Other element types (like `PT_RISCV_ATTRIBUTES`) might not have
a correct `p_vaddr`.
2023-09-17 15:25:24 -06:00
Tim Ledbetter a95c2ed978 find: Add the -maxdepth and -mindepth options
The `-maxdepth` option limits the number of levels `find` will descend
into the file system for each given starting point.

The `-mindepth` option causes commands not to be evaluated until the
specified depth is reached.
2023-09-17 15:20:49 -06:00
EWouters 05d8e2f6f8 Toolchain: Remove dependency on gnu-sed for Clang on Darwin 2023-09-17 15:18:03 -06:00
nipos b99e0b95c0 AK: Defined _COARSE clocks as the normal ones on Haiku 2023-09-17 13:38:12 -06:00
nipos 2c9bf5b935 Documentation: Add Ladybird build instructions for Haiku 2023-09-17 13:38:12 -06:00
nipos 0dfd6994e3 LibCore: Use BSD implementation of anon_create() on Haiku 2023-09-17 13:38:12 -06:00
nipos 45e38c99c2 LibWeb: Add Haiku platform string to ResourceLoader 2023-09-17 13:38:12 -06:00
nipos 0fa00a1b1e LibCore: Don't implement adjtime on Haiku 2023-09-17 13:38:12 -06:00
nipos 1e25ab956c LibCore: Use void* instead of FlatPtr for ioctl() arg on Haiku 2023-09-17 13:38:12 -06:00
nipos a1572555c2 LibCore: Implement current_executable_path() on Haiku 2023-09-17 13:38:12 -06:00
nipos ae34c35d64 LibCore: Add standard paths for Haiku 2023-09-17 13:38:12 -06:00
nipos e028d43c67 LibCore: Enable receive_fd and send_fd on Haiku 2023-09-17 13:38:12 -06:00
nipos cecedc57eb LibCore: Use BSD implementation of Process::get_name() on Haiku 2023-09-17 13:38:12 -06:00
nipos 0816bbe727 LibCore: Use accept instead of accept4 on Haiku 2023-09-17 13:38:12 -06:00
nipos ee5b851f70 LibCore: Make Group::add_group() unavailable on Haiku 2023-09-17 13:38:12 -06:00
nipos cf6781cdee LibCore: Use DirectoryEntry::from_stat on Haiku 2023-09-17 13:38:12 -06:00
nipos 1d475e9312 LibCore: Don't include crypt.h and shadow.h in Account.cpp on Haiku 2023-09-17 13:38:12 -06:00
nipos 2e0960a7ef Meta: Don't link LibCrypt to native libcrypt on Haiku 2023-09-17 13:38:12 -06:00
nipos 2691c079d4 Meta+Ladybird: Link to libnetwork on Haiku 2023-09-17 13:38:12 -06:00
nipos e345085329 Meta+Ladybird: Add some extra definitions for Haiku 2023-09-17 13:38:12 -06:00
nipos fa4357b7ea AK: Use the Linux implementation of StackInfo() on Haiku 2023-09-17 13:38:12 -06:00
nipos 479e57582a AK: Implement fill_with_random() for Haiku 2023-09-17 13:38:12 -06:00
nipos faa5660c7b AK: Add Haiku to platform detection 2023-09-17 13:38:12 -06:00
Aliaksandr Kalenik 3c675e3f25 Userland+Ladybird: Always specify url to be about:srcdoc in load_html()
After moving to navigables, we started reusing the code that populates
session history entries with the srcdoc attribute value from iframes
in `Page::load_html()` for loading HTML.

This change addresses a crash in `determine_the_origin` which occurred
because this method expected the URL to be `about:srcdoc` if we also
provided HTML content (previously, it was the URL passed along with the
HTML content into `load_html()`).
2023-09-17 21:08:59 +02:00
Aliaksandr Kalenik 8e832a174e LibWeb: Update determine_the_origin to match the latest spec 2023-09-17 21:08:59 +02:00
Andreas Kling e33145aa4b LibJS: Use OrderedHashMap for the Shape property table
This allows us to get rid of property_table_ordered() which was a
heavy-handed way of iterating properties in insertion order by first
copying them to a sorted Vector.

Clients can now simply iterate property_table() directly.

3% speed-up on Kraken/ai-astar.js :^)
2023-09-17 21:00:11 +02:00
Shannon Booth 8ce9e51c97 LibWeb: Port Node interface from DeprecatedString to String
Which is fortunately quite straight forward :^)
2023-09-17 20:29:18 +02:00
Aliaksandr Kalenik a76ef04ae6 LibWeb+WebContent: Create WebContentConsoleClient for every document
Fixes regression introduced in b4fe118dff

The `WebContentConsoleClient` needs to be created not just once, but
for every new document. Although the JS Console window allows
communication only with the active document associated with the
top-level browsing context, we still need a console client for each
iframe's document to ensure their console logs are printed.

In the future, we might consider adding the ability to switch which
document the JS Console window communicates with.

Fixes https://github.com/SerenityOS/serenity/issues/21117
2023-09-17 19:58:28 +02:00
Gabriel Nava 9a61041941 LibWeb: Add CanvasPath arcTo support
Adds initial CanvasPath arcTo support for 2D rendering contexts
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-arcto
2023-09-17 17:22:52 +02:00
implicitfield 7cb80c67d8 checksum: Add support for BLAKE2b 2023-09-17 16:49:35 +03:30
implicitfield 1b3ad1c721 LibCrypto: Add support for BLAKE2b 2023-09-17 16:49:35 +03:30
Aliaksandr Kalenik da2c18d1f9 Meta: Update LibJSGCVerifier to build with llvm 16.0.6
Changes to fix LibJSGCVerifier build with llvm version used in
BuildClang.sh
2023-09-16 20:51:28 -06:00
Aliaksandr Kalenik 65eb0f32ad LibWeb: Add missing visit Node::m_pseudo_element_generator 2023-09-16 19:44:55 -06:00
Aliaksandr Kalenik 76d42aa2d5 LibWeb: Add missing visit Document::m_intersection_observers 2023-09-16 19:44:55 -06:00