Commit graph

47602 commits

Author SHA1 Message Date
Oriol Brufau
a4cc0c563e
Allow using cached client_rect() for paint-only reflow (#31219)
PR #31210 avoided the cache for all kinds of reflow, but it's actually
fine to use it for ReflowTriggerCondition::PaintPostponed.
2024-01-30 12:38:20 +00:00
Martin Robinson
a07ad85eaa
dependencies: Upgrade surfman to 0.9 (#31224)
This upgrades surfman and webxr. The main benefit to this upgrade is
that surfman (and thus libservo) no longer depends on winit. servoshell
still does, but this should make upgrades a lot easier.
2024-01-30 12:22:23 +00:00
Martin Robinson
e726893165
mach: Error out sooner with Python < 3.10 (#31225)
We upgraded our Python dependency to 3.10, but neglected to update mach.
This change makes sure we error out sooner, rather than later.
2024-01-30 12:02:23 +00:00
Oriol Brufau
f7ead9bcb6
Lint layout_2013 with clippy (#31221)
* Lint layout_2013 with clippy

CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code

* ./mach fmt

* Cosmetic adjustments
2024-01-30 11:46:35 +00:00
Ngo Iok Ui (Wu Yu Wei)
16cabcf736
Document media configs from prefs (#31223) 2024-01-30 08:52:14 +00:00
Taym Haddadi
967925c119
webidlg: Handle Float64Array as a TypedArray rather than a raw JSObject (#31189)
* WebIDL use FLoat64Array

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

* Use to_vec to convert array to vec

* avoid allocating a new vec

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-30 08:45:29 +00:00
Martin Robinson
7f0d0830e7
deps: Stop vendoring WebRender (#31212)
The new strategy for dependencies with upstream in Gecko is to manage
them in separate repositories, which will more easily allow rebasing our
changes on top of newer Gecko work.
2024-01-30 08:10:13 +00:00
Taym Haddadi
9b6c473695
Remove deprecated remove function (#31213) 2024-01-30 03:49:11 +00:00
dependabot[bot]
2fbb120e94
build(deps): bump indexmap from 2.2.0 to 2.2.1 (#31218)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.2.0 to 2.2.1.
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.0...2.2.1)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 17:24:57 +00:00
dependabot[bot]
2cefd6919a
build(deps): bump serde_json from 1.0.112 to 1.0.113 (#31214)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.112 to 1.0.113.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.112...v1.0.113)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 17:06:59 +00:00
Oriol Brufau
38d9245726
Don't use cached client_rect() when a reflow is needed (#31210)
Fixes #31195:

```js
element.style.width = "5px";
element.clientWidth; // 5
element.style.width = "15px";
element.clientWidth; // Was 5, now 15
```
2024-01-29 14:59:36 +00:00
Taym Haddadi
742d3ed97f
Make HeapFloat32Array generic (#31167)
* Make HeapFloat32Array generic

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

* Define all the methods defaults on the HeapTypedArray trait

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

* Use generic type instead of trait

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

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-29 11:57:50 +00:00
Oriol Brufau
7d1b19c865
Add support for cellpadding attribute (#31201) 2024-01-29 11:51:30 +00:00
atbrakhi
091653417a
use app unit in replaced elements (#31178)
* use app unit in replaced elements

* more app unit usage

* Avoid unnecessary into()

* Run ./mach fmt

* use scaleby

* update

---------

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-01-29 09:21:52 +00:00
arrynfr
271176094d
Update build script to support asahi linux (#31207) 2024-01-28 21:26:38 +00:00
Alex Touchet
b277795abe
Update some more dependencies (#31206) 2024-01-28 18:56:31 +00:00
Servo WPT Sync
20136cad7f
Sync WPT with upstream (28-01-2024) (#31204)
* Update web-platform-tests to revision b'bdd3b533e8c995e416630422ad64f4c70086b42f'

* Update expectations

---------

Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-01-28 18:33:58 +00:00
Alex Touchet
f04135b117
Update non-breaking dependencies (#31203) 2024-01-28 09:44:28 +00:00
Martin Robinson
bc211f8ff3
gfx: Rename WebrenderSurfman to RenderingContext and move to gfx (#31184)
This is a small cleanup that moves and renames this class. The rename is
simply because we are exposing a lot about the details of Servo's
rendering in the API and it makes sense to start thinking about
abstracting that away a bit.

This also moves the struct to `gfx`, which does have an effect on
Servo's dependency graph. This adds a new dependency on gfx to
`compositing`, but `compositing` had a transitive dependency on
gfx before through `canvas`.
2024-01-27 17:58:34 +00:00
Martin Robinson
bbe505e52b
layout: Round clientTop, etc queries to pixels properly (#31187)
* layout: Round getClientRect queries to pixels properly

Instead of just flooring all pixels in getClientRect queries, we should
round the rectangle.

* Fix scrollWidth/scrollHeight too, and tests

* Tests passing

* Test expectation for legacy layout

---------

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-01-27 16:34:21 +00:00
Martin Robinson
bbba839278
Remove the libsimpleservo C API (#31172)
This is unused and unmaintained. It also added a bit of complication
to the build.
2024-01-27 09:19:25 +00:00
Samson
b10875956a
Delete result job in leaf workflows (#31191) 2024-01-27 00:07:04 +00:00
Jason Tsai
919bfe0b08
chore: re-export servo-media types (#31180) 2024-01-26 23:25:38 +00:00
Martin Robinson
5574492505
deps: Remove unused crate dependencies (#31185)
These were identified with `cargo-marchete`.
2024-01-26 23:18:26 +00:00
Oriol Brufau
33127e0e60
Lint layout_2020 with clippy (#31196)
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
2024-01-26 23:15:03 +00:00
dependabot[bot]
79c98f0850
build(deps): bump libz-sys from 1.1.14 to 1.1.15 (#31192)
Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.1.14 to 1.1.15.
- [Release notes](https://github.com/rust-lang/libz-sys/releases)
- [Commits](https://github.com/rust-lang/libz-sys/compare/1.1.14...1.1.15)

---
updated-dependencies:
- dependency-name: libz-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-26 17:21:05 +00:00
dependabot[bot]
815112f8a0
build(deps): bump chrono from 0.4.32 to 0.4.33 (#31190)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.32 to 0.4.33.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.32...v0.4.33)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-26 17:04:41 +00:00
Martin Robinson
1876b49251
layout: Add support for table border-spacing (#31166)
This adds support for table `border-spacing` property. Note that we do
not yet support the collapsed border model.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-01-26 16:07:08 +00:00
Samson
a5c512808a
Matrix in CI and mach try with presets (#31141)
* Matrix in CI and mach try with presets

* small fixups

* names in trigger try run comment

* let

* f

* rename step

* fix running try on win

* fix try branch full

* py3.10

* typo

* Make unit-tests default to false, except in basic os runs

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

* make full use linux-wpt & linux-wpt also include unit-tests

so full is equal to main workflow

* Stylish fixes

* cmp json as dict
2024-01-26 12:29:37 +00:00
Ngo Iok Ui (Wu Yu Wei)
266a082206
Update Servo::get_events to return drain type (#31181)
* Update Servo::get_events to return drain type to prevent constant allocation

* Remove type alias for tlwc

* Fix libsimpleservo
2024-01-26 10:25:12 +00:00
Martin Robinson
21dbf0ad3a
readme: Improve Android docs and update GStreamer runtime deps (#31171)
The Android documentation was missing a few packages that needed to be
installed as well as some quotes to properly run the commands. In
addition, trim down the build setup and move the more complex contents
to the wiki.

Update the GStreamer runtime deps to reflect reality.
2024-01-26 08:56:20 +00:00
Martin Robinson
d68c7e7881
layout: Implement computation of table column widths (#31165)
* layout: Implement computation of table column widths

This change implements the various steps of table column width
computation, ignoring features that don't exist yet (such as separated
borders, column elements, and colgroups).

Co-authored-by: Oriol Brufau <obrufau@igalia.com>

* Fix an issue with the assignment of column percent width

* Respond to review comments

---------

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-01-25 23:13:13 +00:00
dependabot[bot]
dc34eec4d4
build(deps): bump pin-project from 1.1.3 to 1.1.4 (#31177)
Bumps [pin-project](https://github.com/taiki-e/pin-project) from 1.1.3
to 1.1.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/pin-project/releases">pin-project's
releases</a>.</em></p>
<blockquote>
<h2>1.1.4</h2>
<ul>
<li>Suppress <code>clippy::missing_docs_in_private_items</code> and
<code>clippy::missing_inline_in_public_items</code> lints in generated
code. (<a
href="https://redirect.github.com/taiki-e/pin-project/pull/356">#356</a>,
thanks <a
href="https://github.com/daxpedda"><code>@​daxpedda</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md">pin-project's
changelog</a>.</em></p>
<blockquote>
<h2>[1.1.4] - 2024-01-25</h2>
<ul>
<li>Suppress <code>clippy::missing_docs_in_private_items</code> and
<code>clippy::missing_inline_in_public_items</code> lints in generated
code. (<a
href="https://redirect.github.com/taiki-e/pin-project/pull/356">#356</a>,
thanks <a
href="https://github.com/daxpedda"><code>@​daxpedda</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6aefde4e39"><code>6aefde4</code></a>
Release 1.1.4</li>
<li><a
href="017dbf710e"><code>017dbf7</code></a>
Update changelog</li>
<li><a
href="0b650935a6"><code>0b65093</code></a>
Move lint test to sub-crate</li>
<li><a
href="3b38bcf885"><code>3b38bcf</code></a>
Add <code>allow(clippy::missing_docs_in_private_items)</code></li>
<li><a
href="e0edbbcf33"><code>e0edbbc</code></a>
Ignore new clippy lints in tests</li>
<li><a
href="b0dd3419e2"><code>b0dd341</code></a>
Remove extra comma</li>
<li><a
href="3a2ccfe123"><code>3a2ccfe</code></a>
Ignore more clippy lints at workspace level</li>
<li><a
href="05c247eef3"><code>05c247e</code></a>
ci: Check with both -Z minimal-versions and -Z
direct-minimal-versions</li>
<li><a
href="f19afbc6fa"><code>f19afbc</code></a>
ci: Use taiki-e/github-actions/.github/workflows/miri.yml reusable
workflow</li>
<li><a
href="8c6cfbf36f"><code>8c6cfbf</code></a>
Update ui test output to nightly-2024-01-09</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/pin-project/compare/v1.1.3...v1.1.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pin-project&package-manager=cargo&previous-version=1.1.3&new-version=1.1.4)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2024-01-25 17:36:19 +00:00
dependabot[bot]
3fba332316
build(deps): bump bytemuck from 1.14.0 to 1.14.1 (#31176)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.14.0 to
1.14.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Lokathor/bytemuck/blob/main/changelog.md">bytemuck's
changelog</a>.</em></p>
<blockquote>
<h2>1.14.1</h2>
<ul>
<li>docs clarifications.</li>
</ul>
<h2>1.14</h2>
<ul>
<li><code>write_zeroes</code> and <code>fill_zeroes</code> functions:
Writes (to one) or fills (a slice)
zero bytes to all bytes covered by the provided reference. If your type
has
padding, this will even zero out the padding bytes.</li>
<li><code>align_offset</code> feature: causes pointer alignment checks
to use the
<code>align_offset</code> pointer method rather than as-casting the
pointer to <code>usize</code>.
This <em>may</em> improve codegen, if the compiler would have otherwise
thought that
the pointer address escaped. No formal benchmarks have been done either
way.</li>
<li><code>must_cast</code> feature: Adds <code>must_*</code> family of
functions. These functions will
fail to compile if the cast requested can't be statically known to
succeed.
The error messages can be kinda bad when this happens, but eliminating
the
possibility of a runtime error might be worth it to you.</li>
</ul>
<h2>1.13.1</h2>
<ul>
<li>Remove the requirement for the <em>source</em> data type to be
<code>AnyBitPattern</code> on
<code>pod_collect_to_vec</code>, allowing you to pod collect vecs of
<code>char</code> into vecs of
<code>u32</code>, or whatever.</li>
</ul>
<h2>1.13</h2>
<ul>
<li>Now depends on <code>bytemuck_derive-1.4.0</code></li>
<li>Various small enhancements that would have been patch version
updates, but
which have been rolled into this minor version update.</li>
</ul>
<h2>1.12.4</h2>
<ul>
<li>This has additional impls for existing traits and cleans up some
internal code,
but there's no new functions so I guess it counts as just a patch
release.</li>
</ul>
<h2>1.12.3</h2>
<ul>
<li>This bugfix makes the crate do stuff with <code>Arc</code> or not
based on the
<code>target_has_atomic</code> config. Previously, some targets that
have allocation but
not atomics were getting errors. This raises the MSRV of the
<code>extern_crate_alloc</code> feature to 1.60, but opt-in features are
<em>not</em> considered
to be hard locked to 1.34 like the basic build of the crate is.</li>
</ul>
<h2>1.12.2</h2>
<ul>
<li>Fixes <code>try_pod_read_unaligned</code> bug that made it always
fail unless the target
type was exactly pointer sized in which case UB <em>could</em> happen.
The
<code>CheckedBitPattern::is_valid_bit_pattern</code> was being asked to
check that a
<em>reference</em> to the <code>pod</code> value was a valid bit
pattern, rather than the actual
bit pattern itself, and so the check could in some cases be
illegally</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1e1a22e5ea"><code>1e1a22e</code></a>
chore: Release bytemuck version 1.14.1</li>
<li><a
href="2ae1a14a3f"><code>2ae1a14</code></a>
changelog</li>
<li><a
href="8dc32b1e50"><code>8dc32b1</code></a>
Explicitly document that pod_read_unaligned and try_pod_read_unaligned
don't ...</li>
<li><a
href="085a5f573e"><code>085a5f5</code></a>
Revise the crate-level docs.</li>
<li><a
href="c705218630"><code>c705218</code></a>
Added custom crate path with tests (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/209">#209</a>)</li>
<li><a
href="fd27a5b018"><code>fd27a5b</code></a>
Add from_box_bytes and box_bytes_of with BoxBytes type (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/211">#211</a>)</li>
<li><a
href="d10fbfc6ff"><code>d10fbfc</code></a>
allow deriving <code>CheckedBitPattern</code> for enums with fields (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/171">#171</a>)</li>
<li>See full diff in <a
href="https://github.com/Lokathor/bytemuck/compare/v1.14.0...v1.14.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bytemuck&package-manager=cargo&previous-version=1.14.0&new-version=1.14.1)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2024-01-25 17:11:45 +00:00
dependabot[bot]
cb15b98af9
build(deps): bump regex-automata from 0.4.4 to 0.4.5 (#31175)
Bumps [regex-automata](https://github.com/rust-lang/regex) from 0.4.4 to
0.4.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rust-lang/regex/commits/regex-automata-0.4.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex-automata&package-manager=cargo&previous-version=0.4.4&new-version=0.4.5)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2024-01-25 17:06:08 +00:00
Martin Robinson
094f7845b1
layout: Shape text only once (#31146)
Shape text during InlineFormattingContext construction rather than doing
it twice during fragment tree construction. This is a step on the way
toward proper font fallback.

This also moves all `TextRun` related code into `text_run.rs` to try to
trim down the size of `inline.rs`.
<!-- Please describe your changes on the following line: -->


---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because this should only have
performance impacts.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
2024-01-25 14:33:47 +00:00
Taym Haddadi
bb04c97f15
Use Int8array, int16array, uint16array, int32array & uint32array in WebIDL (#31164)
<!-- Please describe your changes on the following line: -->

part #31064

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because there is no behavior
changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

There types are not used we can migrate them, in next PR I will make
`HeapFloat32Array` generic and convert ArrayBufferView, ArrayBuffer,
Uint8ClampedArray and Float64Array.

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-25 14:28:43 +00:00
Oriol Brufau
50f56affe3
Lint layout_2020 with clippy (#31169)
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
2024-01-25 09:03:31 +00:00
Johannes S
886f6c58d4
Replace time with std::time in components/gfx (#31168)
* Replace time with std::time in components/gfx

Signed-off-by: devjos <github_11837948@feido.de>

* Remove time dependency in components/gfx/Cargo.toml

Signed-off-by: devjos <github_11837948@feido.de>

---------

Signed-off-by: devjos <github_11837948@feido.de>
2024-01-25 08:31:40 +00:00
Martin Robinson
af6652fc09
tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)
This fixes an issue where the dylib for harfbuzz cannot be found when
running unit tests on some systems, because unit tests don't get their
rpaths adjusted during build. This is quite likely an issue with dylib
dependency management. We just need a bit more exploration of how this
is traditionally handled.
2024-01-24 12:12:05 +00:00
Delan Azabani
eb95703325
constellation: focusing and closing webviews (#30842)
* constellation: focusing, closing, and native window visibility

* rename “browser” to “webview”, “unfocus” to “blur”

* remove native window visibility from constellation

* rename more “browser” to “webview”

* guard clauses

* don’t automatically focus when no webviews are focused

* comment spec steps for window.close()

* use format interpolation

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* fix formatting

* rename “Webview” to “WebView” in types and type parameters

* remove unused method

* fix libsimpleservo

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-01-24 11:45:54 +00:00
dependabot[bot]
6baaa82826
build(deps): bump chrono from 0.4.31 to 0.4.32 (#31162)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.31 to 0.4.32.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.32)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 17:22:10 +00:00
Taym Haddadi
5d7e2a8239
Implement Event.composedPath (#31123)
* Implement Event.composedPath

* Implement Event.composedPath

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

* Use documentation comments for EventMethods

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

* Update wpt test expectations

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

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-23 14:56:01 +00:00
Martin Robinson
54fb381a0a
layout: Convert layout internal display to inline for replaced elements (#31133)
Replaced elements should never be able to have a layout internal
display, according to the specification. This change makes it so that
the used value of replaced element's display is always inline, as the
specification says.
2024-01-23 12:55:01 +00:00
Taym Haddadi
890588945d
Use Uint8Array for TextEncoder (#31145)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-23 12:15:42 +00:00
Martin Robinson
7de0486e2e
layout: Count word separators as justification opportunities when trimming whitespace (#31161)
Before counting whitepsace-only `GlyphStore`s where counted as a single
justification opportunity when trimming whitespace from the front and
back of lines. This isn't correct, instead count the actual number of
word seperators of the trimmed `GlyphStore`s.

These two counts can be different in the case where whitespace collapse
isn't happening yet (flexbox). In addition, using word seperators means
the code is making less assumptions about the contents of the line and
is more robust.

This fixes some crashes in flexbox tests on debug builds.

Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
2024-01-23 11:47:13 +00:00
dependabot[bot]
1d67aa44ca
build(deps): bump webxr from 21d9e38 to 3b2f303 (#31152)
Bumps [webxr](https://github.com/servo/webxr) from `21d9e38` to `3b2f303`.
- [Commits](21d9e38eab...3b2f303c0b)

---
updated-dependencies:
- dependency-name: webxr
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 11:17:22 +00:00
Martin Robinson
dc2df7b027
build: Add support for Visual Studio 2022 and VC143 DLLs (#31148)
* build: Add support for Visual Studio 2022 and VC143 DLLs

This change adds supports fot Visual Studio 2022 and the VC143 (current)
version of the Visual Studio CRT. In addition, it reworks the way that
Visual Studio is found, returning all installations in a generator,
separately finding it via vswhere.exe, searching paths, and via
environment variables.

All of these installations are searched for the DLLs with highest
priority given to the highest version of MS Visual Studio installed. The
hope is that this makes the process more robust and properly handles
having multiple versions installed, but only one with the correct
runtime DLLs.

* Update based on review comments

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-01-23 11:04:01 +00:00
atbrakhi
45af1198aa
Layout: use Au in ContentSizes (#31135)
* use app_units

* resolve errors in table layout

* fmt

* add back current_line.min_content

* update expectation

* review fix
2024-01-23 10:18:39 +00:00
dependabot[bot]
bd25c07b22
build(deps): bump shlex from 1.2.0 to 1.3.0 (#31156)
Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 05:39:21 +00:00