Commit graph

27611 commits

Author SHA1 Message Date
Josh Matthews
c60e4afbee
Support custom derives for generated types (#34356)
* script: Derive more Default implementations for dictionaries.

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

* script: Support arbitrary derives on generated enums.

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

* script: Support arbitrary derives for generated dictionaries.

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

* script: Support arbitrary derives for generated unions.

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

* script: Derive more impls for generated dicts and unions.

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

* script: Implement FromStr for generated enums.

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

* Fix clippy.

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

* crown: Allow returning unrooted values from Default::default.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-24 18:15:50 +00:00
Josh Matthews
3faed9b921
Filter out webidl files based on special comments, and feature-gate webxr interfaces. (#34348)
* Filter out webidl files based on skip-if directives.

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

* script: Don't build XR functionality without webxr feature.

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

* Fix tidy.

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

* script: Adjust imports for file movement.

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

* Fix clippy.

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

* Formatting.

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

* Clean up webxr module import.

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
2024-11-24 18:01:35 +00:00
Josh Matthews
e956f3124c
Generate a trait abstracting over all known DOM interfaces (#34357)
* script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it.

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

* script: Update trait implementations with new generic type.

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

* Formatting.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-24 07:35:14 +00:00
Nico Burns
9542466b31
Remove unnecessary clone in layout (#34350)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2024-11-23 01:22:40 +00:00
Oriol Brufau
f943ba023a
Improve performance of column flexboxes (#34346)
If a flex item in a single-line column flex container stretches, then
we can know its final size. So instead of first laying it out using its
intrinsic inline size, and then stretching it later, we can use the
correct size from the very beginning.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-11-22 22:52:47 +00:00
Simon Wülker
1198b26ec9
Implement ShadowRoot.innerHtml attribute (#34335)
* Implement DocumentFragment::fragment_serialization_algorithm

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

* Implement ShadowRoot innerHtml attribute

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

* Update WPT expectations

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

* cargo-clippy

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

* Reuse existing serialization code and move helpers into Node

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

* Fix typo

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

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-22 17:07:01 +00:00
Martin Robinson
a3c2471344
Fork Stylo's malloc_size_of into Servo (#34332)
This is unfortuante, but it's the only way to stop making Stylo's
`malloc_size_of` depend on so many of Servo's dependencies. This is an
important step on the way toward releasing Stylo as standalone software.
When possible, we defer to the implementation of `MallocSizeOf` that is
in the base class.

One benefit of this change is that we start properly measure the size of
WebRender types, which before were always set to zero.

In addition the `Measurable` class is removed in favor of simply
manually implementing `MallocSizeOf`, which doesn't require
uncomfortably modifying the shape of data structures.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-11-22 14:57:55 +00:00
Delan Azabani
3a32af0c85
Plumb URL into interval profiler tracing events (#34337)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-22 13:31:00 +00:00
chickenleaf
1f0b88934b
script: Throw a TypeError when trying to create an OffscreenCanvas with an unknown context type (#34276)
* fixing test failures that involves throwing TypeError

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

* handle all unknown values in a single fallback case

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

* updating few more test- expectations

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

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-11-21 22:53:52 +00:00
Daniel Adams
bd9843405a
crypto: Fix 192-bit checks for AES-GCM encrypt/decrypt (#34333)
* Fix 192-bit key length check for AES-GCM encrypt/decrypt

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

* Update expectations

- Regenerated legacy ones as they had outdated expectations

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

* Add missed expectations

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

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-11-21 22:50:32 +00:00
Nico Burns
6cbd89dbb0
Layout: Implement CSS Grid using taffy (#32619)
* Add layout.grid.enabled pref

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Add taffy dependency

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Import taffy <-> stylo conversion code from taffy_stylo crate

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Add `Grid` variant to DisplayInside

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Implement CSS Grid using Taffy

Signed-off-by: Nico Burns <nico@nicoburns.com>

Import full stylo_taffy crate

Signed-off-by: Nico Burns <nico@nicoburns.com>

Squashed PR feedback changes

Deduplicate is_document_only_whitespace

Signed-off-by: Nico Burns <nico@nicoburns.com>

Import taffy::AvailableSpace

Signed-off-by: Nico Burns <nico@nicoburns.com>

Rename FlexContext to TaffyContainerContext

Signed-off-by: Nico Burns <nico@nicoburns.com>

Eliminate references to flexbox in taffy/layout module

Signed-off-by: Nico Burns <nico@nicoburns.com>

Use constructors for geom types

Signed-off-by: Nico Burns <nico@nicoburns.com>

Remove comment about abspos elements splitting contiguous text runs

Signed-off-by: Nico Burns <nico@nicoburns.com>

Remove reference to flexbox in taffy/construct

Signed-off-by: Nico Burns <nico@nicoburns.com>

Deduplicate construction of flexbox/grid containers

Signed-off-by: Nico Burns <nico@nicoburns.com>

Make anonymous text runs InFlow

Signed-off-by: Nico Burns <nico@nicoburns.com>

Remove commented code

Signed-off-by: Nico Burns <nico@nicoburns.com>

Update comments

Signed-off-by: Nico Burns <nico@nicoburns.com>

Inline/vendor the stylo/taffy interop code

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Update test expectations

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix nits from PR review

Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2024-11-21 20:21:01 +00:00
Oriol Brufau
97f53021b1
Upgrade Stylo to 2024-11-01 (#34322)
* Upgrade Stylo to 2024-11-01

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

* Fixup for https://phabricator.services.mozilla.com/D224747

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

* Update test expectations

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

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-21 15:14:45 +00:00
Jonathan Schwender
a6db3cb702
Disable layout-2013 feature by default (#34290)
Most of the time layout-2013 is not needed and just
wastes build time. Disable the optional feature by
default and require users to specify the feature
at compile time if they wish to use the legacy layout.

In CI we enable the feature by default for Linux, since
that we need it for wpt tests with the legacy layout
and CI should ensure that the legacy code continues
to compile.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-11-21 12:24:57 +00:00
Mukilan Thiyagarajan
a731b25f0c
fonts: fix broken caching of font template matches (#34325)
After a cache miss, `find_matching_font_template` never updates the
cache entry with the response from the `SystemFontService` leading to
several unnecessary IPC calls during layout.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-11-21 12:23:14 +00:00
Daniel Adams
3d8f99c4e6
crypto: Include key_ops in exported JWKs, support JWK for HMAC import (#34317)
* Improve JWK handling, HMAC import

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

* Update expectations

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

* Fix logic in parse_jwk, properly stringify key_ops

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

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-11-21 11:44:33 +00:00
Simon Wülker
527e2d426d
Implement element.shadowRoot attribute (#34306)
* Implement Element.shadowRoot attribute

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

* Remove comments about shadowdom not being exposed for web content

This is obviously not the case anymore.

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-21 00:22:42 +00:00
Simon Wülker
f3ad078358
Include non-shadowdom children of shadow hosts in style calculation (#34298)
* Include non-shadowdom children of shadow hosts in style calculation

This was previously causing crashes because the layout nodes
of those children would never be assigned style data by stylo.

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-20 19:28:35 +00:00
Oriol Brufau
138ec6d0ec
Remove the containing_block parameter from TableLayout::layout_caption (#34297)
It was only used for the style, but the containing block of the caption
is the table wrapper box, whose style is stored in `self.table.style`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-20 16:24:00 +00:00
Martin Robinson
4451a59f88
compositing: Properly clean up pending paint metrics (#34305)
Not all pending display list epochs are painted immediately or at all.
Soemtimes WebRender is one or more display lists behind the latest and
sometimes an epoch isn't painted at all if a new display list arrives
before the old one is painted. These situations aren't errors, but they
might indicate performance issues.

Instead of forever printing warnings when this happens, properly clean
up pending paint metrics after compositing. If earlier pending paint
metrics for a pipeline exist, remove them. If a pipeline is no longer
known by the compositor, remove its pending paint metrics.

This change fixes situations where warnings flood the output and a small
memory leak.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-11-20 16:05:26 +00:00
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
Samson
65c84d230b
Replace sparkle with glow in shared/canvas (#34292)
Also updates glow to 0.16

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-19 18:34:37 +00:00
Martin Robinson
b4643c1f11
script: Remove a warning about a common situation involving OOP iframes (#34288)
When an iframe is out of process or running in a different
`ScriptThread`, it is expected that their `Document`s cannot be found in
the current `ScriptThread` during the *update-the-rendering* step.
Remove the warning in that situation and add a comment instead.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-11-19 15:36:55 +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
4a06dc53f6
[NFC] Remove unused interval profiler events (#34285)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-19 07:18:52 +00:00
Jonathan Schwender
09684a3501
Fix various clippy warnings on OpenHarmony (#34281)
* ohos: Fix more clippy warnings

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Remove unnecessary `macro_use`

We can use `use` instead. Removes a warning about
unused macro_use on OpenHarmony.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-11-19 05:21:48 +00:00
Delan Azabani
caf2467649
Set all tracing spans to trace level for now (#34256)
* Clean up tracing instrumentation

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

* Set all tracing spans to trace level for now

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

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2024-11-19 02:53:43 +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
Oriol Brufau
8c689aac67
Fix min/max-content block size of replaced element (#34284)
The min-content and max-content sizes on the block axis depend on the
inline size. But when computing the SizeConstraint corresponding to the
inline axis, we were resolving the preferred inline size ignoring
intrinsic keywords. Now we will only ignore `auto`.

Also, this patch refactors the logic to compute the min-content and
max-content block sizes after fully resolving the inline size.
This avoids having to resolve the inline sizing properties twice.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-18 22:04:57 +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
tanishka
11dfbd6f90
layout: Use Size::FitContent when the alignment isn't normal or stretch for absolutely positioned elements (#34264)
* layout: Use Size::FitContent when the alignment isn't normal or stretch

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

* Use unwrap_or_default()

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

* Use self.alignment.value()

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

* Refactor used_size to handle non-definite sizes

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

* Include AlignFlags::Auto

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-18 15:06:23 +00:00
Nico Burns
6955950948
Fix offsetLeft/offsetTop to match major browsers (#32761)
* Fix offsetLeft/offsetTop to match major browsers

See: https://github.com/w3c/csswg-drafts/issues/10549
Signed-off-by: Nico Burns <nico@nicoburns.com>

Fix crash when <html> element is absolutely positioned

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Update test expectations

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Update test expectations again

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Use PhysicalRect and PhysicalVec types

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Use is_some_and

Signed-off-by: Nico Burns <nico@nicoburns.com>

* clippy

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Apply comment changes from code review

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-11-16 15:28:38 +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
Jonathan Schwender
538ac61a82
ohos: Add basic IME and keyboard support (#34188)
* ohos: Add basic IME and keyboard support

- Add extremely basic support for keyboard events
- Add basic IME support
   - Showing and hiding the IME
   - inserting text
   - deleting characters
   - very basic configuration of the IME

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Apply suggestions from code review

Improve the log message

Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>

* Update ports/servoshell/egl/ohos.rs

Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>

* ohos: Bump the minimum required SDK version to 5.0

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: Remove pub from callbacks

The callbacks don't need to be public, as we will be registering them.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Rename composition event

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: clippy in log

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: address some clippy warnings

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: Raise Error in mach if unsupported SDK version is used.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Add keyboard-types dependency for android

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2024-11-15 15:04:48 +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
Oriol Brufau
557a0ceb89
Protect against arithmetic underflow in TableBuilder::current_y() (#34247)
It doesn't seem like any web page could trigger the underflow,
but this makes the code more robust.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-14 16:03:39 +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
chickenleaf
91f96cc9dd
Support justify-self on absolutely positioned elements (#34235)
* Support justify-self on absolutely positioned elements

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

* updating test expectations

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

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-11-13 14:14:44 +00:00
Oriol Brufau
9102644470
Use a RwLock to cache inline_content_sizes() (#34232)
In order to support size keywords in block layout, we may need to call
`inline_content_sizes()` in order to compute the min/max-content sizes.
But this required a mutable reference in order the update the cache,
and in various places we already had mutable references.

So this switches the cache into a RwLock to avoid needing mutable refs.
Note OnceCell wouldn't work because it's not thread-safe.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-13 09:56:02 +00:00
Samson
873e82a532
Add js.disable_jit pref (#34231)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-11-13 06:50:30 +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
Oriol Brufau
bf75f17348
Add BoxFragment::is_inline_box() (#34233)
A helper function to check for inline boxes.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-12 15:50:20 +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