Commit graph

47363 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
8a63d9e059 style: Simplify our setup for font metric queries from style
While looking at moving the flag around I realized that the only reason
we have FontMetricsProvider and co is because we didn't have access to
the per-document font-prefs cache. That's trivial to fix tho, so do
that and simplify the setup for font queries even more.

Differential Revision: https://phabricator.services.mozilla.com/D157589
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
99d588a90e style: Honor currentColor in HCM
I think it's fair to honor it, just like we honor system color keywords.

By definition if we're forcing colors currentColor can only be forced or
a system color.

Differential Revision: https://phabricator.services.mozilla.com/D157675
2023-11-03 08:59:49 +01:00
Ziran Sun
f1bf68ef25 style: Rename initial value of `container-type' from 'none' to 'normal'
Differential Revision: https://phabricator.services.mozilla.com/D157098
2023-11-03 08:59:49 +01:00
Ziran Sun
3fc54c24e2 style: Disallow 'not', 'and', and 'or' from <container-name>
Differential Revision: https://phabricator.services.mozilla.com/D156805
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
f9f5283a65 style: React to font-size changes on query containers
Much like we react to font-size changes on the root.

Differential Revision: https://phabricator.services.mozilla.com/D157173
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
00c9d9d033 style: Add CSSContainerRule.queryContainerFor(Element)
This actually caught a bug in the existing selection logic.

Differential Revision: https://phabricator.services.mozilla.com/D156414
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
ccad16b560 style: Allow backplating if there's a background-image which is none
Differential Revision: https://phabricator.services.mozilla.com/D156756
2023-11-03 08:59:49 +01:00
Oriol Brufau
3cad1db7f9 Further changes required by Servo 2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
b7773d02d2 style: Make anonymous box wrapping inside XUL boxes be similar to modern flex boxes
I haven't spotted any UI regression from this, and this should generally
make the XUL -> modern flex transition easier, and simplify some
of the relevant code.

This does fix a few layout issues with emulated flexbox.

For the most part, this shouldn't change behavior without that. This
changes behavior if you have mixed inline/non-inline content in the same
XUL box (before they'd get a single item, now you'd get the flexbox /
grid behavior of one item per inline run), and multiple inline-elements
(which would become their own flex items). But I pushed a patch with
some asserts and they didn't fire on our browser mochitests, so I think
we're good.

The UA rule refactoring (removing the inherit from xul anon blocks)
shouldn't matter in practice, since we only have one item (so
box-ordinal is irrelevant) and they have overflow: visible (so
text-overflow and overflow-clip-box shouldn't have an effect).

Differential Revision: https://phabricator.services.mozilla.com/D156375
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
319dca5351 style: Remove layout.css.webkit-line-clamp.enabled, and add a new pref to apply line-clamp to all BFCs
It's always true, so remove it.

Add another pref to allow -webkit-line-clamp to work on all blocks
rather than just legacy -webkit-boxes, which seems something we should
try to look into, eventually.

Depends on D155181

Differential Revision: https://phabricator.services.mozilla.com/D155182
2023-11-03 08:59:49 +01:00
Oriol Brufau
6dafc18b67 Further changes required by Servo 2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
0dfd45ba21 style: Make -webkit-line-clamp create a block container in the appropriate situations
This is a hack, sorta, similar to Chromium's:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_object.cc;l=356;drc=312b74e385e6aba98ab31fd911238c0dc16b396c

except at computed-value rather than used-value time, because it's both
simpler to reason about and prevents lying in the computed style.

This fixes the relevant test-case, and matches closer what Chromium does,
by not creating anonymous flex items for all elements inside the
line-clamp context.

The behavior change is covered by the test changes. I had to also fix a
couple pre-existing bugs that were caught by tests, now that the
line-clamped block is the -webkit-box-styled element rather than an anonymous
flex item (and thus now had padding).

Depends on D155180

Differential Revision: https://phabricator.services.mozilla.com/D155181
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
069304c99c style: Remove @supports selector pref. r=firefox-style-system-reviewers,layout-reviewers,boris
We've shipped it for a while.

Differential Revision: https://phabricator.services.mozilla.com/D156469
2023-11-03 08:59:49 +01:00
Oriol Brufau
98d10f954b Further changes required by Servo 2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
9f6341b83a style: Disallow forgiving selector-parsing in @supports
As per spec, see https://github.com/w3c/csswg-drafts/issues/7280

Differential Revision: https://phabricator.services.mozilla.com/D156468
2023-11-03 08:59:49 +01:00
Frederic Wang
ab36c8a39b style: Make maction/semantics elements behave as an mrow with the first child
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/BWUvjERSXUM

Differential Revision: https://phabricator.services.mozilla.com/D49285
2023-11-03 08:59:49 +01:00
Frederic Wang
2edb151782 style: Do not reset font-weight/font-style when mathvariant is specified
In the past, mathvariant was cancelling the effect of legacy
fontstyle/fontweight attributes by resetting the font-style/font-weight
properties. These legacy attributes have been removed in bug 1783841,
so remove this hack from Stylo and add corresponding WPT test.

Differential Revision: https://phabricator.services.mozilla.com/D156174
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
d130831877 style: Fix typo to avoid devtools property-db failures
MANUAL PUSH: Orange fix CLOSED TREE
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
a44db17432 style: Move line-clamp out of mako and do some adjacent clean-up
No behavior change, but simplifies the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D155180
2023-11-03 08:59:49 +01:00
Jonathan Kew
3fa76ff2e8 style: Update font-tech feature-* keywords to features-*, as per editorial fix in the spec
Differential Revision: https://phabricator.services.mozilla.com/D155962
2023-11-03 08:59:49 +01:00
Oriol Brufau
5c3e8cade4 Further changes required by Servo 2023-11-03 08:59:49 +01:00
Frederic Wang
f196c19106 style: Use ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants
The math-depth implementation is refined to take into account the
ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants (if the
parent's first valid font has a MATH table) in order to calculate the
scale factor between math-deth 0 and 1, and between 0 and 2 respectively.

Behavior is unchanged if the legacy scriptsizemultiplier attribute is
specified or if no MATH table is available.

The preference layout.css.math-depth.enabled remains disabled in nightly
until the remaining bit (support for font-size: math) is implemented in
bug 1667090.

Differential Revision: https://phabricator.services.mozilla.com/D91604
2023-11-03 08:59:49 +01:00
AW255
12a2c88605 style: 0% values are not skipped when parsing CSS transform
Adds trait ZeroNoPercent to check for values that are 0 (such as 0px) but not 0%

Updated test css/css-transforms/animation/translate-interpolation.html and removed unnecessary formatting changes

Differential Revision: https://phabricator.services.mozilla.com/D154930
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
aefbae5f96 style: Improve CSS OM for CSSContainerRule
This implements https://github.com/w3c/csswg-drafts/pull/7293, pending a
spec resolution, so landing test as tentative for now, but the change
makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D155602
2023-11-03 08:59:49 +01:00
Mukilan Thiyagarajan
b268936308
ci: use ubuntu 22.04 on linux runners (#30162)
* ci: use ubuntu 22.04 on linux runners

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* Add env fix

* update expectations for tests under ubuntu-22.04

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-11-03 05:42:44 +00:00
Martin Robinson
a53271d31e
Update network stack dependencies (#30612)
- webpki-roots
- webpki
- async-tungstenite
- rustls
- rustls-webpki
- ring
2023-11-02 18:41:25 +00:00
Martin Robinson
8fd370784e
Update mozjs and setuptools (#30685)
This should fix issues with Python 3.12 on Mac builders.

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
2023-11-02 16:55:12 +00:00
Martin Robinson
f8ec3df495
Fix intermittent crashes in paint worklets (#30671)
Garbage collection means that the worklets might drop after the script
head has been cleaned up. The worklet now caches the thread pool in the
DOM object itself which should prevent it from needing to access script
thread TLS when being cleaned up. The value is stored as a OnceCell to
maintain the same lazy thread pool creation pattern as before.

Fixes #25838.
Fixes #25258.
2023-11-02 14:55:50 +00:00
Samson
c2af95d2fc
Unit tests are becoming more flaky, so retry them (#30682)
* Unit tests are becoming more flaky, so retry them

* Timeouts everywhere

* Limit windows test threads for unit tests
2023-11-02 15:23:04 +00:00
Martin Robinson
f5627ce4cc
Remove __future__ imports that are no longer necessary (#30661)
These are no longer necessary as we always use Python 3.
2023-11-02 12:01:10 +00:00
dependabot[bot]
7e643f46d7
build(deps): bump web-sys from 0.3.64 to 0.3.65 (#30673)
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.64 to 0.3.65.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: web-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>
2023-11-02 08:14:13 +00:00
dependabot[bot]
ac852f6c38
build(deps): bump js-sys from 0.3.64 to 0.3.65 (#30674)
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.64 to 0.3.65.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: js-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>
2023-11-02 08:14:09 +00:00
Samson
31ca45e589
Replace environmental cargo_profile___ with ${{}} (#30658) 2023-11-02 05:57:08 +00:00
Martin Robinson
af68769007
Remove an unused file (#30662)
This was probably used for the now removed homebrew package.
2023-11-01 20:01:01 +00:00
atbrakhi
01b30e1552
Cleanup: rename to top_level_browsing_context_id for consistency (#30663)
* rename to top_level_browsing_context_id for consistency

* fmt
2023-11-01 20:00:55 +00:00
dependabot[bot]
9227069076
build(deps): bump mio from 0.8.8 to 0.8.9 (#30677)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.8 to 0.8.9.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.8...v0.8.9)

---
updated-dependencies:
- dependency-name: mio
  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>
2023-11-01 18:07:13 +00:00
dependabot[bot]
f2bd0394c3
build(deps): bump wasm-bindgen from 0.2.87 to 0.2.88 (#30676)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.87 to 0.2.88.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.87...0.2.88)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  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>
2023-11-01 17:13:30 +00:00
dependabot[bot]
4fd96e2905
build(deps): bump fdeflate from 0.3.0 to 0.3.1 (#30675)
Bumps [fdeflate](https://github.com/image-rs/fdeflate) from 0.3.0 to 0.3.1.
- [Changelog](https://github.com/image-rs/fdeflate/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/fdeflate/commits/v0.3.1)

---
updated-dependencies:
- dependency-name: fdeflate
  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>
2023-11-01 17:13:26 +00:00
Martin Robinson
27527142bd
Update rust version to "nightly-2023-03-18" (#30630)
This is necessary to update the network stack.
2023-11-01 13:28:26 +00:00
Varun Dhand
364d11f15f
Update textinput.rs (#30643) 2023-11-01 13:27:32 +00:00
Martin Robinson
6c4f098d41
Add better support for line breaking across inline box boundaries (#30628)
Earlier versions of inline layout in the new layout system did not
properly support line breaking when unbreakable segments spanned
multiple inline boxes. This change updates inline layout to add support
for that. Now items are added to an unbreakable segment before being
committed to a line.

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2023-11-01 13:27:14 +00:00
Samson
4d573dffa3
Use py3.11 on mac runners (#30670) 2023-11-01 12:07:09 +00:00
Martin Robinson
79cceab064
Update ipc-channels (#30660)
Along with an update to `webxr` and `media` this allows us to finally
get rid of our forked version of `mio` 0.6.
2023-10-31 11:06:05 +00:00
dependabot[bot]
7064be3192
build(deps): bump ab_glyph from 0.2.22 to 0.2.23 (#30654)
Bumps [ab_glyph](https://github.com/alexheretic/ab-glyph) from 0.2.22 to 0.2.23.
- [Release notes](https://github.com/alexheretic/ab-glyph/releases)
- [Commits](https://github.com/alexheretic/ab-glyph/compare/ab-glyph-0.2.22...ab-glyph-0.2.23)

---
updated-dependencies:
- dependency-name: ab_glyph
  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>
2023-10-31 09:23:04 +00:00
Martin Robinson
9d9c5d3ca9
Vendor mozdebug and stop using distutils (#30659)
The version of `mozdebug` installable via pip is two years old and
Mozilla is slow to release new versions. It also uses `distutils` which
doesn't work on newer Python versions. Vendor it and stop using
`distutils` there.
2023-10-31 09:42:14 +00:00
Servo WPT Sync
4ea042cb14
Sync WPT with upstream (29-10-2023) (#30641)
* Update web-platform-tests to revision b'9f24a7061dc47c00ffe3f0f6dda5822a9b15c2a5'

* Update expectations

---------

Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-10-31 05:06:17 +00:00
dependabot[bot]
61f7e43322
build(deps): bump futures-executor from 0.3.28 to 0.3.29 (#30655)
Bumps [futures-executor](https://github.com/rust-lang/futures-rs) from 0.3.28 to 0.3.29.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.28...0.3.29)

---
updated-dependencies:
- dependency-name: futures-executor
  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>
2023-10-30 17:39:12 +00:00
dependabot[bot]
e571022058
build(deps): bump serde_json from 1.0.107 to 1.0.108 (#30653)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.107 to 1.0.108.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.107...v1.0.108)

---
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>
2023-10-30 17:37:09 +00:00
dependabot[bot]
64e42c8de2
build(deps): bump brotli-decompressor from 2.5.0 to 2.5.1 (#30652)
Bumps [brotli-decompressor](https://github.com/dropbox/rust-brotli-decompressor) from 2.5.0 to 2.5.1.
- [Commits](https://github.com/dropbox/rust-brotli-decompressor/commits)

---
updated-dependencies:
- dependency-name: brotli-decompressor
  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>
2023-10-30 17:22:37 +00:00
Martin Robinson
a354b5fc3d
One more fix for trying via a label (#30650)
This fixes spurious test results due to expectations not
reflecting the PR that is being tried. This change was made to other
files, but not the ones that ran tests.
2023-10-30 15:53:21 +00:00