Commit graph

46726 commits

Author SHA1 Message Date
Martin Robinson
ce183d8581
Only access hit test items for the current epoch in the compositor (#30491)
When display lists update quickly, a hit test result might be returned
for a previous display list / list of hit test items. When that happens,
ignore the hit test result.

This fixes a crash, but there might be situations where we can do
something better, such as wait for display list processing to finish
before performing the hit test. A future change might do this for events
like mouse clicks and touch events that should never be thrown away.
Ultimately, the best thing is likely moving hit testing back to layout
or script so a valid hit test can always be performed against the
current DOM.

Fixes #29796.
2023-10-04 16:33:18 +00:00
Ngo Iok Ui (Wu Yu Wei)
38a325cc1c
Add shell.background-color.rgba to prefs (#30488)
* Add shell.transparent-background.enabled to prefs

* Rename config to background_color

* Rename to background-color and.rgba add PrefValue::Array variant
2023-10-04 13:16:16 +00:00
Mukilan Thiyagarajan
ffac882f8f
Add taplo to etc/shell.nix (#30487)
This addresses the 'Could not find `taplo` ...' message
when running `./mach test-tidy` on NixOS.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-10-04 11:47:12 +00:00
Ennui Langeweile
f7c340f881
Implement support for the drop-shadow filter (#30439)
* Implement support for `drop-shadow`

* Clean up remnant from early attempts

* Fix misleading comments on GenericSimpleShadow
If Servo-specific `style` changes will need to be upstreamed anyway, I might as well fix a thing that had thrown me off!

* Revert "Fix misleading comments on GenericSimpleShadow"

This reverts commit cdc810b826ac082041adc212c24649ee3b86ca0a.

* Clean up an import

* Update test expectations

* Fix missing expectation on Layout 2013
2023-10-04 11:32:45 +00:00
Samson
8436002383
Support Namespace const in webidl (#30492)
* Add TestNS with const

* Implement namespace const in codegen
2023-10-04 11:29:54 +00:00
Ngo Iok Ui (Wu Yu Wei)
a31e2ea576
Fix macOS's sameple isn't used in background_hang_monitor (#30490) 2023-10-04 06:59:45 +00:00
dependabot[bot]
1552a77e5c
build(deps): bump linux-raw-sys from 0.4.7 to 0.4.8 (#30484)
Bumps [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) from 0.4.7 to 0.4.8.
- [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.7...v0.4.8)

---
updated-dependencies:
- dependency-name: linux-raw-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-10-04 03:18:22 +00:00
Martin Robinson
1236bb32e7
Remove some unused buildbot files (#30476) 2023-10-03 23:30:18 +00:00
Martin Robinson
0c5d03b720
Fix libsimpleservo build (#30481)
It seems the build has been broken on desktop platforms. This is a
preliminary fix to getting this build on the bots.

This is mainly missing includes, but `package-prefs.json` is no longer
processed because that was only used for the UWP port (now removed.
2023-10-03 19:52:57 +00:00
dependabot[bot]
8848ed7657
build(deps): bump regex from 1.9.5 to 1.9.6 (#30483)
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.5 to 1.9.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.5...1.9.6)

---
updated-dependencies:
- dependency-name: regex
  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-03 17:22:27 +00:00
Martin Robinson
8834ff766c
De-duplicate itertools (#30472)
Fixes #30460.
2023-10-03 16:36:58 +00:00
Samson
bd9c17234c
fix handle_wgpu_msg crash (#30479)
* Enter realm before handle_wgpu_msg

fix https://github.com/servo/servo/issues/30419

* Update expectations
2023-10-03 15:16:42 +00:00
Martin Robinson
dfd14aabef
Fix pinch zoom and enable it for TouchpadMagnify events (#30459)
Pinch zoom was broken because pinch zoom events were triggered at -1, -1
in the compositor. This change:

1. Differentiates between magnify and scroll events in the compositor to
   remove the question of where to trigger them.
2. Converts winit TouchpadMagnify events into pinch zoom events so that
   this works properly on MacOS.
2023-10-03 12:49:36 +00:00
Martin Robinson
f78d53daaa
Adjust the missing taplo message (#30473)
The current message doesn't have a line break where you would expect it
to and instead has a gap due to the indentation of the code in Python.
2023-10-03 10:23:02 +00:00
dependabot[bot]
f5d40a473b
build(deps): bump brotli from 3.3.4 to 3.4.0 (#30462)
Bumps [brotli](https://github.com/dropbox/rust-brotli) from 3.3.4 to 3.4.0.
- [Release notes](https://github.com/dropbox/rust-brotli/releases)
- [Commits](https://github.com/dropbox/rust-brotli/commits)

---
updated-dependencies:
- dependency-name: brotli
  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>
2023-10-02 23:33:58 +00:00
dependabot[bot]
e47f437390
build(deps): bump errno from 0.3.3 to 0.3.4 (#30470)
Bumps [errno](https://github.com/lambda-fairy/rust-errno) from 0.3.3 to 0.3.4.
- [Changelog](https://github.com/lambda-fairy/rust-errno/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lambda-fairy/rust-errno/compare/v0.3.3...v0.3.4)

---
updated-dependencies:
- dependency-name: errno
  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-02 18:18:44 +00:00
dependabot[bot]
ed11b46ebc
build(deps): bump memchr from 2.6.3 to 2.6.4 (#30464)
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.6.3 to 2.6.4.
- [Commits](https://github.com/BurntSushi/memchr/compare/2.6.3...2.6.4)

---
updated-dependencies:
- dependency-name: memchr
  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-02 18:11:18 +00:00
dependabot[bot]
835b751558
build(deps): bump brotli-decompressor from 2.3.4 to 2.3.5 (#30469)
Bumps [brotli-decompressor](https://github.com/dropbox/rust-brotli-decompressor) from 2.3.4 to 2.3.5.
- [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-02 18:09:49 +00:00
dependabot[bot]
230ffa0b95
build(deps): bump itoa from 1.0.1 to 1.0.9 (#30468)
Bumps [itoa](https://github.com/dtolnay/itoa) from 1.0.1 to 1.0.9.
- [Release notes](https://github.com/dtolnay/itoa/releases)
- [Commits](https://github.com/dtolnay/itoa/compare/1.0.1...1.0.9)

---
updated-dependencies:
- dependency-name: itoa
  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-02 18:08:58 +00:00
dependabot[bot]
9b1173a14b
build(deps): bump regex-automata from 0.3.8 to 0.3.9 (#30467)
Bumps [regex-automata](https://github.com/rust-lang/regex) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-automata-0.3.8...regex-syntax-0.3.9)

---
updated-dependencies:
- dependency-name: regex-automata
  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-02 17:59:36 +00:00
dependabot[bot]
0c6c3a2270
build(deps): bump atomic_refcell from 0.1.11 to 0.1.12 (#30466)
Bumps [atomic_refcell](https://github.com/bholley/atomic_refcell) from 0.1.11 to 0.1.12.
- [Commits](https://github.com/bholley/atomic_refcell/commits)

---
updated-dependencies:
- dependency-name: atomic_refcell
  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-02 17:59:27 +00:00
dependabot[bot]
ccb3570b26
build(deps): bump webpki from 0.22.1 to 0.22.2 (#30465)
Bumps [webpki](https://github.com/briansmith/webpki) from 0.22.1 to 0.22.2.
- [Commits](https://github.com/briansmith/webpki/commits)

---
updated-dependencies:
- dependency-name: webpki
  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-02 17:51:59 +00:00
dependabot[bot]
cc30e7ecd7
build(deps): bump rustix from 0.38.14 to 0.38.15 (#30461)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.14 to 0.38.15.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.14...v0.38.15)

---
updated-dependencies:
- dependency-name: rustix
  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-02 17:46:19 +00:00
Oriol Brufau
ad00a11638 Update test expectations 2023-10-02 14:37:19 +00:00
Oriol Brufau
9d01be8e0f Avoid complaints from ./mach test-tidy 2023-10-02 14:37:19 +00:00
Oriol Brufau
601de9049c Further changes required by Servo 2023-10-02 14:37:19 +00:00
Jonathan Kew
2fb319ede2 style: Implement CSS @supports font-format(...) and font-tech(...) functions
These are gated by the same layout.css.font-tech.enabled pref as the
closely-related `tech()` function for the @font-face src descriptor;
once the spec questions are settled, we should enable them all together.

Differential Revision: https://phabricator.services.mozilla.com/D155359
2023-10-02 14:37:19 +00:00
Oriol Brufau
6f2861e466 Further changes required by Servo 2023-10-02 14:37:19 +00:00
Jonathan Kew
0cdf97c881 style: Put the @font-face src tech() function behind a pref, enabled only on Nightly for now
There are a couple of current issues/discussions that may lead to a change in the set of supported keywords, so we may want to hold back a little on actually shipping this.

- In https://github.com/w3c/IFT/pull/113, the WebFonts WG proposes several new incremental-* keywords (and maybe implies dropping the currently-defined incremental?)

- In https://github.com/w3c/csswg-drafts/issues/7633, I just proposed renaming the feature-* keywords to features-* (plural) for better readability; I'd like to see a decision on that before we ship this to release.

Differential Revision: https://phabricator.services.mozilla.com/D155458
2023-10-02 14:37:19 +00:00
Connor Pearson
c8e3dc4d19 style: When serializing background shorthand skip initial values and order values according to grammar
Differential Revision: https://phabricator.services.mozilla.com/D155077
2023-10-02 14:37:19 +00:00
Oriol Brufau
76192031d3 Further changes required by Servo 2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
cc09c2ffb1 style: Add basic support for nan / infinity in calc()
Fix some tests to:

  * Not assume `double` precision.
  * Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295

Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.

Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.

I left those untouched for now.

Differential Revision: https://phabricator.services.mozilla.com/D154883
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
dd849de9d9 style: Implement atan2(), and enable calc() trigonometric functions by default on nightly
We now have test coverage, so let's do this.

The remaining failures are just about infinity/nan, which is a
completely different feature.

Differential Revision: https://phabricator.services.mozilla.com/D154831
2023-10-02 14:37:19 +00:00
Oriol Brufau
03e84754cc Further changes required by Servo 2023-10-02 14:37:19 +00:00
Jonathan Kew
fa8b5f17e3 style: Add support for the @font-face src descriptor's tech() function
WPT tests to be added in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D154399
2023-10-02 14:37:19 +00:00
Jonathan Kew
52d1e07ee2 style: Use the style-system format hint directly in gfx, instead of mapping to a separate internal enum
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)

Depends on D154237

Differential Revision: https://phabricator.services.mozilla.com/D154238
2023-10-02 14:37:19 +00:00
Oriol Brufau
87bee1710c Further changes required by Servo 2023-10-02 14:37:19 +00:00
Jonathan Kew
31b2a54164 style: Accept keywords in addition to strings in the @font-face format() hint function
The CSS Fonts 4 spec requires this, and Safari (at least) has long supported it.

Depends on D154277

Differential Revision: https://phabricator.services.mozilla.com/D154237
2023-10-02 14:37:19 +00:00
Jonathan Kew
65e6e072ea style: Do not allow a list of strings in the @font-face src descriptor's format() function, only a single format string
This aligns with CSS Fonts 4 (rather than Fonts 3) and with behavior in other browsers;
I don't expect any significant breakage, given that specifying multiple format strings
was never supported in other engines AFAIK, and never served any useful purpose.

Depends on D154234

Differential Revision: https://phabricator.services.mozilla.com/D154235
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
b43ac59344 style: Don't use -moz-bool-pref for flexbox -moz-box emulation
Use a bool pref media query which allows dynamic changes to get
reflected instantly.

Differential Revision: https://phabricator.services.mozilla.com/D154449
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
648a6c14cf style: Add a chrome-only -moz-box-layout: legacy | flex, and use that to implement flexbox emulation
Differential Revision: https://phabricator.services.mozilla.com/D154153
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
4947dd027d style: Remove -moz-* display values enabled-in-content prefs
We have unshipped these since forever, no point in keeping the pref
around. Move the relevant tests to chrome ref/mochitests.

Differential Revision: https://phabricator.services.mozilla.com/D154152
2023-10-02 14:37:19 +00:00
Boris Chiou
deeb5efd84 style: Remove aspect-ratio preference
We shipped this in Firefox 89, one year ago. It should be okay to drop
this preference now.

Differential Revision: https://phabricator.services.mozilla.com/D153680
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
befb407057 style: Make color-scheme affect Windows' non-native menus
This matches what Linux and macOS do, and that allows the fix for bug 1782623
to work on Windows for unstyled selects.

This also simplifies the CSS (though it adds a new system color which is a bit
more annoying). I filed https://github.com/w3c/csswg-drafts/issues/7561 to
propose adding a more generic way to do this in the future (not just for
Firefox).

Differential Revision: https://phabricator.services.mozilla.com/D153549
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
f1e04f76f0 style: Properly fail to serialize grid shorthand when not roundtripping
Other browsers also don't roundtrip properly, but they fail less
severely.

Differential Revision: https://phabricator.services.mozilla.com/D152794
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
59da4326fd style: Remove nsTimingFunction and ComputedTimingFunction
They're simple wrappers of StyleComputedTimingFunction so we can remove
them.

Differential Revision: https://phabricator.services.mozilla.com/D152700
2023-10-02 14:37:19 +00:00
David Shin
c296356a8c style: linear(...) easing: Implement right-continuous behaviour on discontinuities
Differential Revision: https://phabricator.services.mozilla.com/D152078
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
2a1e89468a style: Ensure we cancel transitions without the need of an extra flush
When something switches to display: none, right now we rely on
StopAnimationsForElementsWithoutFrames(), which posts a restyle and the
previous ProcessPendingRestyles call was papering over it.

For other elements in the display none subtree it doesn't matter,
because we don't keep their styles around, but for the display: none
element themselves we do need to update transitions on time.

We could, possibly more generally, remove
StopAnimationsForElementsWithoutFrames() altogether and cancel
animations when we clear style data, perhaps... But that's probably
worth a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D151600
2023-10-02 14:37:19 +00:00
Emilio Cobos Álvarez
a961519a56 style: Propagate flags from original property to aliases
Even we don't have internal aliases right now (and that seems a bit
silly) we do have pref-gated aliases. An alias ID passed to IsEnabled
with the wrong EnabledState would misbehave, assert, and crash.

Though we don't have such callers in the tree because InspectorUtils
passes only arguments that make us not look at the flags, it seems more
reliable this way.

Differential Revision: https://phabricator.services.mozilla.com/D151594
2023-10-02 14:37:19 +00:00
Oriol Brufau
9622d4912e Further changes required by Servo 2023-10-02 14:37:19 +00:00