Граф коммитов

13728 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan bda78e780f Bug 1714457 - Make predefined symbolic counter styles not overridable. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D116938
2021-06-07 11:39:31 +00:00
Emilio Cobos Álvarez 488d88625c Bug 1713787 - Fix whitespace handling inside CSS variables. r=xidorn
As per w3c/csswg-drafts#881 and w3c/csswg-drafts#774.

Differential Revision: https://phabricator.services.mozilla.com/D116459
2021-06-07 10:16:39 +00:00
Csoregi Natalia 1fa90cf8b2 Backed out 5 changesets (bug 1711479) for multiple failures e.g. test_css-properties-db.js. CLOSED TREE
Backed out changeset f1b19a0463cd (bug 1711479)
Backed out changeset 3d1d2b4a2713 (bug 1711479)
Backed out changeset 4e689776fe5d (bug 1711479)
Backed out changeset 85b6b2648f60 (bug 1711479)
Backed out changeset a15cec1f0554 (bug 1711479)
2021-06-07 13:55:29 +03:00
Jonathan Kew 57c18282b4 Bug 1711479 - Implement CSS support for the optional adjustment-basis metric keywords for the font-size-adjust property (enabled on Nightly only for now). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D115596
2021-06-07 08:58:12 +00:00
Butkovits Atila 9a67025305 Backed out changeset 1a6ee358d131 (bug 1714457) for causing failures at redefine-attr-mapping.html. CLOSED TREE 2021-06-07 00:31:38 +03:00
Narcis Beleuzu 11da6949ee Backed out 2 changesets (bug 1713787) for wpt failures on declarations-trim-whitespace.html . CLOSED TREE
Backed out changeset 1ddacb243ae6 (bug 1713787)
Backed out changeset 2dc1eff1effd (bug 1713787)
2021-06-06 17:16:55 +03:00
Xidorn Quan ecf0830a40 Bug 1714457 - Make predefined symbolic counter styles not overridable. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D116938
2021-06-06 12:55:07 +00:00
Emilio Cobos Álvarez e3a7c5102a Bug 1713787 - Fix whitespace handling inside CSS variables. r=xidorn
As per w3c/csswg-drafts#881 and w3c/csswg-drafts#774.

Differential Revision: https://phabricator.services.mozilla.com/D116459
2021-06-06 12:10:28 +00:00
Emilio Cobos Álvarez 048781b3b9 Bug 1713787 - Make custom properties that are IACVT guaranteed-invalid. r=boris
This effectively backs out bug 1623396.

See:

  https://github.com/w3c/csswg-drafts/pull/6006
  https://drafts.csswg.org/css-variables/#guaranteed-invalid-value

And related discussion. Matches Chrome stable as per https://groups.google.com/a/chromium.org/g/blink-dev/c/0xrbzYe_vxU/m/7bsL76n9CgAJ

Depends on D116459

Differential Revision: https://phabricator.services.mozilla.com/D116460
2021-06-04 12:24:18 +00:00
Emilio Cobos Álvarez e2f6b43581 Bug 1467309 - Reserve -- as a custom property name. r=xidorn
I think this should be fairly low risk, let's try to get it done sooner
rather than later.

Differential Revision: https://phabricator.services.mozilla.com/D116456
2021-06-04 10:55:41 +00:00
Emilio Cobos Álvarez a92eb7c353 Bug 1714357 - Use a nicer media query for proton context menus. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D116736
2021-06-03 17:51:48 +00:00
Emilio Cobos Álvarez 10d7220ec3 Bug 1709018 - Don't simplify percentages that resolve to lengths in min/max/clamp. r=boris
Those can't be ordered at specified / computed value time, since the
percentage basis could be negative.

Needs tests of course, running through try atm.

Differential Revision: https://phabricator.services.mozilla.com/D115591
2021-05-21 00:39:48 +00:00
Emilio Cobos Álvarez b9ab630742 Bug 1711170 - Look at the right element for exportparts in each_applicable_non_document_style_rule_data. r=boris
Otherwise we might not find those rules for invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D115130
2021-05-20 08:31:34 +00:00
Emilio Cobos Álvarez a292bdd58b Bug 1707310 - Refactor the author sheet cache to keep alive the relevant StylesheetContents. r=boris
This prevents incorrectly reusing cached results when the contents go
away and new contents are allocated with the same address.

Note that these keep alive transitively everything else under them, so
all other medialist keys don't need this.

By making this a proper hashmap it should also improve cache lookup
times if the cache grows too big.

Differential Revision: https://phabricator.services.mozilla.com/D115202
2021-05-19 09:00:38 +00:00
Emilio Cobos Álvarez df834cf40d Bug 1711189 - Avoid returning fmt::Errors for things that are not formatting errors.
They are not. The serialization code already checks if the result is
empty, which can happen for other reasons. This makes the code a bit
more resilient to misuse.

Differential Revision: https://phabricator.services.mozilla.com/D115133
2021-05-14 10:45:04 +00:00
Emilio Cobos Álvarez 1ba2a99de2 Bug 1711189 - Avoid trying to serialize 'all' with stuff that isn't variable references or CSS wide keywords.
All is special, and that'd cause an error later on.

Differential Revision: https://phabricator.services.mozilla.com/D115132
2021-05-14 10:45:03 +00:00
Emilio Cobos Álvarez 9de60477e2 Bug 1710643 - Use titlebar colors when using CSD rather than -moz-menubartext. r=stransky
As the titlebar may be different when active / inactive, and have
other colors than a menubar.

Differential Revision: https://phabricator.services.mozilla.com/D114875
2021-05-12 22:52:28 +00:00
Emilio Cobos Álvarez 9e80cd9710 Bug 1708384 - Properly hide -moz-context-properties from content. r=dholbert
Depends on D114481

Differential Revision: https://phabricator.services.mozilla.com/D114482
2021-05-12 21:45:18 +00:00
Emilio Cobos Álvarez 41179cf5d6 Bug 1708384 - Properly hide -moz-control-character-visibility from content. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D114481
2021-05-12 21:45:18 +00:00
Emilio Cobos Álvarez e2075d6bdd Bug 1710643 - Remove support for unused gtk infobar widget and colors. r=stransky
Presumably they were for notifications and now we use native notifications?

Differential Revision: https://phabricator.services.mozilla.com/D114874
2021-05-12 19:13:21 +00:00
Emilio Cobos Álvarez efbee87994 Bug 1709415 - Support -webkit-image-set as a parse-time alias to image-set(). r=karlcow,twisniewski
The webkit syntax is an strict subset of the modern one, so this should
be doable, and is the simplest.

If my reading of the WebKit code is correct it should also be the way
WebKit deals with this (except they restrict -webkit-image-set() syntax
artificially).

 * https://github.com/w3c/csswg-drafts/issues/6285
 * https://github.com/whatwg/compat/issues/144

Differential Revision: https://phabricator.services.mozilla.com/D114912
2021-05-12 10:15:37 +00:00
Emilio Cobos Álvarez c8aa59aaae Bug 1707170 - Will-change should only create stacking contexts / containing blocks / etc if the property it'd change would apply. r=miko
As per https://drafts.csswg.org/css-will-change/#will-change.

> If any non-initial value of a property would cause the element to
> generate a containing block for absolutely positioned elements,
> specifying that property in will-change must cause the element to
> generate a containing block for absolutely positioned elements.

But in this case the transform property wouldn't apply to the element so
there's no reason to create a stacking-context.

Differential Revision: https://phabricator.services.mozilla.com/D114121
2021-05-10 13:09:42 +00:00
Emilio Cobos Álvarez 366c9f5ece Bug 1709647 - Remove unused NS_CHANGE_COLOR_IF_SAME_AS_BG. r=jfkthame
It was introduced in bug 1024930, but it is unused since.

Differential Revision: https://phabricator.services.mozilla.com/D114389
2021-05-06 09:57:19 +00:00
Emilio Cobos Álvarez 1cdf344860 Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-05 09:41:24 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00
Emilio Cobos Álvarez 11ad9c7bcd Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-04 10:24:07 +00:00
Emilio Cobos Álvarez 4751e27983 Bug 1707720 - Use saturating addition for math-depth. r=fredw
Differential Revision: https://phabricator.services.mozilla.com/D114070
2021-05-03 11:40:26 +00:00
Xidorn Quan 083983b7f0 Bug 1708897 - Remove layout.css.ruby.position-alternate.enabled pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114044
2021-05-02 03:27:50 +00:00
Emilio Cobos Álvarez edcab9e98f Bug 1708063 - Don't allow whitespace between media query operator delim tokens. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D113648
2021-05-01 21:04:47 +00:00
Csoregi Natalia a76b78d543 Backed out changeset e01ec8694924 (bug 1700957) as requested. CLOSED TREE 2021-04-28 18:09:01 +03:00
imoraru 29587fe8d1 Backed out changeset d3056dc50fe3 (bug 1707614) for causing devtools failures at browser_rules_colorpicker-release-outside-frame.js . CLOSED TREE 2021-04-28 16:08:31 +03:00
Emilio Cobos Álvarez 175fe1b124 Bug 1707614 - Don't use -moz-devtools-highlighted for background contrast checks in the accessibility inspector. r=nchevobbe
It's the wrong pseudo-class name! Plus, it's not really needed, just
override the page styles temporarily.

Remove the pseudo-class, since it's its only remaining usage.

Differential Revision: https://phabricator.services.mozilla.com/D113374
2021-04-28 10:01:23 +00:00
Emma Malysz ce84c86379 Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 03:17:56 +00:00
Butkovits Atila 9597a30fbb Backed out changeset 1c362512f27b (bug 1700957) for causing failures at test_chrome_only_media_queries.html. CLOSED TREE 2021-04-28 05:55:14 +03:00
Emilio Cobos Álvarez b410f349c5 Bug 1707116 - Make sure to consume the flusher when we hit the cascade data cache. r=boris
So that sheets are properly marked as committed. The issue is that we
have this "committed" optimization, to avoid doing work if somebody adds
and removes an stylesheet without us flushing in the meantime:

  https://searchfox.org/mozilla-central/rev/f018480dfed4fc583703a5770a6db9ab9dc0fb99/servo/components/style/stylesheet_set.rs#308-319

The "committed" bit is set when we consume the flusher (in each(..)).

However when we hit the cache, before this patch, we wouldn't consume
it, which means that we may fail to do some full rebuilds even though we
need them.

Fix it by making sure we call each() in that case.

We add a test (the test would show a red square before this patch, and a
lime square with the fix).

Differential Revision: https://phabricator.services.mozilla.com/D113206
2021-04-28 00:40:18 +00:00
Emma Malysz a344c0fa4c Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 00:29:45 +00:00
Emilio Cobos Álvarez 9402e09c63 Bug 1707895 - Make the -moz-toolbar-prefers-color-scheme a tri-state. r=mstriemer
This will allow detecting the system theme, which allows fixing some of
the blocked bugs.

Note that when using the system theme we will still match light or dark
appropriately, so this shouldn't change behavior just yet.

Differential Revision: https://phabricator.services.mozilla.com/D113516
2021-04-27 16:20:35 +00:00
Emilio Cobos Álvarez 34a9a0f457 Bug 1705605 - Implement accent-color in nsNativeBasicTheme. r=mstange
This is a new addition for CSS UI Level 4:

  https://drafts.csswg.org/css-ui-4/#widget-accent

I want to provide feedback on some spec issues, and thought it was a
kinda neat thing to prototype (it also makes testing contrast and such
with random GTK themes easier).

For now enable for Nightly only.

Differential Revision: https://phabricator.services.mozilla.com/D112312
2021-04-27 10:41:00 +00:00
Emilio Cobos Álvarez 5c9bd32723 Bug 1707597 - Garbage-collect event state bits. r=smaug
We had about 9 gaps / unused bits. I moved the devtools ones at the end
because I think we should be able to remove them (but separate bug).

Differential Revision: https://phabricator.services.mozilla.com/D113365
2021-04-26 15:46:52 +00:00
Emilio Cobos Álvarez 8814b4ab14 Bug 1706223 - Fix whitespace handling in clamp() parsing. r=xidorn
We should just restore the state when seeing whitespace and an unknown
token like when we do when finding any other token a few lines below.

This is not an issue for most callers (it's only an issue for clamp())
because the other callers use either `parse_comma_separated()` (for
min/max), or `parse_nested_block()` (for parens / nested calc()).

Both of those functions restrict the input in such a way that
is_exhausted returns true (a few lines above) and thus we parse
successfully.

Differential Revision: https://phabricator.services.mozilla.com/D112681
2021-04-21 13:39:13 +00:00
Emilio Cobos Álvarez 8e47e5abc2 Bug 1705877 - image-set() should influence intrinsic size of the image. r=dholbert,layout-reviewers
https://drafts.csswg.org/css-images-4/#image-set-notation has:

> [...] it also specifies the image’s natural resolution, overriding any other
> source of data that might supply a natural resolution.

Astounding that there was literally no WPT for this at all. I added three: one
for backgrounds, one for list-style-image, and one for `content`. Cursor is not
handled on this patch because that one requires a fair amount of extra work.

Differential Revision: https://phabricator.services.mozilla.com/D112474
2021-04-19 19:55:27 +00:00
Mark Striemer 209f987106 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-18 22:22:49 +00:00
Pierre TALLOTTE 6a6e08264c Bug 1695404 - Support the type() function in image-set. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109201
2021-04-16 20:58:59 +00:00
Noemi Erli f90389736b Backed out changeset 1c9943dacbdb (bug 1701691) for causing failures in browser_toolbar_prefers_color_scheme.js CLOSED TREE 2021-04-16 05:29:10 +03:00
Emilio Cobos Álvarez b42ccb7de0 Bug 1705509 - Hide -moz-outline-radius behind a pref. r=mstange
This property does nothing since bug 315209 got implemented.

Every single user that I checked was doing the same math by hand, so
hooray for good defaults :-)

Differential Revision: https://phabricator.services.mozilla.com/D112253
2021-04-16 01:01:45 +00:00
Mark Striemer 53099a968e Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-16 00:43:46 +00:00
Csoregi Natalia 5cfbff72cd Backed out changeset 79c1392f7c43 (bug 1701691) for failures on browser_toolbar_prefers_color_scheme.js. CLOSED TREE 2021-04-15 22:18:09 +03:00
Mark Striemer 67dde35bda Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-15 18:17:07 +00:00
Emilio Cobos Álvarez 2bf7e6cfc9 Bug 1704179 - Add a CSS error to the console when using non-featureless :host selectors. r=boris
(which would never match by definition).

Differential Revision: https://phabricator.services.mozilla.com/D111610
2021-04-15 09:33:58 +00:00
Morgan Reschenberg 26ebc62e3a Bug 1705168: Enable forced-colors in UA and chrome always r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112069
2021-04-14 21:33:11 +00:00