aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* script: Expose a constructor on `HTMLCollection` that takes a static ↵Martin Robinson2024-12-187-135/+90
| | | | | | | | | | | | 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>
* ci: increment SCCACHE_GHA_VERSION to purge caches (#34673)Mukilan Thiyagarajan2024-12-185-5/+5
| | | | | | | | There are build failures again with similar errors seen in #34571. Incrementing the SCCACHE_GHA_VERSION should purge the cache for now, but this is just a temporary fix. If this happens again, we'll need to look into disabling sccache until #34571 is resolved. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* modified Promise::new_resolved/new_rejected signature (#34658)Domenico Rizzo2024-12-181-8/+16
| | | | | | | | | added rooted undefined value initialization for rval removed unused import Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* Dom: Re-implement `ReadableStream` Part 1 : Default `Reader` and ↵Gregory Terzian2024-12-1748-518/+3762
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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>
* Shrink ContainingBlockPaddingAndBorder (#34666)Oriol Brufau2024-12-171-29/+23
| | | | | | 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>
* Set CCACHE only for github hosted runner (#34670)Samson2024-12-171-1/+3
| | | | | I believe this should fix https://github.com/servo/servo/issues/34603#issuecomment-2544621524 Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* build(deps): bump unicode-bidi from 0.3.17 to 0.3.18 (#34668)dependabot[bot]2024-12-172-3/+3
| | | | | | | | | | | | | | | Bumps [unicode-bidi](https://github.com/servo/unicode-bidi) from 0.3.17 to 0.3.18. - [Release notes](https://github.com/servo/unicode-bidi/releases) - [Commits](https://github.com/servo/unicode-bidi/compare/v0.3.17...v0.3.18) --- updated-dependencies: - dependency-name: unicode-bidi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump the egui-related group with 6 updates (#34647)dependabot[bot]2024-12-173-42/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(deps): bump the egui-related group with 6 updates Bumps the egui-related group with 6 updates: | Package | From | To | | --- | --- | --- | | [egui](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | | [egui_glow](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | | [egui-winit](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | | [ecolor](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | | [emath](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | | [epaint](https://github.com/emilk/egui) | `0.29.1` | `0.30.0` | Updates `egui` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) Updates `egui_glow` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) Updates `egui-winit` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) Updates `ecolor` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) Updates `emath` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) Updates `epaint` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/emilk/egui/releases) - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md) - [Commits](https://github.com/emilk/egui/commits) --- updated-dependencies: - dependency-name: egui dependency-type: direct:production update-type: version-update:semver-minor dependency-group: egui-related - dependency-name: egui_glow dependency-type: direct:production update-type: version-update:semver-minor dependency-group: egui-related - dependency-name: egui-winit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: egui-related - dependency-name: ecolor dependency-type: indirect update-type: version-update:semver-minor dependency-group: egui-related - dependency-name: emath dependency-type: indirect update-type: version-update:semver-minor dependency-group: egui-related - dependency-name: epaint dependency-type: indirect update-type: version-update:semver-minor dependency-group: egui-related ... Signed-off-by: dependabot[bot] <support@github.com> * bump glow in servoshell to mach egui_glow Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * remove glow from deny.toml Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* tidy: Make the tidy tests pass tidy (#34663)Martin Robinson2024-12-172-10/+42
| | | | | | The issue here is mainly that some of the lines are longer than 120 characters. Just add linebreak where appropriate. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Allow same `ScriptThread` `<iframe>`s to be resized synchronously ↵Martin Robinson2024-12-1711-80/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | (#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>
* libservo: update stylo preferences in multiprocess mode. (#34661)Mukilan Thiyagarajan2024-12-171-3/+1
| | | | | | | | | | | | | | | 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>
* script: Fix assertion verifying that reflow isn't necessary after reflow ↵Martin Robinson2024-12-171-13/+12
| | | | | | | | | (#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 (#34631)Samson2024-12-175-24/+57
| | | | | | | | | | | | | | | | | * 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>
* Update deprecated use of PanicInfo to PanicHookInfo (#34659)Narfinger2024-12-171-2/+2
| | | Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
* build(deps): bump colored from 2.1.0 to 2.2.0 (#34650)dependabot[bot]2024-12-161-3/+3
| | | | | | | | | | | | | | | | Bumps [colored](https://github.com/mackwic/colored) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/mackwic/colored/releases) - [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md) - [Commits](https://github.com/mackwic/colored/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: colored dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update wgpu to better handle optional attachment load/store ops (#34646)Samson2024-12-166-132/+31
| | | | | | | | | | | | | * 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>
* Complete implementation of keyword sizes for block layout (#34641)Oriol Brufau2024-12-164-78/+165
| | | | | | | 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>
* build(deps): bump cc from 1.2.3 to 1.2.4 (#34654)dependabot[bot]2024-12-161-2/+2
| | | | | | | | | | | | | | | | Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.3...cc-v1.2.4) --- updated-dependencies: - dependency-name: cc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump crossbeam-deque from 0.8.5 to 0.8.6 (#34653)dependabot[bot]2024-12-161-2/+2
| | | | | | | | | | | | | | | | Bumps [crossbeam-deque](https://github.com/crossbeam-rs/crossbeam) from 0.8.5 to 0.8.6. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-deque-0.8.5...crossbeam-deque-0.8.6) --- updated-dependencies: - dependency-name: crossbeam-deque dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump semver from 1.0.23 to 1.0.24 (#34652)dependabot[bot]2024-12-161-2/+2
| | | | | | | | | | | | | | | Bumps [semver](https://github.com/dtolnay/semver) from 1.0.23 to 1.0.24. - [Release notes](https://github.com/dtolnay/semver/releases) - [Commits](https://github.com/dtolnay/semver/compare/1.0.23...1.0.24) --- updated-dependencies: - dependency-name: semver dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump crossbeam-utils from 0.8.20 to 0.8.21 (#34649)dependabot[bot]2024-12-161-2/+2
| | | | | | | | | | | | | | | | Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.20 to 0.8.21. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.20...crossbeam-utils-0.8.21) --- updated-dependencies: - dependency-name: crossbeam-utils dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump crossbeam-channel from 0.5.13 to 0.5.14 (#34648)dependabot[bot]2024-12-161-2/+2
| | | | | | | | | | | | | | | | Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.13 to 0.5.14. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.13...crossbeam-channel-0.5.14) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* wpt: Fix flakiness in `vh_not_refreshing_on_chrome.html` (#34626)Martin Robinson2024-12-1610-291/+273
| | | | | | | | | | | | | | | | | | | | | This test manually animates the height of an `<iframe>` that has content which uses the `vh` unit. Each tick of the animation changes the height by one pixel. Inside the `<iframe>` the element using `vh` units has a transition applied, so every manual tick of the animation triggers a new transition. The causes a pretty slow test execution. This change improves `vh_not_refreshing_on_chrome.html` to remove flakiness by making the test wait to start until after the `<iframe>` has loaded and to increase the `<iframe>` height by 10 pixels instead of 1 when doing the manual animation. These changes make the test faster and much less flaky in Servo. In addition, the test is reformated a bit removing extraneous whitespace and renamed to follow WPT naming conventions. Fixes #23385. Fixes #15570. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Manage `<iframe>` sizes in `Window` (#34643)Martin Robinson2024-12-1618-200/+165
| | | | | | | | 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>
* Partial implementation of keyword sizes for block layout (#34568)Oriol Brufau2024-12-16115-632/+244
| | | | | | | 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>
* ci: fix wpt export job (#34640)Mukilan Thiyagarajan2024-12-162-1/+7
| | | | | | | | | The path to `.python-version` used by our setup-python action is relative to the current working directory, which is not the servo repo when WPT Export job runs. Fixes #34639. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* mach: adopt `uv` and avoid system python (#34632)Mukilan Thiyagarajan2024-12-1626-153/+131
| | | | | | | | | | | | | | | | This allows us to use `uv` for: 1. Installing a pinned Python version 2. Installing the dependency packages using `uv`'s pip compatible interface. 4. Bootstrapping `mach` without a Python installion on the host, using `uv run` This change also introduces a new 'composite' GitHub action to setup python in the different CI workflows. There is no support for externally managed python installations and virtual environments. These could be added in the future. Fixes #34095, #34547 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Bump bindgen to 0.71.1 (#34562)Jonathan Schwender2024-12-168-55/+41
| | | | | | | | | | | | | | | | | | | * Bump bindgen to 0.71.1 Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Set SCCACHE_GHA_VERSION to allow purging cache changing the version allows us to purge the cache. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * android CI: Enable sccache again Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* websocket: Revert use of h2 in websocket ALPN. (#34634)Josh Matthews2024-12-161-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-12-15671-3456/+22308
| | | | | b'38623a53d6598cb7aab4be8a810102b352a652df' (#34622) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* ci: add retries and caching for `gradle` installation (#34619)Mukilan Thiyagarajan2024-12-141-0/+8
| | | | | | | | | | | | This change uses Gradle's official `setup-gradle` action to allow the caching of the downloaded gradle distribution and java dependencies in the GitHub Actions cache. However, since the initial download of gradle distribution is still handled by the `gradlew` wrapper script which doesn't retry on network failures, this change also adds a simple retry mechanism using shell scripting. Fixes #34600 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Set a Rust edition for blurmac (#34618)webbeef2024-12-141-0/+1
| | | Signed-off-by: webbeef <me@webbeef.org>
* Allow a null principal to subsumes others when appropriate (#34617)webbeef2024-12-141-9/+17
| | | Signed-off-by: webbeef <me@webbeef.org>
* Replace unsafe uses of HandleValueArray. (#34588)Josh Matthews2024-12-1311-106/+33
| | | | | | | | | | | | | * 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>
* layout: Send back layout results directly and remove channels (#34609)Martin Robinson2024-12-134-176/+64
| | | | | | | | | | | | | | 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 to trunk (#34607)Samson2024-12-139-581/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* build(deps): bump cc from 1.2.3 to 1.2.4 (#34611)dependabot[bot]2024-12-131-6/+6
| | | | | | | | | | | | | | | | Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.3...cc-v1.2.4) --- updated-dependencies: - dependency-name: cc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump semver from 1.0.23 to 1.0.24 (#34610)dependabot[bot]2024-12-131-2/+2
| | | | | | | | | | | | | | | Bumps [semver](https://github.com/dtolnay/semver) from 1.0.23 to 1.0.24. - [Release notes](https://github.com/dtolnay/semver/releases) - [Commits](https://github.com/dtolnay/semver/compare/1.0.23...1.0.24) --- updated-dependencies: - dependency-name: semver dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* layout: Fix CSS `attr()` function case sensitivity matching (#34574)Steven Novaryo2024-12-137-10/+26
| | | Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
* Use inline-start/inline-end instead of left/right terminology for floats ↵Oriol Brufau2024-12-132-67/+70
| | | | | | | | | | (#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>
* Add CanGc argument to reflect_dom_object (#34606)Domenico Rizzo2024-12-13207-101/+570
| | | | | | | | | | | | | | | | | | | | | * 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>
* script: No longer do explicit reflows for display (#34599)Martin Robinson2024-12-139-191/+179
| | | | | | | | | | | | | | | | | | | | | | | 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>
* tidy: Use more `cargo-deny` features (#34447)Martin Robinson2024-12-136-272/+154
| | | | | | | | | | | | Instead of parsing the `Cargo.lock` file directly in `tidy.py`. Use `cargo-deny`, which we already use to detect unapproved licenses in the dependency chain to detect duplicate and banned crates. In addition, enable all other `cargo-deny` checks and add exceptions where necessary for them. This depends on the latest release of `cargo-deny` which depends on a recent verison of `rust`. Fixes #34393. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Fix devtools timeout with Firefox 133 (#34602)Jay Oster2024-12-121-1/+20
| | | Signed-off-by: Jay Oster <jay@kodewerx.org>
* Distinguish cached `inline_content_sizes()` from uncached ones (#34595)Oriol Brufau2024-12-129-125/+152
| | | | | | | | | | | | | | 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>
* Fix block size of containing block established by table rows (#34596)Oriol Brufau2024-12-121-1/+1
| | | | | | | 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>
* layout: Fix ordering of padding, border, and margin in inline BiDi (#34572)Dmitrii Desiatkin2024-12-1211-52/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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>
* Share more code for non-replaced float-avoiding blocks (#34585)Oriol Brufau2024-12-122-86/+46
| | | | | | | | | | | | | 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>
* build(deps): bump rustix from 0.38.41 to 0.38.42 (#34544)dependabot[bot]2024-12-121-3/+3
| | | | | | | | | | | | | | | | Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.41 to 0.38.42. - [Release notes](https://github.com/bytecodealliance/rustix/releases) - [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md) - [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.41...v0.38.42) --- updated-dependencies: - dependency-name: rustix dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Upgrade Rust to 1.82.0 (#34592)Jonathan Schwender2024-12-1210-5/+23
| | | | | | | | | | | | | | | | | | | | | * 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>