This applies changes from #44108 to the release/v0.1 branch. To secure
our workflow secrets, we will be removing the global secrets, hence
backporting this is required in order to support future release workflow
usage.
-------------------------------
The publish environment enforces additional restrictions, mainly that
the workflow can only be run from protected branches and additional
prevents access of the publish secrets from workflows which do not use
this environment.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This applies #44085 to the release/v0.1 branch, which is required to
backport #44108, which is necessary in order to run future release
workflows, after we have removed the secrets from the regular
environment.
Using the new yaml anchor feature, we can inline the upload_release
workflow file without duplicating code.
In combination with the matrix feature this allows us to remove quite a
bit of duplication. I'm not sure why we didn't use matrix to begin with.
This is also a preparation for a follow-up PR, that uses github
environments to improve secret protection, since reusable workflows
don't support environments.
Testing: [manually triggered nightly
release](https://github.com/servo/servo/actions/runs/24236862409)
(cherry picked from commit f59491d36f)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This applies #44093 to the release/v0.1 branch.
This prevents issues for users that don't already have a lockfile, since
prerelease versions can have breaking changes.
Testing: No changes, covered by existing tests.
Fixes: #44089
(cherry picked from commit 34337273a3)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This applies #43972 to the release/v0.1 branch in preparation for the
release.
When triggering the release action on a non-protected branch in this
repo, the job is rejected (as intended):
<img width="1484" height="304" alt="image"
src="https://github.com/user-attachments/assets/236d3a41-2765-4652-8709-93110e03c77b"
/>
When triggering the action on a protected branch in this repository, the
publish-crates-io job will be pending, until explicitly approved by one
of the required approvers (thanks to the `environment` settings). This
allows us to publish all of our packages in one go.
Testing: Tested by manually
[triggering](https://github.com/servo/servo/actions/runs/24119955943/job/70371705395)
a release for `0.1.0-rc2`, which got successfully published to
crates.io. This was also a resume-after-cancellation test, since the
first ~30 crates of the release had already been published via `cargo
publish --workspace`, before running into the issue that `cargo publish
--workspace` can't resume after intermediate failures. The last commit
"Fix buffering issue in CI" is untested, and was added after observing
the stdout log messages only appearing at the end of the script. That
commit is trivial though, and probably does not justify using crates.io
resources for another test release.
---------
(cherry picked from commit c3d2df22c0)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
This applies the changes from #44017 to the release/v0.1 branch, to
improve the action reliability before the upcoming release.
-------
If the entire workflow was cancelled we also need to check for
`cancelled()`. Simply checking needs.*.result is not sufficient - it was
observed that the success branch was still entered when only checking
needs.
Testing: Tested manually, by cancelling [this
workflow](https://github.com/servo/servo/actions/runs/24119740924/job/70371050119)
which resulted in a draft release publish (failure branch)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
This is a backport of #43866 to the release/v0.1 branch.
`hyper_serde` currently has no dependants on crates.io. We give up the
independant versioning and simplify our setup by using the same version
as our workspace. The new crate is servo-hyper-serde.
Testing: Not required, policy change.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
In preparation for the next release, bump the version number to 0.1. 0.1
will be an LTS release, which receives extended support in terms of
security updates (e.g. spidermonkey security updates). Please keep in
mind that as always no specific guarantees or response times are given,
and any updated are provided on a best effort basis.
Previously some projects had a demo integration of servo based on some
version of servo, and then never or rarely updated it. Providing an LTS
release offers an option to embedders to integrate servo, while reducing
API churn and having a somewhat fixed schedule to adhere to in terms of
upgrades. Currently, the plan is for a new LTS release every 6 months,
with additional documentation regarding API changes and recommended
migration patterns (best-effort and subject to change).
Testing: No functional changes. Additional testing will be performed
post-merge on the newly created release branch.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Testing: gstreamer feature is enable in CI, and we test both mac and
windows, which guard the elements in the module.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Scenario proposed should be best tested using unit tests.
Testing: TODO (Waiting for #43160)
Fixes: #41582
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Part of #43800 and #43606.
I removed the `new` method from `SourceActor` entirely, as it was only
used internally by `new_registered`. I renamed `new_registered` to
`register`, inlined the struct construction directly using `Self { ...
}`, and updated the registration call to use
`registry.register::<Self>(actor)` to match the standard pattern
established across other actors.
I also standardized variable names throughout `SourceActor` and its call
sites to follow the conventions set in #43606:
- Renamed `name` and `source` to `source_name` and `source_actor`
respectively in `SourceManager::find_source`
- Renamed `actor_name` to `source_name` in `SourceManager::source_forms`
- Renamed `actor_name` to `source_name` in
`handle_update_source_content` in lib.rs
Testing: Built with cargo and ran ./mach test-devtools. 59/60 tests
pass; the one failure (test_manual_pause) is a pre-existing intermittent
timeout unrelated to these changes.
Fixes: part of #43606 and #43800
Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
- Changes `breakpoint_list` to `breakpoint_list_actor`
Testing: Tested locally with `mach test-devtools`
Fixes: A part of #43606
---------
Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
upcast::<Type>() is costly in general, but in some cases we can avoid
that call and use a direct field access instead.
Testing: no test change expected.
Signed-off-by: webbeef <me@webbeef.org>
This PR considers the following constraints:
- Resources must be available when building servo via a published
crates.io package (i.e. no `../../../resources/<file>` file references).
- Minimal setup when writing tests (`nextest` spawns each test in its
own process, so we don't want to explicitly initialize the resource
handler for every `#[test]` fn)
- Use local resources when developing locally
- Support loading the resources from a proper resource directory if the
embedder wishes so, including via a custom mechanism, not necessarily as
files
(File) Resources that are only accessed from servoshell are out of scope
of this PR, since it mainly focusses on unblocking publishing `libservo`
to crates.io.
Baking the resources into the binary by default simplifies the setup a
lot. We already supported that before, but only for testing purposes and
explicitly not for production builds.
Using [`inventory`](https://crates.io/crates/inventory) adds a simple
way for the embedder to replace the default baked in resources, while
also keeping the test usage of baked in resources simple.
rippy.png is also referenced from image_cache - We simply duplicate it,
since the image is small, to avoid adding unnecessarily complex
solutions like adding a dedicated crate.
Testing: Covered by existing tests. [mach try
full](https://github.com/jschwe/servo/actions/runs/23811669469)
Fixes: Part of #43145
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
- `PauseActor` is passed as a generic for only `new_name`
- Update the variable `pause` to `pause_name`
**Testing**: Tested locally with `mach test-devtools`
```
Ran 60 tests in 74.781s
OK (expected failures=6)
```
**Fixes**: A part of #43606
Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
This set of changes introduces a type matching the spec's "target
snapshot params" and uses it as part of determining the origin of new
documents. This has a side benefit of making our sandbox flag
determination more accurate, which leads to a bunch of sandboxing tests
passing as well as some new failures due to spec confusion about
origins.
Testing: Many new passing tests.
Part of the long road to #43149
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.22.0 to 1.23.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uuid-rs/uuid/releases">uuid's
releases</a>.</em></p>
<blockquote>
<h2>v1.23.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add support for 'hyphenated' format in the serde module by <a
href="https://github.com/FrenchDilettante"><code>@FrenchDilettante</code></a>
in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/865">uuid-rs/uuid#865</a></li>
<li>Fix a number of bugs in time-related code by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/872">uuid-rs/uuid#872</a></li>
<li>Reword invalid char error message by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/873">uuid-rs/uuid#873</a></li>
<li>Impl cleanups by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/874">uuid-rs/uuid#874</a></li>
<li>Use LazyLock to synchronize v1/v6 context initialization by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/875">uuid-rs/uuid#875</a></li>
<li>Prepare for 1.23.0 release by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/876">uuid-rs/uuid#876</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/FrenchDilettante"><code>@FrenchDilettante</code></a>
made their first contribution in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/865">uuid-rs/uuid#865</a></li>
</ul>
<h2>Special thanks</h2>
<p><a href="https://github.com/meng-xu-cs"><code>@meng-xu-cs</code></a>
raised a series of bugs against the timestamp logic in <code>uuid</code>
using automated tooling. The issues themselves were reasonably and
responsibly presented and the end result is a better <code>uuid</code>
library for everyone. Thanks!</p>
<h1>Deprecations</h1>
<p>This release includes the following deprecations:</p>
<ul>
<li><code>Context</code>: Renamed to <code>ContextV1</code></li>
<li><code>Timestamp::from_gregorian</code>: Renamed to
<code>Timestamp::from_gregorian_time</code></li>
</ul>
<h1>Change to <code>Version::Max</code></h1>
<p><code>Version::Max</code>'s <code>u8</code> representation has
changed from <code>0xff</code> to <code>0x0f</code> to match the value
returned by <code>Uuid::get_version_num</code>.</p>
<h1>Change to <code>Uuid::get_version</code> for the max UUID</h1>
<p><code>Uuid::get_version</code> will only return
<code>Some(Version::Max)</code> if the UUID is actually the max UUID
(all bytes are <code>0xff</code>). Previously it would return
<code>Some</code> if only the version field was <code>0x0f</code>. This
change matches the behaviour of the nil UUID, which only returns
<code>Some(Version::Nil)</code> if the UUID is the nil UUID (all bytes
are <code>0x00</code>).</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0">https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00ab922d53"><code>00ab922</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/876">#876</a> from
uuid-rs/cargo/v1.23.0</li>
<li><a
href="726ba45fe3"><code>726ba45</code></a>
prepare for 1.23.0 release</li>
<li><a
href="996dadea02"><code>996dade</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/875">#875</a> from
uuid-rs/fix/context-ordering</li>
<li><a
href="e14047993b"><code>e140479</code></a>
simplify a use stmt</li>
<li><a
href="8ed9142847"><code>8ed9142</code></a>
reorganize and document more v7 context internals</li>
<li><a
href="e09a3225a8"><code>e09a322</code></a>
use LazyLock to synchronize v1/v6 context initialization</li>
<li><a
href="0f260cc671"><code>0f260cc</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/874">#874</a> from
uuid-rs/chore/impl-cleanups</li>
<li><a
href="1419e91097"><code>1419e91</code></a>
clean up and refactor main lib tests</li>
<li><a
href="ceeaf4b7b5"><code>ceeaf4b</code></a>
ensure we don't overflow on counters less than 12</li>
<li><a
href="63bc8f52e5"><code>63bc8f5</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/873">#873</a> from
uuid-rs/fix/error-msg</li>
<li>Additional commits viewable in <a
href="https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [simd-adler32](https://github.com/mcountryman/simd-adler32) from
0.3.8 to 0.3.9.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mcountryman/simd-adler32/commits/v0.3.9">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the wayland-related group with 3 updates:
[wayland-backend](https://github.com/smithay/wayland-rs),
[wayland-scanner](https://github.com/smithay/wayland-rs) and
[wayland-sys](https://github.com/smithay/wayland-rs).
Updates `wayland-backend` from 0.3.14 to 0.3.15
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />
Updates `wayland-scanner` from 0.31.9 to 0.31.10
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />
Updates `wayland-sys` from 0.31.10 to 0.31.11
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This change has two main interdependent parts:
1. It starts to align Servo's focus code with what is written in the
HTML specification. This is going to be a gradual change, so there
are still many parts that do not match the specification yet. Still,
this adds the major pieces.
2. It adds initial support for the `ShadowRoot.delegatesFocus` property
which controls how focusing a shadow DOM root can delegate focus to
one of its children.
Testing: This causes a few WPT tests to start passing.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
We should compare HMAC signatures in constant time when validating
user-provided signatures, to prevent leaking timing information
proportional to the number of matching bytes. The WebCrypto
specification has also updated to require to use constant-time
comparison in HMAC signatures.
We update our implementation accordingly. Since we are still using the
`aws-lc-rs` crate for our HMAC implementation, we use the function
`verify_slices_are_equal` provided by `aws_lc_rs::constant_time` to
guarantees the comparison is constant-time.
Specification Update:
c962bc7ebb
Testing: Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This workaround was only necessary when click focusing didn't look up
the ancestry chain for an applicable focusable area. Now that this
happens (via the code directly after), the workaround is no longer
necessary.
Testing: This should not change behvior so is covered by existing tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
# Checklist
Relevant methods in Document are:
- [x] enter_fullscreen
- [x] exit_fullscreen
- [x] get_allow_fullscreen
Relevant method in DocumentOrShadowRoot is:
- [x] get_fullscreen_element
Relevant methods in Element are:
- [x] fullscreen_element_ready_check
Relevant structs in element.rs are:
- [x] ElementPerformFullscreenExit
- [x] ElementPerformFullscreenEnter
Testing: The PR moves functions around and we don't need to modify any
tests
Fixes: #43719
---------
Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
Add the minimum amount of FreeBSD-specific code to Servo, where no
platform-neutral fallback exists.
Testing: I've succesfully built and run Servo on FreeBSD with these
changes (and some fixes to dependencies). There's no functional change
to any other targets. This pull request was created with Servo running
on FreeBSD.
Fixes: #11625
---------
Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
This script shows any issue which has not received any updates for over
a month. This means it is no longer intermittent and therefore can be
closed.
---------
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Use constant variable to define the `PipelineNamespaceId` for
`Constellation` and `Embedder`, and fix the comment describing the
declaration `next_pipeline_namespace_id`.
Testing: A successful build should be enough for the minimal
refactoring.
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
In general, for a normal `BoxFragment`, a `ExternalScrollId` is created
by directly using the `OpaqueNode::id` which is the heap address of the
`Node`. But for a `BoxFragment` from a `::before` or `::after` pseudo
element, we are using the next unused id (starting from zero) with an
increment of two.
This patch modifies so that we are using the bitwise or of
`OpaqueNode::id` and `FragmentType` as the `ExternalScrollId`. With
these changes, the `ExternalScrollId` for the pseudo elements would
remain the same after reflow (instead of getting a new scroll id).
Testing: New WPT test
Fixes: #43308
---------
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
All callers were constructing a DOMString only to have it immediately
converted back to String inside internal_warn, resulting in an
unnecessary allocation and clone. This changes the parameter type to
String and updates all call sites to pass the result of format! or
.to_string() directly.
Fixes: #43091
---------
Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
Initialize unminified_css_dir directly in Window::new instead of storing
a separate unminify_css bool and lazily setting the dir in
init_document.
Testing: Ran ```./mach run --unminify-css google.com``` also checked
```ls unminified-css/``` result was ```www.google.com www.gstatic.com```
Fixes: #43730
Signed-off-by: Sabb <sarafaabbas@gmail.com>
Implement the layout of `<input type="range">`. Support automatically
calculating the position of thumb based on the current input value, and
the size of range-track and range-thumb. Added a
document.has_script_or_layout_blocker function to detect whether it is
possible to run box_area_query during bind_to_tree, add delay_task if
there are blocker.
Here are some of the fixes made in this PR:
1. Fixed the structure for input type range's pseudo elements.
2. Fixed the positioning of input type range's thumb based on current
value, width, and direction.
3. Allow input type range to stretch vertically in a bigger container.
Original PR: #41024
Stylo PR: https://github.com/servo/stylo/pull/310
Testing: Some improvements in WPT tests, with a few regressions. This
change includes a Servo-specific appearance test to detect unexpected
changes to the look and feel of range widgets.
Fixes: #22728
---------
Signed-off-by: Budiman Arbenta <arbenta6@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: rayguo17 <tin.tun.aung1@huawei.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Expose set_cookie_for_url, get_cookie_for_url, allow applications to
get/set cookies.
Testing: Unit test for `SiteDataManager` and manual test with
ServoShell.
---------
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
Following #43714, which moved the element interfaces into the `element/`
directory and extracted `get_int_attribute` into `attributes.rs` as a
proof-of-concept, this PR moves the remaining attribute getter/setter
methods out of `element.rs` into the separate `attributes.rs` file.
The following methods were moved:
- `set_atomic_attribute`
- `set_bool_attribute`
- `get_url_attribute` / `set_url_attribute`
- `get_trusted_type_url_attribute`
- `get_trusted_html_attribute`
- `get_string_attribute` / `set_string_attribute`
- `get_nullable_string_attribute` / `set_nullable_string_attribute`
- `get_tokenlist_attribute` / `set_tokenlist_attribute`
- `set_atomic_tokenlist_attribute`
- `set_int_attribute`
- `get_uint_attribute` / `set_uint_attribute`
This reduces the size of `element.rs` and groups all attribute-related
helper methods together in one place.
Testing:
No tests required as this is a pure code move with no behavioural
changes. The existing test suite covers the moved methods indirectly
through their callers. `cargo check` passes cleanly.
part of #38901
part of #43709
part of #43714
Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
1. Broken Images are skipped for FirstContentfulPaint as per specs.
2. Update the WPT test.
Testing: `tests/wpt/tests/paint-timing/fcp-only/fcp-broken-image.html`
---------
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
This starts splitting out commonly shared data into a new data structure
that will make it easier to compare old shaping results to new ones in
the future. This eliminates some memory usage during inline layout, but
adds 8 bytes per segment (usually one per inline box). We hope to
recover this memory by storing one `GlyphStore` per `TextRunSegment`,
which
should recover 16 bytes.
Testing: This should not change behavior so is covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
The "deriveBits" operation of X25519 in WebCrypto throws an
OperationError when the secret is all-zero value. The check must be done
in constant time.
Although our implementation enforces comparing all bytes one-by-one
without early exit, it still does not guarantee the `u8` comparison is
constant-time due to compiler optimization and CPU microarchitectural
effects.
We switch to using the function `was_contributory` provided by the
`x25519-dalek` crate to check whether the secret is all-zero value, as
it guarantees constant-time execution. This enhances the security of our
WebCrypto API.
Testing: Security enhancement. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This change merges the first letter implementation into the
`InlineFormattingContextBuilder` as its more associated with inline
layout. The downside is that, due to ownership issues in Rust, the
builder must be unwrapped after ensuring it. Additionally, ensure
that `::first-letter` boxes are properly stored in a box slot meaning
that restyles work properly.
This change also makes a few small cleanups to the `first_letter_range`
function in addition to moving it to the inline code.
Testing: This does not change behavior and so should be covered by
existing tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Renamed FrameActor variable names to match standards in thread & lib.rs
Testing: No testing required.
Fixes: Part of #43606
Signed-off-by: Sabb <sarafaabbas@gmail.com>
Renamed ThreadConfigurationActor variable names in watcher.rs.
Testing: No testing required.
Fixes: Part of #43606
Signed-off-by: Sabb <sarafaabbas@gmail.com>
Renamed InspectorActor variable names in browsing_context, inspector &
lib.rs
Testing: No testing required.
Fixes: Part of #43606
Signed-off-by: Sabb <sarafaabbas@gmail.com>