Commit graph

11119 commits

Author SHA1 Message Date
Ziran Sun
ed8c7e5344 Bug 1869472 - Make "Custom" variants use the same code path as others in AnimationValue::eq. r=zrhoffman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D196993
2024-01-03 10:07:28 +00:00
Emilio Cobos Álvarez
877078107a Bug 1871513 - Remove an assert that doesn't hold anymore with first-line reparenting. r=dholbert
After the regressing bug, first-line reparenting starts off with the
to-be-reparented style, so the display value is already the expected
(grid) rather than block.

Differential Revision: https://phabricator.services.mozilla.com/D197251
2024-01-02 07:45:26 +00:00
Emilio Cobos Álvarez
35c465dca0 Bug 1872399 - Clean-up -moz-window-shadow set-up. r=dholbert
-moz-window-shadow is a chrome-only property (not exposed to the web),
and chrome stylesheets only use the none value to disable the default
behavior.

Split the style property (default/none) from the actual widget behavior.
This is useful because I want to add a distinction between
natively-styled menupopups and other panels in the following commit.

While at it rename default to "auto" which is a more common name in CSS
for something like this.

We have no use case for removing the shadow of a top-level window, so
remove it to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D197454
2023-12-31 21:53:32 +00:00
Emilio Cobos Álvarez
61474d6767 Bug 1871745 - Hide -moz-user-focus from content. r=smaug
-moz-user-focus: none didn't do anything useful for non-XUL until
bug 1868552. It seems nonetheless some sites specify it, which can cause
compat issues.

Let's hide this property from content, to avoid breaking those sites.

Differential Revision: https://phabricator.services.mozilla.com/D197253
2023-12-28 17:45:49 +00:00
Mike Hommey
501f861c99 Bug 1871884 - Use the equivalent of std::ptr::addr_eq in servo_arc::Arc::ptr_eq. r=emilio
1.76 added a warning when comparing pointers with metadata (e.g. a size
or trait vtable), and suggests to use explicit comparisons, either
std::ptr::addr_eq to only compare the address or std::ptr::eq to compare
address + metadata.

The current semantics of Arc::ptr_eq are to compare address + metadata,
but the intended semantics are to compare the address. So we do that.

Differential Revision: https://phabricator.services.mozilla.com/D197275
2023-12-26 22:56:56 +00:00
Norisz Fay
61a6945d95 Backed out changeset 65525b63d6cf (bug 1871745) for causing bc failures on browser_bug462289.js, browser_PanelMultiView_focus.js CLOSED TREE 2023-12-26 13:47:27 +02:00
Emilio Cobos Álvarez
e25e84b4e0 Bug 1871745 - Hide -moz-user-focus from content. r=smaug
-moz-user-focus: none didn't do anything useful for non-XUL until
bug 1868552. It seems nonetheless some sites specify it, which can cause
compat issues.

Let's hide this property from content, to avoid breaking those sites.

Differential Revision: https://phabricator.services.mozilla.com/D197253
2023-12-26 10:00:59 +00:00
Eliot Jacobs
ea29370b7a Bug 1867908 - Fix round() with negative step returning incorrect value r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D197011
2023-12-25 20:51:07 +00:00
Emilio Cobos Álvarez
8af4c57baf Bug 1871540 - Use VariableValue to track references in unparsed values. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D197147
2023-12-22 20:52:26 +00:00
Cosmin Sabou
b43f82a95b Backed out 2 changesets (bug 1871540) for causing webvtt related failures. CLOSED TREE
Backed out changeset 6d2274dc2f41 (bug 1871540)
Backed out changeset a066a966cd03 (bug 1871540)
2023-12-22 21:11:11 +02:00
Emilio Cobos Álvarez
2d4c0d3cdc Bug 1871540 - Use VariableValue to track references in unparsed values. r=dshin
Depends on D197146

Differential Revision: https://phabricator.services.mozilla.com/D197147
2023-12-22 15:09:44 +00:00
Ziran Sun
25da9bcee7 Bug 1869472 - AnimationValue::Custom should hold single struct. r=zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D196820
2023-12-20 13:07:16 +00:00
Emilio Cobos Álvarez
fa5c22dd82 Bug 1870832 - Fix SpecifiedValueInfo for transition-property.
This got reviewed as part of D196842 (see diff 801914), but I rebased
before landing in a tree that didn't have that change.

MANUAL PUSH: Orange fix CLOSED TREE
2023-12-20 12:56:22 +01:00
Emilio Cobos Álvarez
fb4b456d4f Bug 1870832 - Use cbindgen for animation-{name,composition,fill-mode,direction}. r=firefox-style-system-reviewers,zrhoffman
Same amount of code, but more boring code (and I've probably missed
removing some), which is better.

Differential Revision: https://phabricator.services.mozilla.com/D196843
2023-12-20 10:52:25 +00:00
Emilio Cobos Álvarez
bab145128a Bug 1870832 - Auto-generate transition-property. r=firefox-style-system-reviewers,zrhoffman
Now that NonCustomPropertyId is not in mako, it can be auto-generated by
cbindgen. This allows simplifying some code.

Differential Revision: https://phabricator.services.mozilla.com/D196842
2023-12-20 10:52:24 +00:00
Emilio Cobos Álvarez
7fcf0d7415 Bug 1870676 - Clean up transition-property handling, and remove eCSSPropertyExtra_all_properties. r=firefox-style-system-reviewers,zrhoffman
While we're at it, let's fix this long-standing TODO.

Differential Revision: https://phabricator.services.mozilla.com/D196760
2023-12-19 11:02:39 +00:00
Emilio Cobos Álvarez
2ced0c534e Bug 1870676 - Other minor clean-ups to PropertyId-related code. r=firefox-style-system-reviewers,zrhoffman
Make NonCustomPropertyId an u16 (because it can, and it's more compact),
and use arrays for ShorthandId::longhands and LonghandId::shorthands.

Differential Revision: https://phabricator.services.mozilla.com/D196759
2023-12-19 10:50:22 +00:00
Emilio Cobos Álvarez
933d556ce5 Bug 1870676 - Move a bunch of code in properties.mako.rs outside of mako. r=firefox-style-system-reviewers,zrhoffman
Most of these bits don't need mako. Move them to properties/mod.rs.

Differential Revision: https://phabricator.services.mozilla.com/D196758
2023-12-19 10:50:21 +00:00
David Shin
3ea9f1ec16 Bug 1869771: Prevent rule-based style sharing on elements that considered a relative selector. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D196311
2023-12-18 17:22:31 +00:00
Emilio Cobos Álvarez
084cffcd52 Bug 1870481 - Restore unified toolbar window looks. r=mac-reviewers,desktop-theme-reviewers,dao,spohl
By using a opaque-appearance widget (which is effectively what
appearance: -moz-dialog used to provide).

There's the question of whether we want the current vibrant titlebars,
but this restores the behavior precisely for now.

Differential Revision: https://phabricator.services.mozilla.com/D196712
2023-12-18 16:19:36 +00:00
Emilio Cobos Álvarez
f09f699de7 Bug 1846516 - Fix some atom leaks caught by ASAN.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-12-18 13:04:28 +01:00
Emilio Cobos Álvarez
815dc5495a Bug 1846516 - More fixes on top of bug 1870009. r=zrhoffman
This fixes some leaks, and fixes IsAnimatable/IsTransitionable to look
at PropertyId.

Differential Revision: https://phabricator.services.mozilla.com/D196419
2023-12-18 09:24:10 +00:00
Zach Hoffman
0060ff08b2 Bug 1846516 - [css-properties-values-api] Animate custom properties in a discrete way. r=firefox-style-system-reviewers,emilio
This patch also updates the bug ID for a FIXME leftover from bug 1840478
to bug 1869476, since the same FIXME is added in D190758.

Co-authored-by: Frederic Wang <fred.wang@free.fr>

Depends on D191322

Differential Revision: https://phabricator.services.mozilla.com/D190758
2023-12-18 09:24:08 +00:00
Zach Hoffman
7653a4f1c2 Bug 1846516 - [css-properties-values-api] Use AnimatedPropertyID to communicate between Gecko and Servo. r=emilio,layout-reviewers,firefox-style-system-reviewers
Co-authored-by: Frederic Wang <fred.wang@free.fr>
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

Depends on D191059

Differential Revision: https://phabricator.services.mozilla.com/D191322
2023-12-18 09:24:08 +00:00
Zach Hoffman
0ec875a048 Bug 1846516 - [css-properties-values-api] Use PropertyDeclarationId/PropertyDeclarationIdSet for animated properties. r=firefox-style-system-reviewers,emilio
This will make possible to animate custom properties. For now, the
animation code keeps only dealing with PropertyDeclarationId::Longhand,
so behavior is unchanged.

Co-authored-by: Frederic Wang <fred.wang@free.fr>

Depends on D195972

Differential Revision: https://phabricator.services.mozilla.com/D190816
2023-12-18 09:24:07 +00:00
Emilio Cobos Álvarez
0aca60d53f Bug 1870009 - Clean up PropertyId to reuse NonCustomPropertyId. r=zrhoffman,firefox-style-system-reviewers
PropertyId predates NonCustomPropertyId. Now that we have it, we can
clean up a bit the code.

The idea is to make PropertyId and AnimatedPropertyId basically the
same, so that conversions can be improved in bug 1846516.

While at it make NonCustomPropertyId a u32.

Differential Revision: https://phabricator.services.mozilla.com/D196415
2023-12-14 15:29:27 +00:00
Zach Hoffman
8326c1ace3 Bug 1846516 - Move PropertyDeclarationId to its own module r=firefox-style-system-reviewers,emilio
Because PropertyDeclarationId and its implementation do not make use of
templating, we might as well move it out of mako.

This will be useful later when creating OwnedPropertyDeclarationId,
which can be added to the same module.

Differential Revision: https://phabricator.services.mozilla.com/D195972
2023-12-14 11:34:56 +00:00
Emilio Cobos Álvarez
de8a41c001 Bug 1869299 - Expose a media query for known gtk theme families. r=rmader
This will allow to easily tweak the front-end for selected / known-good
themes.

Differential Revision: https://phabricator.services.mozilla.com/D196151
2023-12-13 12:41:18 +00:00
Emilio Cobos Álvarez
b21a492ac7 Bug 1869299 - Generalize -moz-mac-sidebar into a cross-platform -moz-sidebar{,text,border} set. r=dao,desktop-theme-reviewers,win-reviewers,gstoll
This will be useful for Adwaita. Keep the field colors in this patch
tho.

Differential Revision: https://phabricator.services.mozilla.com/D196150
2023-12-12 15:22:44 +00:00
Emilio Cobos Álvarez
88c136af5b Bug 1868552 - Make the initial value of -moz-user-focus normal, and make none actually prevent focusability. r=smaug,jwatt
This is tested via the inert tests, effectively, but I can add more
explicit tests.

Remove rules that would otherwise change behavior (the other rules in
the tree apply to XUL elements and serve a purpose).

Differential Revision: https://phabricator.services.mozilla.com/D195645
2023-12-12 13:51:30 +00:00
Emilio Cobos Álvarez
c291629684 Bug 1868399 - Use attribute bucketing for revalidation. r=firefox-style-system-reviewers,zrhoffman
This significantly reduces the amount of revalidation selectors looked
up for elements, which was very visible in the profiles for bug 1868316.

Instead of avoiding attribute bucketing to guarantee that we look up at
the same revalidation selectors, keep around the relevant attributes and
compare them.

Differential Revision: https://phabricator.services.mozilla.com/D195561
2023-12-12 13:39:35 +00:00
Emily McDonough
8ad20b2ce6 Bug 1852149 Part 3 - Add margin rules to servo r=firefox-style-system-reviewers,emilio
Parsing is disabled by the layout.css.margin-rules.enabled pref.
This isn't currently testable beyond a crashtest because the DOM interface for
margin rules isn't implemented yet.

Differential Revision: https://phabricator.services.mozilla.com/D187736
2023-12-08 20:25:55 +00:00
Emily McDonough
1568c7e499 Bug 1852149 Part 2 - Refactor page-rule parsing and types to allow nested rules. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D187722
2023-12-08 20:25:55 +00:00
Emilio Cobos Álvarez
57f6888c45 Bug 1868552 - Remove unused -moz-user-focus values. r=jwatt
If removing these were to become a compat issue in the wild, we could
alias them effortlessly. But honestly they're not even documented in MDN
so I'm pretty sure it should be safe to remove.

Differential Revision: https://phabricator.services.mozilla.com/D195643
2023-12-06 13:51:07 +00:00
Emilio Cobos Álvarez
5985762903 Bug 1868411 - Remove -moz-non-native-content-theme media feature. r=jwatt
Non-native theme shipped a while ago. Let's make our UA sheet
consistent.

Differential Revision: https://phabricator.services.mozilla.com/D195567
2023-12-06 10:58:09 +00:00
David Shin
f2a581025e Bug 1868436: Registered non-universal property dependency cycle resolve as if unset. r=zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D195576
2023-12-05 20:33:22 +00:00
Emilio Cobos Álvarez
4d0e714795 Bug 1866022 - Teach GTK to render non-native tree columns and toolbars. r=dao,stransky,desktop-theme-reviewers
This fixes various things, like sort arrows not working, even in regular
non-mixed-color-scheme settings, and is a lot less code.

The toolbarbutton appearance on the problematic case described in
comment 0 could get some work (the extra borders aren't exactly pretty),
but it's still a much better improvement.

Differential Revision: https://phabricator.services.mozilla.com/D195345
2023-12-04 18:57:35 +00:00
David Shin
90d48b94f0 Bug 1867893: Do not skip invalidation for :has if the stand-in element can be an anchor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195444
2023-12-04 16:56:07 +00:00
Keith Cirkel
01be187814 Bug 1866351 - allow :state() after ::part() r=emilio
Adds parser tests for ::part() and ::slotted() to ensure that :state() can only appear after a ::part()

Differential Revision: https://phabricator.services.mozilla.com/D194578
2023-12-03 20:31:24 +00:00
Emilio Cobos Álvarez
3d97c216b7 Bug 1867854 - Hide some macOS system colors from content. r=jwatt
Mostly drive-by. Hide macOS specific colors from content, and also the native
hyperlinktext color, which isn't and shouldn't be used from CSS at all.

Differential Revision: https://phabricator.services.mozilla.com/D195296
2023-12-03 10:52:14 +00:00
Emilio Cobos Álvarez
d31360a906 Bug 1867854 - Remove appearance: dialog. r=desktop-theme-reviewers,dao
This is not really needed.

It was never needed if you used background-color: transparent, which is what
the browser did to get sidebar vibrancy, fwiw.

Instead of applying transparency globally, opt-into it explicitly for
things that need it (the unified toolbar of the page info / library windows).

I checked the other things that were using it (wizard and updates.css)
and I don't see any rendering change with this change (tried showing the
update history from about:support, and the create profile wizard).

Depends on D195294

Differential Revision: https://phabricator.services.mozilla.com/D195295
2023-12-03 10:49:37 +00:00
Emilio Cobos Álvarez
e7fc2b380a Bug 1867854 - Improve background color for library window sidebar. r=desktop-theme-reviewers,dao
In bug 1861954 I also removed the vibrancy of the places window.

Unlike the browser sidebar this one didn't have an explicit background
color. Add back a system color for the mac sidebar and use it in both
places. This matches the old -moz-mac-source-list color.

Differential Revision: https://phabricator.services.mozilla.com/D195294
2023-12-03 10:43:14 +00:00
Connor Pearson
af9d2a58f2 Bug 1867558 - abs(-0) should be +0 instead of -0. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195182
2023-12-01 17:54:06 +00:00
Emilio Cobos Álvarez
3749933d04 Bug 1867504 - Remove :-moz-browser-frame pseudo-class. r=jwatt
This pseudo-class is unused other than in the ua sheet. MozBrowser is
gone (getting actively removed in bug 1770944). Let's just do this since
that is taking a bit.

Differential Revision: https://phabricator.services.mozilla.com/D195095
2023-11-30 16:30:07 +00:00
Mike Hommey
6325c833c2 Bug 1866929 - Avoid building unicode-bidi twice. r=emilio
... by avoiding to enable the default feature, which other crates
depending on it disable as well.

Differential Revision: https://phabricator.services.mozilla.com/D194830
2023-11-28 20:44:12 +00:00
Zach Hoffman
a55f8a22aa Bug 1865810 - [css-properties-values-api] Recompute initial values when viewport changes r=firefox-style-system-reviewers,emilio
If the initial values of custom property registrations contain viewport
units, changing the viewport will result in recomputing the initial
values.

Differential Revision: https://phabricator.services.mozilla.com/D194668
2023-11-26 15:54:42 +00:00
Zach Hoffman
9981d3702b Bug 1865810 - [css-properties-values-api] Keep track of flags that were set when computing initial values r=firefox-style-system-reviewers,emilio
This will be useful later to check whether the registered property
initial values contained viewport units.

Differential Revision: https://phabricator.services.mozilla.com/D194667
2023-11-26 15:54:41 +00:00
Andreas Pehrson
6bb8230ea7 Bug 1670633 - Update bindgen to 0.69.1 and coreaudio-sys to 0.2.14. r=supply-chain-reviewers,glandium
This sets the stage for an update to cubeb-coreaudio-rs.

Differential Revision: https://phabricator.services.mozilla.com/D193899
2023-11-24 11:33:56 +00:00
Cristian Tuns
b54e9ee57c Backed out 3 changesets (bug 1670633, bug 1866014) for causing build bustages in MediaEngineWebRTCAudio.cpp CLOSED TREE
Backed out changeset c0d256e9cde9 (bug 1866014)
Backed out changeset e7d101bd73d9 (bug 1670633)
Backed out changeset a849a8e4bd37 (bug 1670633)
2023-11-24 06:18:42 -05:00
Emilio Cobos Álvarez
cfe1bb08c8 Bug 1866246 - Fix sign() type checking. r=tlouw,firefox-style-system-reviewers,jwatt
Make sure we don't parse units whose sign is not resolvable without a
basis (i.e. percentages when they're not allowed).

Also make sure that we type check the sum so that we don't parse bogus
operations.

Make the length resolution code not crash in release builds.

Differential Revision: https://phabricator.services.mozilla.com/D194500
2023-11-24 08:37:06 +00:00