Commit graph

10092 commits

Author SHA1 Message Date
Servo WPT Sync
a37a9f68b8
Update web-platform-tests to revision b'38623a53d6598cb7aab4be8a810102b352a652df' (#34622)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-12-15 03:52:07 +00:00
Samson
d24234ac72
Update wgpu to trunk (#34607)
* Update wgpu

8f82992b9f
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>
2024-12-13 18:28:47 +00:00
Steven Novaryo
3b3db37f16
layout: Fix CSS attr() function case sensitivity matching (#34574)
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2024-12-13 17:29:52 +00:00
Dmitrii Desiatkin
5cb75a84a3
layout: Fix ordering of padding, border, and margin in inline BiDi (#34572)
* [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>
2024-12-12 14:39:50 +00:00
Josh Matthews
7b160700d0
Allow running testharness/testdriver/reftests in servodriver (#34550)
* Make servodriver a thin wrapper over the base webdriver browser/executor classes.

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

* Make ServoWebDriverRefTestExecutor a thin shell over the webdriver reftest executor.

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

* Wait for the initial load to complete when opening a new tab via webdriver.

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

* Remove assumption of a single tab from the webdriver server.

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

* Serialize all keys of JS objects when converting to webdriver values.

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

* Formatting.

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

* Cleanup, docs, etc.

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

* Use webview terminology more consistently.

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

* Fix flake8 errors.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-12-11 19:18:44 +00:00
shanehandley
bd37d5496d
Update response handling in main_fetch (#34570)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-12-11 12:59:29 +00:00
Martin Robinson
3f85a27097
script: Remove 'pending reflow' concept and some explicit reflows (#34558)
The `pending reflow` concept isn't necessary now that *update the
rendering* is taking care of triggering reflows at the correct time.
`Window::reflow` already avoids reflows if the page is not dirty, so
pending reflows is now just an extraneous check as long as *update the
rendering* runs properly.

This change also removes some explicit reflows, which now wait until the
appropriate moment during *update the rendering*. This should remove
some extra reflows that are not necessary.

Servo needs some way to track that resizing the web view needs to
re-layout due to the initial containing block changing. Move handling
of `Document::needs_paint` to the script thread and use this, expanding
the rustdoc to explain what it is for a bit more clearly.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-12-11 12:58:37 +00:00
Oriol Brufau
e10e989abb
Don't transfer indefinite height: stretch to inline axis (#34557)
Consider this testcase:
```html
<canvas style="aspect-ratio: 1; height: stretch; background: cyan"
        width="200" height="100"></canvas>
```

To compute the intrinsic inline sizes we were treating `height: stretch`
as the natural height (100px) and then transferring that to the inline
axis through the preferred aspect ratio. So the element was 100px wide.

However, an indefinite `stretch` should be treated as an automatic size,
which wouldn't be transferred to the inline axis.

The fix actually makes the code slightly simpler.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-12-10 11:12:28 +00:00
atbrakhi
38927bbeb6
Reword assert message (#34506)
* reword assert message

Signed-off-by: atbrakhi <atbrakhi@igalia.com>

* review fix, test-tidy

Signed-off-by: atbrakhi <atbrakhi@igalia.com>

---------

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2024-12-09 08:28:01 +00:00
Ville Lindholm
af8f35f5ef
traverse Shadow DOM boundaries when determining element lang (#34529)
Signed-off-by: Ville Lindholm <ville@lindholm.dev>
2024-12-08 16:50:28 +00:00
shanehandley
3363e1a261
Add ReferrerPolicy IDL attribute to iframes (#34526)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-12-08 15:28:49 +00:00
Servo WPT Sync
b3977e7f6c
Update web-platform-tests to revision b'7b6f075f0ec3c52d92c61fb9f35ce0ec927b17b2' (#34525)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-12-08 10:45:12 +00:00
Ville Lindholm
bc7fe41a02
Add XPath parser/evaluator (#34463)
* Add XPath parser/evaluator

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* Correctly annotate XPathEvaluator IDL

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: have bindings pass in `can_gc`

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: add docstrings

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: implement PartialEq for Value for readability

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: add docstrings for CoreFunctions

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: simplify node test code

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: add unit tests for string handling xpath functions

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* put xpath features behind dom.xpath.enabled pref

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review] remove rstest and insta dev-deps

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* update wpt test expectations

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* [PR review]: tweak metadata files

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

* update wpt test expectations AGAIN

Signed-off-by: Ville Lindholm <ville@lindholm.dev>

---------

Signed-off-by: Ville Lindholm <ville@lindholm.dev>
2024-12-08 02:01:50 +00:00
Simon Wülker
97e9841d47
Implement ShadowRoot.clonable attribute (#34514)
* Implement ShadowRoot clonable attribute

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

* Update WPT expectations

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

* Update WPT expectations

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

* ./mach test-tidy fixes

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-12-07 14:24:18 +00:00
shanehandley
651326dacb
net: correct handling of the empty string referrer policy when provided in requestInit (#34518)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-12-07 05:35:11 +00:00
Josh Matthews
4242ff9626
Make traverse_preorder follow shadow roots (#34503)
* script: Ensure shadow-inclusve preorder traversals follow hosted shadow roots.

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

* script: Handle unregistering element id/name values inside of a shadow root.

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

* script: Merge shadow root tree iteration logic.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-12-07 04:28:34 +00:00
Oriol Brufau
61ca2dde29
Upgrade Stylo to 2024-12-04 (#34501)
* Upgrade Stylo to 2024-12-04

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

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

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-12-06 01:05:54 +00:00
Oriol Brufau
5201c84fb4
Fix stretch sizes on replaced abspos (#34430)
We were sizing absolutely positioned replaced elements within their
actual containing block instead of the inset-modified containing block.
Then the `stretch` keyword would result in a wrong size.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-12-05 20:45:20 +00:00
tanishka
bba3bc6ac2
layout: Add missing support for some alignment keywords on absolutely positioned elements (#34365)
* Add missing support for some alignment keywords on absolutely positioned elements

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

* Check the direction of the alignment container, nits, test expectations

In this case we need to check the direction of the static position
containing block, not the actual containing block:
```html
<!DOCTYPE html>
<div style="position: relative">
  <div style="display: flex; flex-direction: column; width: 100px; height: 100px; border: solid; direction: rtl">
    <div style="position: absolute; width: 20px; height: 20px; background: cyan; top: 20px; align-self: self-start"></div>
    <div style="position: absolute; width: 20px; height: 20px; background: magenta; bottom: 20px; align-self: self-end"></div>
  </div>
</div>
```

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

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-12-05 11:33:09 +00:00
Servo WPT Sync
c3a58f9c16
Update web-platform-tests to revision b'bf49dde84c5f05613115d6146d109f0ec3900694' (#34483)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-12-05 05:23:07 +00:00
Oriol Brufau
ad448da7de
Obey min and max properties when computing main size of column flex (#34450)
When laying out a column flex container with an auto preferred main size,
we were resolving the used main size to the intrinsic max-content size.
However, we weren't clamping this amount between the min and max sizes.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-12-02 22:14:54 +00:00
Simon Wülker
f1e89c58a6
Don't register unconnected shadow roots with their owner document (#34361)
* Don't falsely register Shadow Roots as connected

Previously, a shadowroot would be registered as connected
during the shadow hosts bind_to_tree call, even if the host
was being bound to an element that was not itself
connected to a document.

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

* Update WPT expectations

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

* Move bind/unbind methods into a VirtualMethod impl

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

* Add DocumentFragment/Shadowroot to vtable_for

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

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-12-02 18:33:25 +00:00
Ngo Iok Ui (Wu Yu Wei)
e061a59f03
script: add PointerEvent (#34437)
* Add PointerEvent webIDL

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

* Implement all new methods

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

* Cleanup warnings

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

* Update wpt meta

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

* Update interface list

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

* Update manifest

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

* Update doc links

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

---------

Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
2024-12-02 11:53:29 +00:00
Oriol Brufau
f2b5f515d7
Fix alignment of abspos child of flexbox with flipped direction (#34426)
The containing block for the static position of an absolutely positioned
element in flex layout is established by the flex container. However, if
the flex container has static position, the actual containing block will
be established by another ancestor.

If the flex container and the containing block have different directions,
the static position needs especial handling when aligning the abspos.
We were already trying to do so with the `flip_anchor` flag, but there
were bugs.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-30 14:25:10 +00:00
shanehandley
82bbff45b3
Retain the referrer policy when loading an about:blank iframe. (#34432)
This allows the referrer policy to be inherited correctly by the iframe.

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2024-11-30 06:15:36 +00:00
Nico Burns
2dbda69534
Make Servo compatible with Stylo with prefers-color-scheme support (#34423)
* Make Servo compatible with Stylo with prefer-color-scheme support

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

Update imports to work with deduped version of stylo PR

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

Switch back to stylo main branch

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

* Fix unit tests

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

* Update text expectations

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

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2024-11-29 13:48:28 +00:00
Oriol Brufau
a37ccc3e64
Use natural ratio for object-fit (#34413)
We were using the preferred aspect ratio provided by the `aspect-ratio`
property instead of the natural aspect ratio. However, the preferred
aspect ratio should only be used to size the replaced element. To paint
the replaced contents into that element we need the natural ratio.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-28 12:57:38 +00:00
Simon Wülker
9168375b33
Differentiate between missing/invalid value in make_enumerated_getter! (#34412)
* Create spec-compliant version of create_enumerated_getter

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

* Use new make_enumerated_getter! macro everywhere

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

* Remove old make_enumerated_getter macro

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

* Return lowercased value from make_enumerated_getter macro

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-28 00:54:03 +00:00
Gae24
c9e3d3e25e
Implement DataTransfer and related interfaces (#34205)
* add datatransfer interfaces

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

* implement DataTransfer interface

implemented Constructor, setter and getter for drop_effect and effect_allowed, Items and SetDragImage

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

* implement DataTransferItem interface

Implemented Kind, Type, GetAsString, GetAsFile.
Marked DataTransfer as weakReferenceable to access its field
inside DataTransferItemList and DataTransferItem.
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* implement DataTransferItemList interface

implemented Lenght, Getter, Add, Remove, Clear
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* added DataTransfer's old interface

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

* DataTransfer: implemented GetData, SetData, SetData

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

* set Weakref to DataTransfer in DataTransferItemList and DataTransferItem

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

* DataTransfer: implemented Types and Files

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

* cleanup get_data, set_data, clear_data

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

* fix clippy warning

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

* add drag data store

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

* fix DataTransfer's Types() behaviour

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

* DataTransferItem: use the underlying drag data store

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

* fix DataTransferItemList's getter and remove

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

* fix clippy warnings

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

* update test expectations

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

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2024-11-25 10:49:04 +00:00
Servo WPT Sync
468f9cf014
Update web-platform-tests to revision b'6d461cc41e1a9951e1991a94f651e389b0ca24ba' (#34360)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-11-24 01:40:36 +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
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
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
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
Josh Matthews
910e8dc89f
Enable Shadow DOM for tests (#34299)
* Enable shadowdom implementation in all tests.

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

* Update test expectations.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-20 05:57:50 +00:00
Daniel Adams
79a2f070ed
Enable SubtleCrypto by default (#34294)
* Enable SubtleCrypto by default

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

* Update interfaces/manifest

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

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-11-19 21:01:51 +00:00
Martin Robinson
0eda2de19f
style: Add support for is() and where() selectors (#34066)
Additionally, changes now need to be made to `servo.css` in order to
ensure that `<button>` text is centered the same way that it is for
`<input type=button>`. In the past the rule for centering text for the
latter was ignored because it used `:is()`.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-11-19 14:05:46 +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
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
Servo WPT Sync
dca33f681a
Update web-platform-tests to revision b'6cf69a4f431581e9438681abc776029308ee8a8c' (#34265)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-11-17 01:49:15 +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