Luke Wilde
57d28c57f7
LibWeb: Restore Storage as a legacy platform object
2023-02-28 12:36:14 +01: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
Luke Wilde
1c918e826c
LibWeb: Define navigator/clientInformation with define_native_accessor
...
Defining it as a direct property causes it to have no getter/setter
function, which causes an empty Optional crash when attempting to
access such getter on a cross-origin iframe.
Fixes amazon.com crashing on this particular crash.
2023-02-28 08:45:23 +00:00
Luke Wilde
a964ebc255
LibWeb: Implement Path2D#addPath
...
Required by Ruffle.
2023-02-27 20:55:09 +01:00
Luke Wilde
a90667e79c
LibWeb: Add initial implementation of DOMMatrix(ReadOnly)
...
This is currently missing a lot of functions and initialisation from a
<transform-list> string, but is enough for Ruffle.
2023-02-27 20:55:09 +01:00
Luke Wilde
fcd3b16d63
LibWeb: Visit CallbackType's stored EnvironmentSettingsObject reference
2023-02-27 20:49:00 +01:00
Ali Mohammad Pur
8a36d8826f
LibWeb: Implement the js-api portion of Wasm multi-value
2023-02-26 10:54:23 +03:30
Ali Mohammad Pur
6b50f23242
LibWasm+LibWeb: Sneak a JS::Completion into Wasm::Result
...
Imported functions in Wasm may throw JS exceptions, and we need to
preserve these exceptions so we can pass them to the calling JS code.
This also adds a `assert_wasm_result()` API to Result for cases where
only Wasm traps or values are expected (e.g. internal uses) to avoid
making LibWasm (pointlessly) handle JS exceptions that will never show
up in reality.
2023-02-26 10:54:23 +03:30
Kenneth Myhra
9a5a8d617d
LibWeb: Port IDL implementations Blob and File to new String
2023-02-26 00:27:22 +01:00
Kenneth Myhra
31a9bd2bfd
LibWeb: Add to_ascii_upper_case() from the Infra spec
...
https://infra.spec.whatwg.org/#ascii-uppercase
2023-02-26 00:27:22 +01:00
Kenneth Myhra
2c1e15bd3b
LibWeb: Add to_ascii_lower_case() from the Infra spec
...
https://infra.spec.whatwg.org/#ascii-lowercase
2023-02-26 00:27:22 +01:00
Linus Groh
09d40bfbb2
Everywhere: Use _{short_,}string to create Strings from literals
2023-02-25 20:51:49 +01:00
Timothy Flynn
87c4080d00
Browser+LibWeb+WebContent: Store cookie expiry times in UTC
...
We are currently converting parsed expiry times to local time, whereas
the RFC dictates we parse them as UTC. When expiring cookies, we must
also use the current UTC time to compare against the cookies' expiry
times.
2023-02-24 15:50:42 -05:00
Aliaksandr Kalenik
8eeedce805
LibWeb: Consider transform property while finding containing block
2023-02-24 20:55:40 +01:00
Aliaksandr Kalenik
6092d81e4d
LibWeb: Stop overflow clip box aggregation on reached stacking context
2023-02-24 20:55:40 +01:00
Aliaksandr Kalenik
87fa1c5e66
Revert "LibWeb: Fix clip of hidden overflow..."
...
This reverts commit eb1ef59603c13c43b87c099c43c4d118dc8441f6.
The idea of saving clip box to apply it to handle `overflow: hidden`
turned out to break painting if box is painted before it's containing
block (it is possible if box has negative z-index).
2023-02-24 20:55:40 +01:00
Timothy Flynn
8d0b0fbdd3
LibWeb: Make text fragment indexing handle multi-code point glyphs
2023-02-24 20:28:23 +01:00
Timothy Flynn
3d7b13ac03
LibWeb: Make canvas text preparation handle multi-code point glyphs
2023-02-24 20:28:23 +01:00
Kenneth Myhra
fa1ba7fadf
LibWeb: Mark JS::Promise* return value for digest() with JS::NNGCPtr
2023-02-24 19:24:39 +01:00
Kenneth Myhra
f783af05ed
LibWeb: Port SubtleCrypto to new String
...
The algorithm comparison in digest() is done using a StringView to avoid
complex error handling and promise rejection.
2023-02-24 19:24:39 +01:00
Kenneth Myhra
a8cef1fa06
LibWeb: Port Crypto to new String
2023-02-24 19:24:39 +01:00
Andreas Kling
3435820e1f
LibWeb: Render HTML content if present for HTTP error pages
...
If an HTTP response fails with an error code (e.g 403) but still has
body content, we now render the content.
We only fall back to our own built-in error page if there's no body.
2023-02-24 19:15:49 +01:00
Sam Atkins
0fb6f87d49
LibWeb: Add spec link to border-width: thin/medium/thick definitions
...
In the latest backgrounds-3 spec, these have official fixed values. :^)
2023-02-23 16:20:44 +00:00
Kenneth Myhra
e905f25911
LibWeb: Port Worker to new String
2023-02-23 15:48:38 +00:00
Kenneth Myhra
be727ea871
LibWeb: Port WorkerGlobalScope to new String
2023-02-23 15:48:38 +00:00
Kenneth Myhra
9c5bdb0b86
LibWeb: Port WorkerLocation to new String
2023-02-23 15:48:38 +00:00
Kenneth Myhra
385b880862
LibWeb: Make factory method of IntersectionObserver fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
f0fd1cae3d
LibWeb: Make factory method of IdleDeadline fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
ff2a991e19
LibWeb: Make factory method of ResizeObserver::ResizeObserver fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
dcbe927b48
LibWeb: Make factory method of Selection::Selection fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
d69e863286
LibWeb: Propagate error in factory method of Streams::ReadableStream
2023-02-22 09:55:33 +01:00
Kenneth Myhra
07db02cd2c
LibWeb: Make factory method of Geometry::DOMRectReadOnly 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
4de5dc7a86
LibWeb: Make factory method of Geometry::DOMPointReadOnly fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
530ec85c4a
LibWeb: Make factory method of Geometry::DOMPoint 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
3f50025126
LibWeb: Make factory method of Fetch::Response fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
54913adf37
LibWeb: Make factory method of Fetch::Request fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
d7446089ae
LibWeb: Make factory method of Encoding::TextEncoder fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
77e4432367
LibWeb: Make factory method of DOMParsing::XMLSerializer fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
f918d12655
LibWeb: Make factory methods of WebGL::WebGLContextEvent 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
a2381a672d
LibWeb: Make factory method of Fetch::HeadersIterator fallible
2023-02-22 09:55:33 +01:00
Kenneth Myhra
b3734627a1
LibWeb: Make factory method of URL::URLSearchParamsIterator 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
e57461b89e
LibWeb: Make factory methods of UIEvents::WheelEvent 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