| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before all timers were managed by the Constellation process, meaning
that they had to trigger IPC calls to be scheduled and fired. Currently,
timers are only used in the `ScriptThread`, so it makes sense that they
are per-process.
This change restores the timer thread functionality that existed before
avoided entirely. Completion is done using a callback that is sent to
the timer thread similarly to how fetch is done. This allows reusing the
existing task queue without making any new channels.
Fixes #15219.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add valid custom element name check
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
* Update wpt test expectation
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
---------
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
|
|
|
|
|
| |
`find_block_margin_collapsing_with_parent_from_slice()` (#34725)
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
| |
Block layout uses some heuristics to guess whether margins are separated
by clearance and then don't collapse. These heuristics now take the
min-content, max-content, fit-content and stretch sizing keywords into
account.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
| |
(#34737)
Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
|
|
|
| |
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
|
|
|
|
|
| |
Fixes #11861
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In order to compute the inline min-content and max-content contributions
of an anonymous block, we were finding its min-content and max-content
inline size with a SizeConstraint coming from the block size of the box.
However, anonymous blocks do not establish a containing block for their
contents, so this patch uses a SizeConstraint from the block size of the
containing block.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu and add support for TextureView.usage
https://github.com/gfx-rs/wgpu/commit/53f40794f275329a48efc7d1c637c91b8e51327d
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Disable wgpu logging
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* remove unused wgpu features
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* new expect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* re
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update deny.toml
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
If a table element had e.g. `width: 0px`, we were assuming that this was
its intrinsic min-content and max-content contributions.
However, tables are always at least as big as its min-content size, so
this patch floors the intrinsic contributions by that amount.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
| |
This change creates a new struct `IFrameCollection` that is used to
cache the list of `<iframe>`s in a `Document` as long as the
`Document`'s DOM has not changed. This prevent constantly iterating the
entire DOM during *update the rendering*, which runs up to 60 times per
second as well as for other operations.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When an element is a shadow root, lay out the shadow root elements
instead of the non-shadow children.
This fixes some tests and introduces some failures, due to bugs in the
Shadow DOM implementation. In general, this is very low impact as the
Shadow DOM is still disabled by default. At least this gets elements
rendering when the preference is turned on though.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
of values from default stream controllers (#34675)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
in each layout logic, in order to correctly resolve sizing keywords.
This patch adds a new `Sizes` struct which holds the preferred, min and
max sizing values for one axis, and unifies the logic to resolve the
final size into there.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Include unimplemented console methods in idl file
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix console.assert signature
The condition is optional and there can be multiple messages.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement console.trace
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ./mach fmt
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Log stack trace when calling console.trace
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update wpt expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Include line/column info in console.trace logs
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Move option out of constant
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update mozjs
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't unnecessarily clone responses twice when sending them to devtools
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Store http response reason instead of inferring it later
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update wpt expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider:
```html
<div style="position: relative; width: 50px; height: 50px; border: solid; margin: 5px">
<div style="position: absolute; top: 0; bottom: 0; height: max-content">
<canvas width="25" height="25" style="background: cyan; height: 100%"></canvas>
</div>
</div>
```
In order to determine the inline min/max-content sizes, we need a
tentative block size as the input, which only takes extrinsic values
into account.
In this case `height: max-content` is intrinsic, so we were treating it
as `height: initial`, which would behave as a definite `height: stretch`.
Therefore, the canvas was able to resolve its percentage.
However, it seems weird to treat an explicitly intrinsic keyword in an
extrinsic way, and Blink doesn't do it. So now we treat the tentative
block size as indefinite, therefore the percentage behaves as auto.
This adds a new test, we were previously failing 6 subtests, now only 3.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
| |
navigation API (#34681)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
|
|
|
| |
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
function (#34667)
Expose a new constructor on `HTMLCollection`, `new_with_filter_fn`, that
filters elements using a simple static function -- a common pattern.
This allows more easily creating this `HTMLCollection` without having to
create a new data structure. Since the constructor takes a static
function, no data should be captured preventing garbage collection
issues.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
| |
added rooted undefined value initialization for rval
removed unused import
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`Controller` (#34064)
* Re-implement readablestream: basics and default reader and controller
---------
Co-authored-by: Jason Tsai <jason@pews.dev>
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
Add remaining WebIDLs of ReadableStream (#32605)
* Add Reader's WebIDL files
* Add necessary methods in ReadableStream.webidl
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
Create safe wrapper for JSFunctions (#32620)
* Create safe wrapper for JSFunctions
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Add assert to check if the name ends in a null character
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Create macro to wrap unsafe extern "C" function calls
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove WRAPPER_FN
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Add macro example documentation
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Use C-string literals
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Ensure name is Cstr type
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Scope #[allow(unsafe_code)]
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
Start implementation of default controller and reader
Start implementation of default controller and reader
* implement basic internal slots, with todos
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* enum for controller
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* re-implement native controller methods
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add calling into pull algo
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* more details on chunk enqueuing
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add fulfill read request, clean-up warnings
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* read request and reader typing
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* allow for more than one non-native underlying source type
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add todo for should pull
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add underlying source dom struct container
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* remove rc around source type
* add default controller init in stream constructor
* setup source container with prototype of source dict
* clean-up docs, dispatch of controller in pull algo call
* turn off SM streams
* remove prototype setting on underlying source container
* fix read request promise resolving
* tidy
* clean-up js conversions in read req handlers
* add queue with sizes concept
* use dom in pull promise handlers
* Demonstrate using dictionary as callback this object.
* move value with size to a struct
* fmt
* put readable stream state in a cell
* nits in expectations
* remove allow unroot by passing read result directly to promise resolving
* tidy
* root default controller inside call_pull_if_needed
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
ReadableStream: implement Cancel and Locked (#33136)
* implement Locked
* implement Cancel and close
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
Add GetPromiseIsHandled and SetAnyPromiseIsHandled to Promise
Signed-off-by: Taym <haddadi.taym@gmail.com>
mach fmt
Signed-off-by: Taym <haddadi.taym@gmail.com>
Readablestream default controller: get desired size (#33497)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
stream: implement controller close (#33498)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
implement stream default controller error (#33503)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Readablestream default controller: enqueue (#33528)
* Implement ReadableStreamDefaultControllerMethods::Enqueue
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
* Add spec comments
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
---------
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
readablestream default controller: fulfill read requests (#33542)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Fix extract_size_algorithm (#33561)
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
Readablestream default controller: use strategy size (#33551)
* readablestream default controller: use strategy size, fallible enqueue
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
docs
* readablestream default controller: clear strategy size
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* prevent potential re-borrow panics when calling into the strategy size
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* document readablestream constructor
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Readablestream: impl default controller should pull, start algo (#33586)
* implement should-pull algo for default controller
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add start algorithm setup for default controller
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
implement promise native handling for start and pull algorithms (#33603)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Implement ReadableStreamDefaultReader (#33160)
* Implement ReadableStreamDefaultReader
Make the stream mutable
readable-stream-reader-generic-release
Proper error types when releasing
Closed
Cancel
Signed-off-by: Taym <haddadi.taym@gmail.com>
* follow the spec more closely
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Implement ReadableStreamDefaultReader read (#34007)
* Implement ReadableStreamDefaultReader read
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Perform readRequest’s error steps with stream.stored_error
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Improve ReadableStreamDefaultReader close (#34014)
* improve ReadableStreamDefaultReader close
Signed-off-by: Taym <haddadi.taym@gmail.com>
* remove resolve_closed_promise
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Use Rc<Box<[u8]>> for queue to optimize get_in_memory_bytes
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Improve read_a_chunk and stop_reading implemntation (#34077)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Implement ReadableStreamDefaultReader::Constructor (#34056)
* Implement ReadableStreamDefaultReader::Constructor
Signed-off-by: Taym <haddadi.taym@gmail.com>
* make start_reading returns ReadableStreamDefaultReader
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Fix can_gc
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Add canGc to ReadableStream::GetReader
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Readablestream fix CanGc (#34080)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* correct ReadableStream::error_native implementation and fix clippy warnings (#34088)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* turn assertion of stream present on controller on a early return with false (#34097)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix already mutably borrowed crash (#34105)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Refactor `get_in_memory_bytes` to return `Option<Vec<u8>> and avoid `unreachable!` panic (#34123)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Set ReadableStream ReadableStreamDefaultReader in start_reading (#34125)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix Unhandled rejection with value: object `TypeError: stream is not locked` (#34204)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix assert!(self.is_readable()) crash in ReadableStream::close (#34207)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix call to to_js_object in underlying source algos (#34098)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* do not assume presence of a stream when performing pull steps (#34244)
* do not assume presence of a stream when performing pull steps
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add doc comments
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* gracefully handle failure of underlying source algorithms (#34243)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* ensure result of calling start algo is an object (#34245)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* return js failed error if underlying source constructor threw (#34246)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Use JSVal for ValueWithSize::value (#34259)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix release reader lock, (#34255)
fix setting stream on controller in new,
fix matching fallthrough,
reduce visibility of controller error method
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* in stream cancel, reject promist if locked (#34271)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix UnderlyingSourceContainer::call_start_algorithm (#34277)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* implement controller cancel steps, fix stream cancel method (#34301)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix conditional in perform pull steps (#34324)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* set reader closed promise to one resolved with undefined if stream closed on init (#34321)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix init of stream and controller (#34323)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Stream: Fix reborrow in controller enqueue, and fix error and exception handling. (#34338)
* fix re-borrow in controller enqueue
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* do not call to_jsval on JSFailed error in enqueue
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* fix error and exception handling in controller enqueue
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* remove TODO about correctness of stored error, since this was done as part of the switch to a js val.
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Stream: Fix incorrect "this" object in underlying source callbacks (#34368)
* in controller close, throw type error if stream cannot be closed
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* store original js object for underlying source, for use as this object in callbacks
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix conditional logic in enqueue to ensure pull is called into (#34375)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Stream: Fix bytelength queueing strategy (#34376)
* fix handling of value that is not an object in bytelength queuing strategy
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* return type error if strategy size call fails, to prevent panic because no exception is pending
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* set correct default count queuing size strategy (#34389)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* use proto in stream constructor (#34441)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix edge cases in get_desired_size (#34440)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Stream: fix algo and strategy calls error handling. (#34424)
* fix error handling in cancel steps
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* in pull steps, reject promise if pull algo throws
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* if start algorithm fails, rethrow the error
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* when the strategy size fails, directly get the pending exception and use it to error the stream
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add error handling to enqueue value with size
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* when enqueueing a value errors, ensure we error and stream with the same error used to throw an exception
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix native use of streams (#34468)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Implement readablestreamdefaulttee (#34405)
* Implement readablestreamdefaulttee
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Create UnderlyingSourceType::Tee each stream
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Use Dom instead of DomRoot
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Queue a microtask for readRequest chunk steps
Signed-off-by: Taym <haddadi.taym@gmail.com>
* fix create_readable_stream
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Remove unnecessary Rc
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Use correct doc link
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Add #[allow(crown::unrooted_must_root)]
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Fix crash in ClosedPromiseRejectionHandler
Signed-off-by: Taym <haddadi.taym@gmail.com>
* reflect TeeReadRequest and TeeUnderlyingSource
Signed-off-by: Taym <haddadi.taym@gmail.com>
* fix can_gc
Signed-off-by: Taym <haddadi.taym@gmail.com>
* reflect tee source, and fix use of mutable dom for tee source and request
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Fix typo that resolves multiple test failures in 'Tee' tests
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Fix readable-streams/tee.any.js test
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Align ReadableStreamDefaultReader with spec and fix additional tests in default-reader.any.js (#34531)
And fix crate::DomTypeHolder usage
* Align ReadableStreamDefaultReader with spec and fix additional tests in default-reader.any.js
Signed-off-by: Taym <haddadi.taym@gmail.com>
* make reader rooted in Constructor and acquire_default_reader
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Remove spaces
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Streams: fetch stream chunks should be uint8 arrays (#34553)
* fetch stream chunks should be uint8 arrays
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* fix clippy
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Update wpt test for ReadableStream reimplementation (#34579)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix ignore_malloc_size_of in readablestream tee (#34578)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Remove incorrect use of handle array, fail test safely by giving only one reason (#34560)
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Update more wpt test for ReadableStream reimplementation (#34598)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix doc and rename Tee to DefaultTee (#34612)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix: Address review comments
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Update response-stream-with-broken-then.any.js.ini test expectation
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix reflect_dom_object can_gc
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Fix compositeReason for DefaultTeeUnderlyingSource (#34627)
* Fix compositeReason for DefaultTeeUnderlyingSource
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Update test
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Last fixes stream (#34636)
* remove now unsused from_js method of readable stream
* fix documenation of error steps
* return type error instread of panicking on a todo, when trying to construct a stream of type bytes
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
* fix crown rooting related errors (#34662)
Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Wu Wayne <yuweiwu@pm.me>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
|
|
|
|
|
|
| |
It only needs to store the block sizes, not the inline ones which have
already been resolved.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#34656)
Post layout, when a `Window` has all of the new `<iframe>` sizes, size
any `Window`s for `Pipeline`s in the same `ScriptThread` synchronously.
This ensures that when laying out from the outermost frame to the
innermost frames, the frames sizes are set properly.
There is still an issue where a non-same-`ScriptThread` `<iframe>` sits
in between two `<iframe>`s of the same origin. According to the
specification these frames should all be synchrnously laid out --
something quite difficult in Servo. This is issue #34655.
This is the first change in a series of changes to improve the
consistency of `<iframe>` loading and sizing.
Fixes #14719.
Fixes #24569.
Fixes #24571.
Fixes #25269.
Fixes #25275.
Fixes #25285.
Fixes #30571.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When servo is run in multiprocess mode, the content process receives
the preferences via IPC from the main process. However, currently
these preferences are only used to update Servo's own preferences by
explictly calling Preference::set_all(). This doesn't ensure that
stylo's copy of preferences is also updated.
This change replaces the call to `Preference::set_all()` with
call to `add_user_prefs` which does ensure both Servo's and Stylos'
preferences are updated.
Fixes #34660.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
| |
(#34645)
A reflow might still be necessary if it's necessary for display and the
reflow itself wasn't for display. After this happens a display becomes
necessary and the page is still dirty for layout purposes.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* webgpu: Fix HTML event loop integration
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Bring back self.drawing_buffer.borrow().cleared
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Rc webgpu_contexts
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
| |
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu to better handle attachment load/store ops
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
| |
Adds support for min-content, max-content, fit-content and stretch,
for the case that was missing from #34568: block-level elements that
establish an independent formatting context, when there are floats.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
| |
Manage `<iframe>` size updates in `Window`. In addition to removing
duplicated code, this will allow setting `<iframe>` sizes synchronously
on child `Pipeline`s of the same origin in the script process in a
followup change. The goal is remove flakiness from `<iframe>` sizing.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
Adds support for min-content, max-content, fit-content and stretch,
for block-level elements that don't establish an independent formatting
context, and for block-level elements when there is no float.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace unsafe uses of HandleValueArray.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy lint.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the way that crossbeam channels are used to send layout
results back to script, which should increase the efficiency of layout.
If asynchronous layout is re-established it can be written as a layer on
top of the layout interface, that way layout doesn't have to know so
many details of how the asynchronocity works.
Renames:
- `ScriptReflow` to `ReflowRequest`: Script is the only thing that
requests reflow.
- `ReflowComplete` to `ReflowResult`
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu
https://github.com/gfx-rs/wgpu/commit/8f82992b9fa0fd71c19a4f5c2d8e2512ef22c010
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fix warnings
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* re
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* re
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Allow git source for gfx-rs
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
| |
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(#34608)
It was a bit confusing that e.g. a float with `FloatSide::InlineStart`
would set `FloatBand::left`, or that `PlacementAmongFloats` would
compute `max_inline_start` from the various `FloatBand::left`.
So now all the float logic will consistently use logical terminoligy.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* applied mach fmt
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
Refinements
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
Modified reflect_dom_object signature and all its calls
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* fix function calls when parameter is passed up
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
---------
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These all happen now in *update the rendering*, typically after the
message that triggered this code is processed, though in two cases
reflow needs to be triggered explicitly. This makes `ReflowReason`
redundant though perhaps `ReflowCondition` can be expanded later to give
more insight into why the page is dirty.
- Handling of the "reflow timer" concept has been explained a bit more via
data structures and rustdoc comments.
- Theme changes are cleaned up a little to simplify what happens during
reflow and to avoid unecessary reflows when the theme doesn't change.
Notably, layout queries and scrolling still trigger normal reflows and
don't update the rendering. This needs more investigation as it's
unclear to me currently whether or not they should update the rendering
and simply delay event dispatch or only reflow.
In general, this is a simplfication of the code.
Fixes #31871.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Jay Oster <jay@kodewerx.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several structs and enums had a `inline_content_sizes()` method, but it
wasn't clear which ones would try to cache the result, and which ones
would always compute it.
Therefore, this performs some clarifying renaming:
- Cached ones stay as `inline_content_sizes()`
- Uncached ones become `compute_inline_content_sizes()`
Also, to simplify calls to `LayoutBoxBase::inline_content_sizes()`,
`compute_inline_content_sizes()` is moved into a new trait.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
| |
Due to a typo, the containing block established by a table row for the
table cells had its block size set to the its inline size. However,
this block size is currently unused, so no change in behavior.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [fix](inline flow): Create PBM items in inline context in propper visual order
Signed-off-by: Desiatkin Dmitrii <d.desyatkin@innopolis.university>
* Rename left/right pbm terms in inline layout to logical nomenclature
- LineItem::LeftInlineBoxPaddingBorderMargin(_) is renamed to
LineItem::InlineStartBoxPaddingBorderMargin(_)
- LineItem::RightInlineBoxPaddingBorderMargin(_) is renamed to
LineItem::InlineEndBoxPaddingBorderMargin(_)
- LineLayoutInlineContainerFlags::HAD_LEFT_PBM is renamed to
LineLayoutInlineContainerFlags::HAD_INLINE_START_PBM
- LineLayoutInlineContainerFlags::HAD_RIGHT_PBM is renamed to
LineLayoutInlineContainerFlags::HAD_INLINE_END_PBM
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update test expectations
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
---------
Signed-off-by: Desiatkin Dmitrii <d.desyatkin@innopolis.university>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Block-level elements that establish an independent formatting context
(or are replaced) need to avoid overlapping floats.
In the non-replaced case, we have two different subcases, depending on
whether the inline size of the element is known. This patch makes them
share more logic.
Then `solve_clearance_and_inline_margins_avoiding_floats()` would only
be used in the replaced case, so it's removed, inlining its logic.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix deprecated PanicInfo alias
Fixes:
```rust
use of deprecated type alias `std::panic::PanicInfo`: use `PanicHookInfo` instead
```
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* build: upgrade rustc to 1.82.0
Tracking issue for the silenced lints:
https://github.com/servo/servo/issues/34591
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
| |
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A rendering opportunity is now unconditionally triggered by handling IPC
messages in the `ScriptThread`, unless animations are running in which
case it's driven by the compositor. We can now remove calls to
`note_rendering_opportunity` and `rendering_opportunity`.
There is one tricky case, which is when a promise completion during a
microtask checkpoint dirties the page again. In this case we need to
trigger a new rendering opportunity, unless animations are running. In
a followup change, when not driven by the compositor, rendering
opportunities will be driven by a timed task, meaning we can remove this
workaround.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|