Commit Graph

14118 Commits

Author SHA1 Message Date
David Shin
8c02818079 Bug 1771980 - Refactor function parsing branches for specified::easing::TimingFunction. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149756
2022-06-20 17:45:03 +00:00
Emilio Cobos Álvarez
5a2d3c5d54 Bug 1774946 - Check for allowed colors recursively in forced-colors mode. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D149733
2022-06-20 14:07:12 +00:00
Tiaan Louw
2a83b583b1 Bug 1771896 - Add simple parsing and matching support for :has r=emilio
Parsing is behind a config value `layout.css.has-selectors.enabled`. This
change does not support p:has(> a) combinators, but will handle them
gracefully, just not matching on them.

Differential Revision: https://phabricator.services.mozilla.com/D149515
2022-06-20 08:53:02 +00:00
Emilio Cobos Álvarez
46ef76a7d7 Bug 1774791 - Fix grid shorthand parsing to not incorrectly ignore the last token in one case. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D149666
2022-06-17 20:50:37 +00:00
Mike Hommey
a211cd2aea Bug 1774501 - Update stylo to itertools:0.10, itoa:1.0 and toml:0.5. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149454
2022-06-16 20:44:03 +00:00
Jonathan Kew
64fcd19655 Bug 1771215 - Only accept the CSS2 font-variant values (normal/small-caps) in the font shorthand; CSS Fonts 3/4 font-variant additions are not allowed. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149440
2022-06-16 12:13:54 +00:00
Emilio Cobos Álvarez
bf4306b284 Bug 1774224 - Fix dynamic viewport size. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D149275
2022-06-15 09:55:57 +00:00
Emilio Cobos Álvarez
d43049661f Bug 1773484 - Make viewport-relative units zoomable via "zoom text only". r=boris
They're not font relative, so it we probably want them to be zoomed.

Differential Revision: https://phabricator.services.mozilla.com/D148796
2022-06-14 08:38:11 +00:00
Boris Chiou
2b8751f919 Bug 1754897 - Part 4: Hook named scroll timelines to animation-timeline. r=emilio
Basically, animation-timeline could be
1. auto
2. none
3. <timeline-name>

We extend the <timeline-name> to cover both @scroll-timeline rule and
scroll-timeline-name property. We check @scroll-timeline rule first. If
it doesn't exist, we check scroll-timeline-name of the element itself,
the previous silbings, and their ancestors.

Differential Revision: https://phabricator.services.mozilla.com/D146358
2022-06-13 20:26:45 +00:00
Boris Chiou
f1b5d17847 Bug 1754897 - Part 3: Support scroll-timeline shorthand in style system. r=emilio
Implement
"scroll-timeline: <'scroll-timeline-axis'> || <'scroll-timeline-name'>".

Differential Revision: https://phabricator.services.mozilla.com/D146020
2022-06-13 20:26:45 +00:00
Boris Chiou
e9d0888406 Bug 1754897 - Part 2: Support scroll-timeline-axis longhand in style system. r=emilio
Implement "scroll-timeline-axis: block | inline | vertical | horizontal".

Differential Revision: https://phabricator.services.mozilla.com/D146019
2022-06-13 20:26:45 +00:00
Boris Chiou
cd0ef479a6 Bug 1754897 - Part 1: Support scroll-timeline-name longhand in style system. r=emilio
Implement "scroll-timeline-name: none | <custom-ident>".

Differential Revision: https://phabricator.services.mozilla.com/D146018
2022-06-13 20:26:44 +00:00
Emilio Cobos Álvarez
9fc2aa47fc Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Noemi Erli
841e350bc4 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez
e441089ca0 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Mike Hommey
c143e86971 Bug 1773399 - Update derive_more to 0.99.17. r=emilio,gfx-reviewers,nical
Limit its features to those we actually use, which turns out is none for
webrender_api.

Differential Revision: https://phabricator.services.mozilla.com/D148734
2022-06-11 20:34:18 +00:00
Emilio Cobos Álvarez
647a9887bf Bug 1771725 - Add a low-priority selector list for pseudo-classes that have global rules. r=boris
This avoids trying to match those global rules for most elements that
can't match them anyways.

Differential Revision: https://phabricator.services.mozilla.com/D147640
2022-06-09 12:16:26 +00:00
Tiaan Louw
10dbaef1e0 Bug 1768535 - Rename :-moz-modal-dialog to :modal r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D148751
2022-06-09 08:58:52 +00:00
Emilio Cobos Álvarez
47afabb81a Bug 1773070 - While at it use some better names for some bits. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148538
2022-06-07 23:09:53 +00:00
Emilio Cobos Álvarez
255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
David Shin
14611a24e8 Bug 1764126 - Part 4: Add parsing for linear easing function and gate it behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146839
2022-06-07 11:51:24 +00:00
David Shin
e46f5534e2 Bug 1764126 - Part 3: Hook up linear easing calculation for servo and expose it to C++. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146838
2022-06-07 11:51:24 +00:00
David Shin
c79a8137f5 Bug 1764126 - Part 2: Rust side plumbing work for linear easing function. r=emilio
Add LinearFunction to TimingFunction. Because the linear function is a
variable list of linear stops, the enum is no longer Copyable.

Differential Revision: https://phabricator.services.mozilla.com/D146837
2022-06-07 11:51:24 +00:00
Emilio Cobos Álvarez
9b518ab15c Bug 1772690 - Fix opt builds.
MANUAL PUSH: Trivial build fix CLOSED TREE
2022-06-05 23:42:05 +02:00
Emilio Cobos Álvarez
fb05cda721 Bug 1772690 - Add a debug-only ComputedStyle::DumpMatchedRules(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D148336
2022-06-05 21:21:10 +00:00
Emilio Cobos Álvarez
b24faeba30 Bug 1750102 - Add an input-region-margin to widgets, and implement it on Linux. r=stransky
Recompute the input region when resizing the widget and so on, and use
it to check for rollups.

Depends on D148211

Differential Revision: https://phabricator.services.mozilla.com/D148222
2022-06-04 12:41:06 +00:00
Emilio Cobos Álvarez
50fea61916 Bug 1770829 - Use ColorMix for interpolated colors in the computed style rather than ComplexColorRatios. r=barret
This among other things preserves the right color-space when
interpolating currentColor.

Differential Revision: https://phabricator.services.mozilla.com/D147512
2022-06-03 19:11:07 +00:00
Marian-Vasile Laza
c7d153ca29 Backed out changeset c8b026cff732 (bug 1750102) for causing bc failures on browser_test_autoscrolling_in_extension_popup_window.js. CLOSED TREE 2022-06-03 20:12:55 +03:00
Emilio Cobos Álvarez
c6c289ff2d Bug 1750102 - Add an input-region-margin to widgets, and implement it on Linux. r=stransky
Recompute the input region when resizing the widget and so on, and use
it to check for rollups.

Depends on D148211

Differential Revision: https://phabricator.services.mozilla.com/D148222
2022-06-03 10:39:13 +00:00
Emilio Cobos Álvarez
9349aeea85 Bug 1771796 - Remove -moz-scrollbar-thumb-proportional. r=dholbert
It unconditionally matches on all platforms, so it's not returning any useful information.

Depends on D147689

Differential Revision: https://phabricator.services.mozilla.com/D147690
2022-06-02 11:58:18 +00:00
Mike Hommey
c84e4eef26 Bug 1770894 - Update style to uluru 3.0. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147477
2022-05-31 22:05:05 +00:00
Mike Hommey
82584b1b75 Bug 1770894 - Update style to arrayvec 0.7. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147476
2022-05-31 22:05:04 +00:00
Mike Hommey
d24426da1a Bug 1770894 - Update phf to 0.10. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147378
2022-05-31 22:05:02 +00:00
Mike Hommey
2b227894ee Bug 1771993 - Fix warnings about whitelist/blocklist functions being deprecated in bindgen 0.59. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147695
2022-05-31 21:40:29 +00:00
Emilio Cobos Álvarez
f9b1d27b17 Bug 1771792 - Remove some dead vibrancy code. r=mstange
Drive-by cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D147698
2022-05-31 10:43:29 +00:00
Emilio Cobos Álvarez
899b2b6d55 Bug 1770829 - Improve Percentage -> LengthPercentage conversion. r=barret
This doesn't change behavior because we only use them for images that
have no clamping.

Depends on D147008

Differential Revision: https://phabricator.services.mozilla.com/D147511
2022-05-31 08:33:50 +00:00
Emilio Cobos Álvarez
5e23244d4e Bug 1770616 - Do hue interpolations in degrees rather than radians. r=barret
This gives us a bit more precision.

Differential Revision: https://phabricator.services.mozilla.com/D147007
2022-05-31 08:33:49 +00:00
Emilio Cobos Álvarez
24b1154a40 Bug 1770616 - Fix hue adjustment to match the spec. r=barret
The value to sum is tau, not pi. This was caught by some tests, see
https://drafts.csswg.org/css-color/#shorter

Differential Revision: https://phabricator.services.mozilla.com/D147006
2022-05-31 08:33:48 +00:00
Emilio Cobos Álvarez
db07ccc495 Bug 1770616 - Fix color-mix() percentage normalization. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D147005
2022-05-31 08:33:48 +00:00
Emilio Cobos Álvarez
e38118b831 Bug 1770616 - Implement more color-mix() color-spaces. r=barret
We had code to convert between these and the latest draft supports them so...

Differential Revision: https://phabricator.services.mozilla.com/D147004
2022-05-31 08:33:48 +00:00
Emilio Cobos Álvarez
817ea22aaf Bug 1770616 - Make the color interpolation code more generic. r=barret
It's really piece-wise premultiplied interpolation, with a special-case
for hue, so centralize the implementation.

Differential Revision: https://phabricator.services.mozilla.com/D147003
2022-05-31 08:33:47 +00:00
Emilio Cobos Álvarez
711d458368 Bug 1770616 - Update color-mix() syntax to match the current spec. r=barret
Test expectation updates for this in the latest patch of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D147002
2022-05-31 08:33:47 +00:00
Hiroyuki Ikezoe
43bb9dc340 Bug 1312165 - Parse scroll-snap-stop style and propagate it to APZ side. r=emilio,botond
Depends on D146147

Differential Revision: https://phabricator.services.mozilla.com/D145850
2022-05-31 00:45:11 +00:00
criss
9933879ba5 Backed out changeset 68b233bf0519 (bug 1771792) for causing xpcshell failures on test_css-properties-db.js . CLOSED TREE 2022-05-31 02:06:55 +03:00
Emilio Cobos Álvarez
22ec54e75f Bug 1771792 - Remove some dead vibrancy code. r=mstange
Drive-by cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D147698
2022-05-30 22:17:11 +00:00
Cosmin Sabou
d3d37bf987 Backed out 4 changesets (bug 1770894) for causing build bustages.
Backed out changeset d4bd20e7ac74 (bug 1770894)
Backed out changeset ae6ffff33128 (bug 1770894)
Backed out changeset 2e4f492a8222 (bug 1770894)
Backed out changeset 13111f4c114a (bug 1770894)
2022-05-31 01:18:01 +03:00
Mike Hommey
999dd5b3ae Bug 1770894 - Update phf to 0.10. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147378
2022-05-30 21:37:37 +00:00
Mike Hommey
7b06b12d90 Bug 1770894 - Update in-tree crates to bindgen 0.59. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147221
2022-05-30 21:37:31 +00:00
Emilio Cobos Álvarez
1c2f2f9e15 Bug 1771764 - Remove 'static bound for ToShmem for Arc/ThinArc. r=dshin,layout-reviewers
It was only needed so that we could assert with TypeId::of::<T> that we
don't have duplicate values except for an exception.

Instead, fix the exception and remove the bound.

Differential Revision: https://phabricator.services.mozilla.com/D147669
2022-05-30 19:07:27 +00:00
Emilio Cobos Álvarez
f64de373aa Bug 1381071 - Cache computed styles objects display: none subtrees. r=boris
This reuses our existing undisplayed style generation, but in a
per-document rather than per-nsComputedDOMStyle object, which means that
we can avoid re-resolving styles of elements in display: none subtrees
much more often.

This brings the test-case in the bug to par with other browsers or
better, and is much simpler than the initial approach I tried back in
the day.

Differential Revision: https://phabricator.services.mozilla.com/D147547
2022-05-30 11:08:15 +00:00