Commit Graph

13938 Commits

Author SHA1 Message Date
Boris Chiou
74f0bd8a0c Bug 1676791 - Part 8: Hook scroll-timeline rule into Cascade data and use it for CSS animations. r=emilio,hiro
We hook the rule into cascade data, and so we can look it up by timeline
name. Now we only use StyleScrollDirection from @scroll-timeline rule.
`source` and `scroll-offsets` are skipped now and use the default values
instead because I'm pretty sure the syntax will be changed in Bug 1733260,
and `scroll-offsets` may be obsolete because the spec proposal intents to
make it be always 0% ~ 100%.

Also, add some reftests for the default `source` and `scroll-offsets`,
and different `orientation`s.

Besides, we disable at-scroll-timeline-start-end.html in Gecko because
we don't support start/end descriptors, and there are too many
intermittents in it.

Differential Revision: https://phabricator.services.mozilla.com/D126452
2021-12-08 01:16:31 +00:00
Boris Chiou
470f574f58 Bug 1676791 - Part 1: Add ScrollTimeline class. r=hiro
Define a simple version of ScrollTimeline.

Differential Revision: https://phabricator.services.mozilla.com/D129099
2021-12-08 01:16:28 +00:00
Emily McDonough
c4d55a9374 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-07 22:11:53 +00:00
Alexandru Michis
40430b0cce Backed out changeset 66eb52e5da74 (bug 1741973) for causing mochitest failures in test_animation-type-longhand.html
CLOSED TREE
2021-12-07 00:01:55 +02:00
Emily McDonough
bd3b879775 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-06 19:34:43 +00:00
Butkovits Atila
21676cf030 Backed out changeset 145c64b7ac17 (bug 1531223) for causing failures at gfxFontEntry.cpp. CLOSED TREE 2021-12-06 14:57:31 +02:00
Jonathan Kew
ed3fd395ba Bug 1531223 - Add support for the 'ic' and 'cap' font-relative units. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132818
2021-12-06 12:22:09 +00:00
Sandor Molnar
0d095a62b5 Backed out changeset 8fac157c354a (bug 1741973) for causing xpc failures in devtools/shared/tests/xpcshell/test_css-properties-db. CLOSED TREE 2021-12-03 04:17:36 +02:00
Emily McDonough
1de10c57f2 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-02 23:37:28 +00:00
Emilio Cobos Álvarez
2abc89c41e Bug 1509931 - Use titlebar radius on Linux and make titlebar set-up work for lightweight themes. r=stransky,dao
To do this, we always draw the native titlebar behind the toolbox, and
then make the toolbox adapt to it by using the titlebar radius. This
makes us preserve the shadow properly.

On Wayland we'd double-draw the shadow (see bug 1509931 comment 4) so
this fixes it by trimming it as well using border-radius.

Differential Revision: https://phabricator.services.mozilla.com/D128681
2021-12-01 18:15:12 +00:00
Emilio Cobos Álvarez
a9b6db8e3f Bug 1743803 - Remove unnecessary button-focus appearance value on Linux. r=dao
This always draws transparent. Only real thing it does is forcing 0px
padding.

Differential Revision: https://phabricator.services.mozilla.com/D132563
2021-12-01 13:33:02 +00:00
Emilio Cobos Álvarez
4354146592 Bug 1432090 - Honor GTK button layout. r=stransky,desktop-theme-reviewers,dao
This is based off work by smurfd. But this patch doesn't support buttons
both at the left and right, which simplifies a lot the implementation.

Also, clean-up the existing env variables while at it.

Co-authored-by: Nicklas Boman <smurfd@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D132073
2021-11-26 11:37:52 +00:00
Emilio Cobos Álvarez
2dca36cb25 Bug 502258 - Add a Show Password button to <input type=password> controls. r=Gijs
It's controlled by the pref:
layout.forms.input-type-show-password-button.enabled

Differential Revision: https://phabricator.services.mozilla.com/D130407
2021-11-25 20:12:05 +00:00
Emilio Cobos Álvarez
24be48359c Bug 1742574 - Keep system fonts when prioritizing user fonts. r=jfkthame,layout-reviewers
This was a subtle behavior change in bug 1739464. The early-return here:

  https://hg.mozilla.org/mozilla-central/rev/2fb74c67b0c5#l11.40

Meant we also bailed out from user font prioritization for system fonts.

It's unclear whether that's really the best behavior but since the
intention of the regressing patch was not to change behavior, preserving
the old behavior seems better.

Differential Revision: https://phabricator.services.mozilla.com/D131899
2021-11-23 12:41:19 +00:00
Emilio Cobos Álvarez
e120f9b2b2 Bug 1742393 - Correctly report animation status of pseudo-elements that are not stored in the parent element. r=hiro
We allow animating pseudo-elements like ::-moz-progress-bar (and we
treat them like regular elements).

Ideally we should store animations for these in the parent element as
well, so they survive reframes and such. But treating them as regular
elements right now means that we do animate them, but we never update
animations for them correctly because wrapper.rs assumed them to be
non-animatable.

Since it seems reasonable to keep allowing the animations to happen,
let's just correct the update code and add a test.

Differential Revision: https://phabricator.services.mozilla.com/D131794
2021-11-23 12:36:22 +00:00
lamoure6
3478e8ae47 Bug 1719938 - Removed remaining (non-negated) -moz-proton media queries. r=mhowell,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D125328
2021-11-22 22:10:33 +00:00
Emilio Cobos Álvarez
ff07ef7e17 Bug 1739464 - Simplify language-dependent font fallback code. r=jfkthame
.fallback is always the default font for the lang group unless we're a
system font (in which case it's "none").

The only reason we need that is because we need to react to
language changes (which affect the initial font).

Simplify the model a bit doing the language lookup in gfxTextRun (this
should avoid allocating a few nsStyleFont structs too.

Depends on D130732

Differential Revision: https://phabricator.services.mozilla.com/D131312
2021-11-19 16:11:55 +00:00
Emilio Cobos Álvarez
2f4e4df679 Bug 1739464 - Use first generic rather than only generic to determine fallback font family. r=jfkthame
This seems like more sensible behavior. We have another use of
only_generic(), but that affects font sizing and other browsers agree
with us there:

  <div style="font-family: monospace">Should be 13px</div>
  <div style="font-family: something, monospace">Should be 16px</div>

So not touching that one.

Differential Revision: https://phabricator.services.mozilla.com/D130732
2021-11-19 16:11:54 +00:00
Emilio Cobos Alvarez
eef21610c6 Bug 1725721 - Top layer elements that are display:contents should be display: block. r=hiro
As per https://fullscreen.spec.whatwg.org/#new-stacking-layer:

    If its specified display property is contents, it computes to block.

Differential Revision: https://phabricator.services.mozilla.com/D131585
2021-11-19 04:46:42 +00:00
Ting-Yu Lin
5d4998ecf4 Bug 1741774 - Support scrollbar-gutter in the style system. r=emilio
This patch adds `scrollbar-gutter` property in CSS Overflow level 3 [1] to the
style system.

`devtools/shared/css/generated/properties-db.js` is generated by
`./mach devtools-css-db`.

[1] https://drafts.csswg.org/css-overflow-3/#scrollbar-gutter-property

Differential Revision: https://phabricator.services.mozilla.com/D131460
2021-11-19 01:48:07 +00:00
Ting-Yu Lin
ca1b688007 Bug 1741990 - Run rustfmt on servo/components/style and servo/ports/geckolib. r=emilio,layout-reviewers
This patch is generated by running `cargo +nightly fmt` under
`servo/components/style/` and `servo/ports/geckolib` against mozilla-central
https://hg.mozilla.org/mozilla-central/rev/b193f2e7a6a5d1f042c957ea4acd5c89bf210512

My nightly version is: 1.58.0-nightly (c9c4b5d72 2021-11-17)

Manually remove the redundant braces in author_styles.rs to fix a warning.

Differential Revision: https://phabricator.services.mozilla.com/D131556
2021-11-19 00:14:27 +00:00
Norisz Fay
09cb6f5caa Backed out changeset 00651c04ba31 (bug 1741990) for causing build bustages CLOSED TREE 2021-11-19 01:03:56 +02:00
Ting-Yu Lin
6d43b0f7b8 Bug 1741990 - Run rustfmt on servo/components/style and servo/ports/geckolib. r=emilio,layout-reviewers
This patch is generated by running `cargo +nightly fmt` under
`servo/components/style/` and `servo/ports/geckolib` against mozilla-central
https://hg.mozilla.org/mozilla-central/rev/b193f2e7a6a5d1f042c957ea4acd5c89bf210512

My nightly version is: 1.58.0-nightly (c9c4b5d72 2021-11-17)

Differential Revision: https://phabricator.services.mozilla.com/D131556
2021-11-18 22:46:24 +00:00
Emilio Cobos Álvarez
1cc0113008 Bug 1740924 - Partially back out bug 1105364. r=morgan
Apparently using transparent borders and outlines is a common
accessibility technique to make those visible in HCM.

Bug 1740924 comment 9 seemed to indicate we were the only browser
rendering those browsers, but I just confirmed that Edge at least does
show them.

Keep respecting system colors as that's per spec.

Differential Revision: https://phabricator.services.mozilla.com/D131412
2021-11-18 21:20:49 +00:00
Emilio Cobos Álvarez
2d8ab09b73 Bug 1739699 - Use preferred color scheme when forcing colors with system colors (except windows HCM). r=morgan
This causes (among other things) pages to be dark when using regular
windows system colors and forcing colors to "always", which is nice.

Differential Revision: https://phabricator.services.mozilla.com/D131165
2021-11-16 22:30:26 +00:00
Mats Palmgren
a36baa4d58 Bug 1706346 part 3 - [css-lists] Remove the internal '-moz-list-reversed' CSS property that is no longer needed. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129957
2021-11-14 03:49:36 +00:00
Mats Palmgren
2e0a36d04d Bug 1706346 part 1 - [css-lists] Style system changes to support 'reversed(<counter-name>)'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129955
2021-11-14 03:49:35 +00:00
Alexandru Michis
ef8f129df5 Backed out changeset 82c80c6c8090 (Bug 1739464) for causing mochitest plain failures in test_bug496275.html
CLOSED TREE
2021-11-12 03:45:59 +02:00
Emilio Cobos Álvarez
3b4c3ed152 Bug 1739464 - Use first generic rather than only generic to determine fallback font family. r=jfkthame
This seems like more sensible behavior. We have another use of
only_generic(), but that affects font sizing and other browsers agree
with us there:

  <div style="font-family: monospace">Should be 13px</div>
  <div style="font-family: something, monospace">Should be 16px</div>

So not touching that one.

Differential Revision: https://phabricator.services.mozilla.com/D130732
2021-11-11 17:48:55 +00:00
Emilio Cobos Álvarez
4d6ee249dc Bug 1739925 - Add a foreground color to attention selection. r=jfkthame
In some platforms (like macOS, windows dark mode, android, and some gtk
themes) the foreground selection color might be `currentcolor`, and that
doesn't generally guarantee enough contrast with the attention
background.

Remove HeadlessLookAndFeelGTK's handling of this color since it's
useless (always overridden by prefs in all.js)

Differential Revision: https://phabricator.services.mozilla.com/D130617
2021-11-11 11:14:13 +00:00
Marian-Vasile Laza
6d3bafd66a Backed out changeset 2ed757d5dd76 (bug 1739464) for causing reftest failures on brackets-3b-rtl.html. CLOSED TREE 2021-11-10 22:54:06 +02:00
Emilio Cobos Álvarez
4dabed3c51 Bug 1739464 - Use first generic rather than only generic to determine fallback font family. r=jfkthame
This seems like more sensible behavior. We have another use of
only_generic(), but that affects font sizing and other browsers agree
with us there:

  <div style="font-family: monospace">Should be 13px</div>
  <div style="font-family: something, monospace">Should be 16px</div>

So not touching that one.

Differential Revision: https://phabricator.services.mozilla.com/D130732
2021-11-10 17:58:18 +00:00
Emilio Cobos Álvarez
a5f66c95e1 Bug 1740230 - Remove some prefs for pseudo-classes that we have shipped/unshipped successfully. r=dholbert
And remove code for :-moz-submit-invalid completely.

Differential Revision: https://phabricator.services.mozilla.com/D130737
2021-11-10 13:27:47 +00:00
Emilio Cobos Álvarez
f2318b3299 Bug 1740230 - Unexpose :-moz-locale-dir and :-moz-lwtheme* from content. r=dholbert
Behind a pref for now. Given these selectors do nothing on non-chrome
documents (they just don't match) it seems worth trying.

A cursory search seems to indicate they're not used for UA detection or
something like that (or at least I haven't found such an usage).

Differential Revision: https://phabricator.services.mozilla.com/D130736
2021-11-10 13:00:17 +00:00
Emilio Cobos Álvarez
bd406d8841 Bug 1740230 - Allow matches() / querySelector() / etc on chrome docs to access chrome-only selectors. r=boris
Without this some tests fail with the previous patch because code like:

  https://searchfox.org/mozilla-central/rev/267682a8f45221bf0bfe999d4a0239706a43bc56/browser/base/content/browser-gestureSupport.js#651

starts throwing. Unfortunately I had missed that on my try run, because
the error message didn't include that exception (it seemed like an
intermittent browser-chrome failure instead).

We could expose a ChromeOnly API for this, but this seems better. This
fixes it trivially, and also removes the "no url data" situation from
the selector parser, which is nice.

Differential Revision: https://phabricator.services.mozilla.com/D130818
2021-11-10 12:56:35 +00:00
Butkovits Atila
3a33d047e8 Backed out 2 changesets (bug 1740230) for causing build bustages.
Backed out changeset ba8e644ee9d2 (bug 1740230)
Backed out changeset 180d03015fd1 (bug 1740230)
2021-11-10 02:12:26 +02:00
Emilio Cobos Álvarez
620bd78775 Bug 1740230 - Allow matches() / querySelector() / etc on Chrome docs to access chrome-only selectors. r=boris
Without this some tests fail with the previous patch because code like:

  https://searchfox.org/mozilla-central/rev/267682a8f45221bf0bfe999d4a0239706a43bc56/browser/base/content/browser-gestureSupport.js#651

starts throwing. Unfortunately I had missed that on my try run, because
the error message didn't include that exception (it seemed like an
intermittent browser-chrome failure instead).

We could expose a ChromeOnly API for this, but this seems better. This
fixes it trivially, and also removes the "no url data" situation from
the selector parser, which is nice.

Differential Revision: https://phabricator.services.mozilla.com/D130818
2021-11-09 23:28:48 +00:00
Emilio Cobos Álvarez
c11619252a Bug 1740230 - Unexpose :-moz-locale-dir and :-moz-lwtheme* from content. r=dholbert
Behind a pref for now. Given these selectors do nothing on non-chrome
documents (they just don't match) it seems worth trying.

A cursory search seems to indicate they're not used for UA detection or
something like that (or at least I haven't found such an usage).

Differential Revision: https://phabricator.services.mozilla.com/D130736
2021-11-09 22:51:05 +00:00
Emilio Cobos Álvarez
a3a1b27924 Bug 1740230 - Refactor :-moz-lwtheme pseudo-classes to get invalidated correctly. r=dholbert
Use the same document state mechanism we have for :moz-locale-dir. Also,
simplify the setup of the later to be the same as :dir(), allowing the
matching code to be less repetitive.

This should fix some flakiness in chrome mochitests, but we have no existing
tests for these pseudo-classes more generally and since they're just
chrome-only I'm not super-excited about adding more.

Differential Revision: https://phabricator.services.mozilla.com/D130735
2021-11-09 20:59:11 +00:00
Emilio Cobos Álvarez
9b27f32101 Bug 1740230 - Simplify :dir() implementation. r=dholbert
This I noticed while working on the following patches. Shouldn't have
any behavior change: the behavior does in fact match the element state
flag semantics correctly if we do this. We did split the dir flags into
two element bits a while ago.

:not(:dir()) still behaves correctly of course, and we have tests for that.

Differential Revision: https://phabricator.services.mozilla.com/D130734
2021-11-09 20:53:13 +00:00
Butkovits Atila
4af43f1399 Backed out changeset da181def7b07 (bug 1739464) for causing failures at test_dont_use_document_fonts.html. 2021-11-09 21:10:28 +02:00
Emilio Cobos Álvarez
4c24a1ca7d Bug 1739464 - Use first generic rather than only generic to determine fallback font family. r=jfkthame
This seems like more sensible behavior. We have another use of
only_generic(), but that affects font sizing and other browsers agree
with us there:

  <div style="font-family: monospace">Should be 13px</div>
  <div style="font-family: something, monospace">Should be 16px</div>

So not touching that one.

Differential Revision: https://phabricator.services.mozilla.com/D130732
2021-11-09 17:22:07 +00:00
Emilio Cobos Álvarez
890026f19b Bug 1739357 - Merge branches in some ComputedValues functions. r=boris
This should mitigate the code size impact. Also make get_resolved_value
non-generic to avoid monomorphizing it multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D130354
2021-11-06 10:14:40 +00:00
Mats Palmgren
039e1146f4 Bug 1738520 - Make #[css(field_bound)] and #[css(iterable)] work properly. r=mats
For now, use IntoIterator to figure the right type to add the bound.

If we need this on types that are iterable but don't provide
IntoIterator, we can add another attribute field or something.

Differential Revision: https://phabricator.services.mozilla.com/D129962
2021-11-04 18:31:55 +00:00
Emilio Cobos Álvarez
c308704902 Bug 1738614 - Remove other Widget* colors. r=mstange
These are only used for frameset painting and the non-e10s <select>
dropdown focus codepath. We have other more appropriate standard
colors for this.

Differential Revision: https://phabricator.services.mozilla.com/D129992
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez
923cf5df84 Bug 1738614 - Remove TextForeground/Background system colors. r=mstange
Same thing, there's nor reason these should be different from other
CSS-exposed colors.

Differential Revision: https://phabricator.services.mozilla.com/D129991
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez
ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez
7c1b2c19fd Bug 1738658 - Serialize text-decoration using Servo. r=layout-reviewers,mats
The code introduced in the preceding patch deals with currentColor correctly,
so we should be able to do this now.

This uncovers a bug in the existing serialization code when a non-auto
text-decoration-thickness was used, caught by
css/css-text-decor/parsing/text-decoration-computed.html.

Differential Revision: https://phabricator.services.mozilla.com/D130018
2021-11-02 14:21:38 +00:00
Emilio Cobos Álvarez
ac72dbe343 Bug 1738658 - Generalize resolved style code to deal with all shorthands. r=jwatt
This removes the various assumptions that the animation code does.

Code size might be a concern, we can optimize if it is a problem,
but let's do the obvious thing for now.

Differential Revision: https://phabricator.services.mozilla.com/D130017
2021-11-02 14:21:38 +00:00
Emilio Cobos Álvarez
e7fd7303e1 Bug 1738791 - Treat empty root margin as zero as per spec. r=AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D130131
2021-11-02 10:44:17 +00:00