Commit graph

9682 commits

Author SHA1 Message Date
Samson
063071ba72
Replace sparkle with glow in components/canvas (#33918)
* Replace sparkle with glow in components/canvas

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Replace safe_gl with #34300

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-20 09:05:24 +00:00
Simon Wülker
c73e4baca2
Preference-gate crypto.subtle (#34295)
* Update Crypto idl bindings

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Pref-gate Crypto.subtle attribute

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-19 22:54:59 +00:00
shanehandley
975e2ae859
Remove referrer policy from document (#34263)
* Remove the referrer policy from document and rely on its policy container

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Make ReferrerPolicy non-optional, instead using a new enum value to represent the empty string case

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Fix clippy issue

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Fix usage of Option<ReferrerPolicy> in unit test

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-19 12:45:10 +00:00
Simon Wülker
83f8e88818
Implement AES-GCM support for subtlecrypto (#34269)
* Support normalizing AES-GCM for encryption

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement "encrypt" operation for AES-GCM

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow importing AES-GCM keys

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement AES-GCM decryption

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow normalizing AES-GCM for "generate key"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* fmt

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix clippy errors

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Remove silly checks

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Support AES-GCM 128-bit encryption with 128 bit IV

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Support AES-GCM with wrapKey/unwrapKey

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations (again)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-19 12:42:37 +00:00
Delan Azabani
26748621cd
Make ScriptEvaluate count script execution in DOM events and timers (#34286)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-19 09:07:38 +00:00
Delan Azabani
9a98852806
Make ScriptParseHTML and ScriptParseXML only count actual parsing time (#34273)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-19 02:26:46 +00:00
Daniel Adams
124c5bbbf3
crypto: Support key wrap operations + AES-KW (#34262)
* Support key wrapping operations + AES-KW

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* tidy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add allow for clippy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec links

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Improve JWK handling

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix clippy warnings

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-11-18 22:54:58 +00:00
Simon Wülker
2485bd9a63
Implement HMAC key generation (#34278)
* Implement HMAC key generation

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>
2024-11-18 17:28:24 +00:00
Simon Wülker
ee63174d6f
subtlecrypto: Don't throw exceptions twice when converting to Algorithm object (#34239)
* Don't throw exceptions twice when converting to Algorithm object

Removes match statements like
```rust
let Ok(ConversionResult::Success(algorithm)) = Algorithm::new(cx, value.handle())
else {
    return Err(Error::Syntax);
};
```
These don't cause issues if `Algorithm::new` returns `Ok(ConversionResult::Failure`,
but in the case of `Err(())` the implementation already called `throw_type_error`
and we must not throw an additional Syntax error, otherwise we'll crash.

Luckily, this case is already handled elsewhere by the
`value_from_js_object` macro.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Test that calling subtlecrypto methods with empty algorithm objects throws a TypeError

The WebCryptoAPI spec does not tell us which error to throw exactly, but
according to https://webidl.spec.whatwg.org/ it should be a TypeError.

This previously crashed servo.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-15 23:15:32 +00:00
Delan Azabani
aa7116c75d
Plumb time profiler output into tracing (#34238)
* Plumb time profiler output into tracing

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Enter the span tightly around the callback

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Use `info_span!()` shorthand

Signed-off-by: Delan Azabani <dazabani@igalia.com>

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-15 09:10:01 +00:00
shanehandley
313597f325
fix: allow form submission for input [type=image] (#34203)
* fix: allow form submission for input [type=image]

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Fix comments and use existing can_gc where available

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-14 14:28:48 +00:00
Josh Matthews
3fd1a229df
Add some more CanGc arguments for compiling module scripts. (#34182)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-13 20:21:56 +00:00
Ngo Iok Ui (Wu Yu Wei)
47a243614f
feat: webxr feature flag (#34241)
* Add webxr feature flag

Add webxr feature flag to embedder_traits

Add webxr flag to constellation

Add webxr flag to compositor

Add webxr flag to canvas

Turn registry into optional

Add webxr flag to servo lib

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
Co-authored-by: august kline <me@augustkline.com>

* Cargo fmt

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>

* Add missing license

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>

* Cargo clippy

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>

---------

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
Co-authored-by: august kline <me@augustkline.com>
2024-11-13 17:16:58 +00:00
Simon Wülker
5e7664b72e
Implement "get key length" operation for HMAC algorithm (#34230)
* Implement "get key length" for HMAC keys

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>
2024-11-12 23:50:13 +00:00
Josh Matthews
ae029242f8
Unminify module scripts. (#34206)
* script: Unminify module scripts.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-12 13:06:55 +00:00
Simon Wülker
8d3d7b7403
Implement crypto.subtle.sign/verify with HMAC (#34223)
* Allow importing HMAC keys

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement crypto.subtle.sign with HMAC

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement crypto.subtle.verify with HMAC

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>
2024-11-11 19:32:51 +00:00
Samson
deddcf2c7a
Fix writing of apis.html (#34224)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-11 19:25:10 +00:00
shanehandley
5e2c7908d0
Use the correct fallback referrer policy for the empty string case (#34201)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-10 03:26:19 +00:00
Simon Wülker
cdd0006e3d
Implement HKDF support for subtlecrypto.deriveBits (#34200)
* Implement subtlecrypto.deriveBits with HKDF

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>
2024-11-10 00:59:39 +00:00
Simon Wülker
67ac59b809
subtlecrypto: Replace NormalizedAlgorithm with specialized variants (#34193)
* Implement specialized normalize_algorithm for "get key length" operation

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "digest"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "importKey"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "deriveBits"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "decrypt"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "generateKey"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement specialized normalize_algorithm for "encrypt"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Remove normalize_algorithm

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Replace obj.get_unsafe() with obj.get()

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Replace BitwiseOr with LogicalOr (typo)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update more WPT expectations outside of WebCryptoAPI

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-09 16:43:47 +00:00
shanehandley
da462d0fcd
Implement referrer policy for dom worker construction (#34192)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-09 01:16:35 +00:00
Simon Wülker
6b94b2c684
Implement subtlecrypto.deriveKey (#34185)
* Implement NormalizedAlgorithm::get_key_length

This is a minimal implementation, which will make
the DeriveKey operation work for AES-CTR keys in
the future.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement SubtleCrypto.deriveKey

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>
2024-11-08 12:59:01 +00:00
shanehandley
6451767428
Implement PolicyContainer and update the default ReferrerPolicy (#33977)
* Implement PolicyContainer

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* implement small parts of fetch that interact with policy container

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* fix: allow policy container's csp list to be unset

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* fix: use the correct default policy when parsing from a token

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-08 07:19:23 +00:00
tanishka
ac7419cf57
Consistently use Dom in native promise handlers (#34167)
* Consistently use Dom in native promise handlers

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Fix crown errors

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-11-07 12:11:33 +00:00
Gae24
05ee551af8
sort Bindings.conf (#34175)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2024-11-07 12:06:20 +00:00
Gae24
48d193cb83
implement CachedFrozenArray (#34145)
* extract code into CachedFrozenArray

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* fix borrow crash

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* fix already borrowed error

using an else will cause the borrow to live more than it needs
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* restore return statement

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2024-11-06 21:26:08 +00:00
Samson
6c2b840e37
Support associated types in must_root lint (#34163)
* Support associated types in must_root lint

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fix

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixups

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Fix crown violations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fix eng

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* make new test use RUSTC_BOOTSTRAP=1

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-06 18:48:57 +00:00
Simon Wülker
2f6ca9407b
Implement SubtleCrypto.deriveBits with PBDKF2 (#34164)
* Start implementing SubtleCrypto.deriveBits

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Move shared crypto operations into their own functions

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update some doclinks

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Remove note about potential no-op

It is, indeed, a no-op.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Move normalized algorithm digest operation into its own function

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement mvp for pbkdf2 derivation

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add missing division to derive bytes instead of bits

The length argument specifies the number of bits that
we need to derive, so we should divide it by 8 to
get the number of bytes.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow using PBKDF2 with usage "importKey"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix test-tidy errors

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix clippy warnings

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-06 15:52:15 +00:00
Simon Wülker
c0a4eee1fe
Add [EnforceRange] on OffscreenCanvas width/height idl attribute (#34165)
* Add [EnforceRange] on OffscreenCanvas width/height idl attribute

Fixes https://github.com/servo/servo/issues/34161

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>
2024-11-06 14:37:26 +00:00
Simon Wülker
80cc4500a3
Rename ImageOrientation default to "from-image" (#34149)
The spec has changed since our implementation was written.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-05 10:38:29 +00:00
Josh Matthews
25a0764a37
Use out parameter for generated methods returning JSVal (#34087)
* Make generated bindings that return a WebIDL `any` value use out parameters.

Returning raw JSVal values makes it easier to create GC hazards in code
that calls these methods. Accepting a MutableHandle argument instead
ensures that the values are rooted by the caller.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Update mozjs.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-05 08:29:08 +00:00
tanishka
cc6163dcdd
Fix GC borrow hazards triggered by LoadBlocker::terminate (#34122)
* Fix GC borrow hazards triggered by LoadBlocker::terminate

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Fix clippy warnings

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Use borrow_mut()

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Revert to previous code due to crown unrooted error

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Update test expectations

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-11-04 22:27:41 +00:00
Simon Wülker
73d2f3c453
Return cached object from CryptoKey.algorithm getter (#34092)
* Return cached object from CryptoKey.algorithm getter

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Test that CryptoKey.algorithm returns a cached object

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Move duplicated code into a helper function

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-04 17:49:01 +00:00
Simon Wülker
e5cc7ad235
Implement ImageBitmap.close (#34124)
* Implement ImageBitmap.close

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>
2024-11-04 01:09:43 +00:00
Wulan Seruniati Salim
e93544c003
Cleanup malloc_size_of for NodeIterator and HTMLCollection (#34118)
Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
2024-11-03 20:28:55 +00:00
chickenleaf
900d13fc2f
frozen array in XRInputSourcesChangeEvent, update to_frozen_array doc (#34100)
* frozen array in XRInputSourcesChangeEvent, update 	o_frozen_array doc

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* simplified changes

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* added tests

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-11-02 14:27:59 +00:00
chickenleaf
257f4b84db
DOMRectList interface implementation (#34025)
* rechecking all file changes and additions

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* added comments with specification links

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* added space before the links

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* modified the doc link format

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* suggested changes + updated interfaces.https.html + updated passing test expectations

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* needed to do an update-manifest

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* updated the idlharness.any.html expectations

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-11-01 15:58:30 +00:00
Martin Robinson
850e59f98e
servoshell: Allow overriding screen resolution with a command-line argument (#34038)
There is a command-line argument to override the default window size,
but not one for overriding the default screen resolution. This is
important for testing pages that use screen size to have different
behavior.

In addition to adding the new option this change:

 - Renames the `--resolution` command-line argument to `--window-size`
   to remove ambiguity with the `--screen-size` argument.
 - Passes the screen size as device independent (device pixels scaled by
   HiDPI factor) to Servo internals. Not only it make it simpler to pass
   the `--window-size` override, it makes more sense. Different screens
   can have different HiDPI factors and these can be different from the
   scale of the window. This makes the screen HiDPI factor totally
   independent of the one that Servo uses for the window.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-10-30 11:54:13 +00:00
Taym Haddadi
ee68dc2589
Support persisting unminified external stylesheets (#33919)
* Support local tweaking of external stylesheets

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Remove duplicated code between unminify_css and unminify_js

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Add License

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Use js-beautify instead of npx

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Fix clippy warning

Signed-off-by: Taym <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym <haddadi.taym@gmail.com>
2024-10-30 11:12:20 +00:00
Simon Wülker
7fa548f555
Implement SubtleCrypto.digest (#34034)
* Implement SubtleCrypto.digest

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>
2024-10-30 02:06:02 +00:00
eri
01820e2a8a
Improve how intrinsic sizes work for videos (#31746)
* feat: patch for video layout sizes

added rebase from main 2024/10/05

Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: eri <epazos@igalia.com>

* feat: take width and height parameters if provided

Signed-off-by: eri <epazos@igalia.com>

* chore: tidy the code and update test expectations

Signed-off-by: eri <epazos@igalia.com>

* feat: handle removing poster

Signed-off-by: eri <epazos@igalia.com>

* chore: update test expectations and remove debug code

Signed-off-by: eri <epazos@igalia.com>

* fix: issues after rebasing to main

Signed-off-by: eri <epazos@igalia.com>

* feat: pass src remove test and tidy

Signed-off-by: eri <epazos@igalia.com>

* chore: clippy fixes

Signed-off-by: eri <epazos@igalia.com>

* chore: update passing test expectations

Signed-off-by: eri <epazos@igalia.com>

* fix object-position-svg test

Signed-off-by: eri <epazos@igalia.com>

* fix unintentional override of video size and resize events

Signed-off-by: eri <epazos@igalia.com>

* change how resize events are sent to better match the spec

Signed-off-by: eri <epazos@igalia.com>

* simplify poster mutation handling

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: eri <eri@inventati.org>

* improved handling of intrinsic sizes

- differentiate between natural size and css size
- presentational attributes
- fallback ratio for video element
- handle more cases where the src/poster are added/removed
- aspect ratio hints

Signed-off-by: eri <epazos@igalia.com>

* update test expectations

Signed-off-by: eri <epazos@igalia.com>

* fix cleaning current frame

Signed-off-by: eri <epazos@igalia.com>

* update test expectations

Signed-off-by: eri <epazos@igalia.com>

* Apply suggestions from code review

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: eri <eri@inventati.org>

* More code review suggestions

Signed-off-by: eri <epazos@igalia.com>

* Prevent aspect-ratio:auto from pulling the ratio from the default object size

As resolved in https://github.com/w3c/csswg-drafts/issues/7524#issuecomment-1204462924

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

---------

Signed-off-by: eri <epazos@igalia.com>
Signed-off-by: eri <eri@inventati.org>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-10-29 22:42:22 +00:00
Samson
43d1601016
Only send mapping back on unmap when MapMode = WRITE (#34054)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-10-29 18:42:07 +00:00
Josh Matthews
1070f7ac12
Fix invalid rooting for PropertyDescriptor (#34018)
* Clean up unnecessary uses of RootedGuard.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Update mozjs.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-28 19:03:24 +00:00
Wulan Seruniati Salim
d3e0efbc21
Cleanup: Remove reference to closed issue 7193 (#34039)
Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
2024-10-28 17:28:31 +00:00
Josh Matthews
1d6ede7b48
Remove GC hazard when compiling inline event listeners. (#33965)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-28 16:27:42 +00:00
Samson
a01d66df53
webgpu: Move supported context format to content timeline (#34028)
* Move supported context format to content timeline

https://github.com/gpuweb/gpuweb/pull/4911
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>
2024-10-28 09:15:46 +00:00
chickenleaf
53911f4e5a
GC hazard fix in customelementregistry.rs (#34019)
* GC hazard fix in customelement.registry.rs

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* removed redundant borrow

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-26 16:18:00 +00:00
chickenleaf
82c9d41330
GC hazard fix in document.rs (#34020)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-26 13:22:10 +00:00
Simon Wülker
600ba602b7
Limit HtmlOptionsCollection.length setter to 100k elements (#34009)
This is a first step towards fixing a TIMEOUT in
"html/select/options-length-too-large.html"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-10-25 14:38:59 +00:00
tanishka
fd6c100489
CanGc fixes in messageport.rs & workerglobalscope.rs (#34003)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-25 13:53:53 +00:00