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

13501 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 3cfb419d00 Bug 1665816 - CSSOM should respect rule-level property restrictions. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D90729
2020-09-21 09:57:46 +00:00
Bogdan Tara 2991b8c066 Backed out changeset 0da5103ba772 (bug 1665975) for mozglue_static::panic_hook mass crashes CLOSED TREE 2020-09-21 10:07:03 +03:00
Frederic Wang 1ac695dbdc Bug 1665975 - Implement the math-style property. r=emilio
This patch renames the internal -moz-math-display to math-style and
exposes it under the layout.css.math-style.enabled preference. The
initial value becomes "normal" but that does not affect the default
MathML behavior since the UA style sheet sets the math-style property
explicitly on <math> tags. WPT tests are updated to use the syntax
approved by the CSSWG.

Intent to prototype: https://groups.google.com/forum/#!msg/mozilla.dev.platform/1hQQ7ISudGo/_yLEckEeBQAJ

Differential Revision: https://phabricator.services.mozilla.com/D90731
2020-09-21 05:41:51 +00:00
Emilio Cobos Álvarez b58ca45005 Bug 1665823 - Consider display: none elements as having current style for animation-only traversal. r=hiro
This is mostly a band-aid, though it also serves sorta as an
optimization.

The issue here is basically bug 1393323. By re-cascading, right now we
can't come up with the right before-change style if CSSOM has mutated
the rules. We really need a better way to come up with the before-change
style, as the animation-only traversal is not really sustainable (nor
fast, for that matter...).

But this avoids crashing and prevents the regression easily, so let's do
that for now.

Differential Revision: https://phabricator.services.mozilla.com/D90700
2020-09-19 14:28:51 +00:00
Mats Palmgren a4b9f330ab Bug 1660358 - [css-lists-3][css-pseudo-4] Add support for 'text-transform' on ::marker. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90329
2020-09-15 23:22:26 +00:00
Emilio Cobos Álvarez 8b0177b46a Bug 1664718 - Allow :is() and :where() to have better error recovery. r=xidorn
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.

Depends on D90049

Differential Revision: https://phabricator.services.mozilla.com/D90050
2020-09-14 22:33:01 +00:00
Mihai Alexandru Michis 47b948eabc Backed out 2 changesets (bug 1664718) for causing wpt and bc failures.
CLOSED TREE

Backed out changeset 62e71d3b6b32 (bug 1664718)
Backed out changeset c8a8791a26ed (bug 1664718)
2020-09-14 20:32:50 +03:00
Emilio Cobos Álvarez eec23cefc5 Bug 1664718 - Fix selectors unit tests.
MANUAL PUSH: Fix BR bustage. CLOSED TREE
2020-09-14 17:37:51 +02:00
Emilio Cobos Álvarez 4c86d9e159 Bug 1664718 - Allow :is() and :where() to have better error recovery. r=xidorn
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.

Depends on D90049

Differential Revision: https://phabricator.services.mozilla.com/D90050
2020-09-14 15:04:22 +00:00
Emilio Cobos Álvarez e9b7f73129 Bug 1664718 - Minor cleanup: Use shorthand initialization in selectors. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D90049
2020-09-13 21:57:04 +00:00
Emilio Cobos Álvarez 948fa5c6d2 Bug 1664156 - Remove -moz-suppressed. r=edgar
Per spec we shouldn't behave differently depending on how we blocked the
image/object/etc.

This may have made sense in the past when ad blockers were implemented
via nsIContentPolicy, but I think nowadays it doesn't make sense, and
showing fallback is preferred.

There's a couple extra cleanups we can do after this lands, like
removing HTMLImageElement.imageBlockingStatus and simplifying a bit that
code. But I'll do that in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D89912
2020-09-13 11:33:13 +00:00
Noemi Erli 733e3b440c Backed out changeset 64eb902728bc (bug 1664156) for causing mochitest failures in test_meta_csp_self.html CLOSED TREE 2020-09-12 22:56:18 +03:00
Emilio Cobos Álvarez 4b18c556e4 Bug 1664156 - Remove -moz-suppressed. r=edgar
Per spec we shouldn't behave differently depending on how we blocked the
image/object/etc.

This may have made sense in the past when ad blockers were implemented
via nsIContentPolicy, but I think nowadays it doesn't make sense, and
showing fallback is preferred.

There's a couple extra cleanups we can do after this lands, like
removing HTMLImageElement.imageBlockingStatus and simplifying a bit that
code. But I'll do that in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D89912
2020-09-12 17:39:18 +00:00
Emilio Cobos Álvarez 1ef2a5628a Bug 1664432 - Remove -moz-user-disabled. r=edgar
We treat it exactly the same as -moz-broken. The pseudo-class is not
exposed to content, so I don't think we have a reason to keep it around.

Differential Revision: https://phabricator.services.mozilla.com/D89904
2020-09-11 19:26:40 +00:00
Emilio Cobos Álvarez a3c20c9800 Bug 1662703 - Make appearance: button behave like auto. r=heycam
As per https://github.com/w3c/csswg-drafts/issues/5174.

Differential Revision: https://phabricator.services.mozilla.com/D89119
2020-09-10 08:58:09 +00:00
Razvan Maries f0ac3ad62a Backed out changeset baab244deeb0 (bug 1662703) for perma failures on 482681.xhtml. CLOSED TREE 2020-09-10 04:50:23 +03:00
Emilio Cobos Álvarez af8bc3472b Bug 1662703 - Make appearance: button behave like auto. r=heycam
As per https://github.com/w3c/csswg-drafts/issues/5174.

Differential Revision: https://phabricator.services.mozilla.com/D89119
2020-09-08 23:03:58 +00:00
Emilio Cobos Álvarez 80159f3cf5 Bug 1663618 - Speed up custom property diffing. r=boris
When entering or leaving fullscreen in youtube, we spend most of the
restyle time diffing custom properties, under IndexMap::eq.

Turns out that IndexMap equality is not order-aware, and thus you
actually need to make a hashmap lookup for each entry in the map, which
is unnecessarily inefficient.

Instead, just compare the iterators.

See https://github.com/bluss/indexmap/issues/153.

Differential Revision: https://phabricator.services.mozilla.com/D89434
2020-09-08 10:33:03 +00:00
Emilio Cobos Álvarez 0cc4b1a206 Bug 1663231 - Make @font-face and @counter-style serialization closer other browsers and style rules. r=xidorn
Style rules serialize on one line and so should @font-face blocks.

Part of https://github.com/w3c/csswg-drafts/issues/4828.

Differential Revision: https://phabricator.services.mozilla.com/D89302
2020-09-05 00:42:43 +00:00
Emilio Cobos Álvarez 03baee9d8a Bug 1662478 - Rename ::file-chooser-button to ::file-selector-button, and enable it in all channels. r=jwatt
See https://github.com/w3c/csswg-drafts/issues/5049

Differential Revision: https://phabricator.services.mozilla.com/D88995
2020-09-01 22:58:10 +00:00
Emilio Cobos Álvarez 063c081360 Bug 1660857 - Only apply grayscale filter for printing on print preview. r=jwatt,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D88065
2020-08-27 09:37:31 +00:00
Narcis Beleuzu 77bc01a5e1 Backed out 2 changesets (bug 1660857) for bc failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset 1378546cc0db (bug 1660857)
Backed out changeset 6c8985ac1d4c (bug 1660857)
2020-08-27 00:28:58 +03:00
Emilio Cobos Álvarez 0686e31ea8 Bug 1660857 - Only apply grayscale filter for printing on print preview. r=jwatt,dholbert
Depends on D88064

Differential Revision: https://phabricator.services.mozilla.com/D88065
2020-08-26 19:12:15 +00:00
Masatoshi Kimura 4215d524dc Bug 1658690 - Replace :-moz-native-anonymous-no-specificity with :where(:-moz-native-anonymous). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88255
2020-08-26 11:45:35 +00:00
Emilio Cobos Álvarez 711e7aa60e Bug 1659718 - Bail out when collecting invalidations for nested rules if any of them make us fully invalid. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D87446
2020-08-20 10:45:42 +00:00
Emilio Cobos Álvarez 7c7897149c Bug 1414600 - Make media queries and viewport units in print be evaluated against the default page size minus margins. r=dholbert,nordzilla
For that, move the default page margin computation to nsPresContext.

See https://github.com/w3c/csswg-drafts/issues/5437 as to why doing this
and other alternatives.

Differential Revision: https://phabricator.services.mozilla.com/D87311
2020-08-19 10:32:16 +00:00
Nicolas Silva 298e987b8e Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-18 17:28:27 +00:00
Nicolas Silva cebafe261f Bug 1656236 - Update to euclid 0.22. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D85549
2020-08-18 22:09:27 +00:00
Csoregi Natalia 9af7b6fe90 Backed out changeset b6d1532f6cd4 (bug 1414600) for failures on mq_print_height.xhtml . CLOSED TREE 2020-08-19 04:58:49 +03:00
Emilio Cobos Álvarez ae622cd8cd Bug 1414600 - Make media queries and viewport units in print be evaluated against the default page size minus margins. r=dholbert,nordzilla
For that, move the default page margin computation to nsPresContext.

See https://github.com/w3c/csswg-drafts/issues/5437 as to why doing this
and other alternatives.

Differential Revision: https://phabricator.services.mozilla.com/D87311
2020-08-19 00:02:34 +00:00
Csoregi Natalia fd9ca77e37 Backed out 3 changesets (bug 1656236) for wrench failures on filter-drop-shadow-clip-3.yaml. CLOSED TREE
Backed out changeset 78205b816ac8 (bug 1656236)
Backed out changeset dc4ccb5a8ea9 (bug 1656236)
Backed out changeset dcfa644ba078 (bug 1656236)
2020-08-18 20:22:57 +03:00
Nicolas Silva 0473064210 Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-18 16:06:19 +00:00
Nicolas Silva fc87bc960e Bug 1656236 - Update to euclid 0.22. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D85549
2020-08-18 16:06:07 +00:00
Zeke Medley a591e69aa0 Bug 1591204 - Support forced colors media feature r=emilio
Enabled behind layout.css.forced-colors.enabled pending finalization
of the spec:

<https://drafts.csswg.org/mediaqueries-5/#forced-colors>

Differential Revision: https://phabricator.services.mozilla.com/D87147
2020-08-17 20:50:49 +00:00
Sean Feng 85bfe3d376 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Depends on D86392

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-17 15:41:19 +00:00
Shinichi Morimoto bc916f4b16 Bug 1659265 - remove layout.css.offset-logical-properties.enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D87297
2020-08-17 17:51:31 +00:00
Boris Chiou cb69cd917a Bug 1639963 - Drop redundant check of auto in nsImageFrame. r=emilio
Appearally, we don't have to check mAspectRatio.auto_ because we checked it
already in the same function.

Differential Revision: https://phabricator.services.mozilla.com/D79336
2020-08-17 07:08:16 +00:00
Boris Chiou b425a6022b Bug 1639963 - Calculate inline size and block size based on aspect-ratio. r=emilio
We calculate the size of ratio-dependent axis by aspect-ratio while
initializing its ReflowInput, for most of the basic block cases.

This patch doesn't include "Automatic content-based minimum sizes",
which will be handled later. Besides, replaced elements will be handled
later as well.

We don't pass abspos-004.tentative.html because there is still a
spec issue: https://github.com/w3c/csswg-drafts/issues/5151.
For other tests we didn't pass (e.g. block-aspect-ratio-009.tentative.html,
or replaced-element-00x.tentative.html), we fix them later.

Besides, in this patch, we don't handle the case if the size of
ratio-determining axis uses intrinsic size keywords (which needs to be
calculated by its content size). We will fix this in the following bug
(Bug 1646100).

Differential Revision: https://phabricator.services.mozilla.com/D78964
2020-08-17 06:26:19 +00:00
Zeke Medley d1653ccb9a Bug 1658780 - Update the prefers-contrast media query to use the new more/less keywords r=emilio
Per the resolution here:
https://github.com/w3c/csswg-drafts/issues/2943#issuecomment-672994920

Differential Revision: https://phabricator.services.mozilla.com/D86848
2020-08-17 01:41:16 +00:00
Emilio Cobos Álvarez 268af41f18 Bug 1600635 - Fix two minor issues with scrollbar style caching. r=heycam
Add -moz-inert and -moz-script-level to the set of internal properties
that aren't included in "all".

-moz-inert may need to be uncacheable in the future if we make it not
change the pointer-events computed value. Left a comment to that effect.

Differential Revision: https://phabricator.services.mozilla.com/D87115
2020-08-16 00:43:48 +00:00
Mihai Alexandru Michis fc1c9759fc Backed out 3 changesets (Bug 1200896) for causing Bug 1659042.
CLOSED TREE

Backed out changeset 17df14f0b129 (bug 1200896)
Backed out changeset 5d9e9bd12cd2 (bug 1200896)
Backed out changeset 7f016de8d52f (bug 1200896)
2020-08-14 09:06:45 +03:00
Sean Feng 3f16476b10 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-13 19:05:37 +00:00
Emilio Cobos Álvarez b20e708214 Bug 561154 - Implement :-moz-any() as an alias of :is(). r=heycam
This is strictly better and more flexible, but can change specificity so
have a pref in case it causes trouble. I doubt it will though, the
specificity rules of :is() make more sense, and my gut feeling is that
:-moz-any is not very used on the wild.

Make it early-beta-or-earlier for now to minimize risk, once this is on
nightly for a bit we can enable it everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D86696
2020-08-12 04:26:07 +00:00
Emilio Cobos Álvarez d276a931b8 Bug 1658525- Remove layout.css.comparison-functions.enabled. r=xidorn
Shipped since FF75 (bug 1519519).

Differential Revision: https://phabricator.services.mozilla.com/D86693
2020-08-11 10:27:42 +00:00
Emilio Cobos Álvarez 2a82d607c5 Bug 1658470 - Remove layout.css.is-where-selectors.enabled. r=heycam
Shipped since 78 (bug 1632646).

Differential Revision: https://phabricator.services.mozilla.com/D86662
2020-08-11 05:54:22 +00:00
Emilio Cobos Álvarez 906c1a7801 Bug 1658470 - Remove layout.css.shadow-parts.enabled. r=heycam
Shipped since 72 (bug 1559074).

Differential Revision: https://phabricator.services.mozilla.com/D86661
2020-08-11 05:54:17 +00:00
Razvan Maries 0dc0ced176 Backed out 2 changesets (bug 1200896) for perma failures on browser_pioneer_ui.js. CLOSED TREE
Backed out changeset c7ae88fd1bd7 (bug 1200896)
Backed out changeset 8b57f059e63e (bug 1200896)
2020-08-10 23:08:04 +03:00
Sean Feng 17473c0717 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-10 18:20:51 +00:00
Emilio Cobos Álvarez b800731028 Bug 1655751 - Invalidate for CSSOM changes in a more fine-grained way. r=heycam
Also, for changes in CSS declarations, like changing
cssRules[i].style.color or something, we end up avoiding a lot of the
work we were doing.

This page still trips us in the sense that they add a stylesheet, then
call getBoundingClientRect(), then insert more rules in the stylesheet,
which causes us to rebuild a lot of the cascade data.

We could try to detect appends to the last stylesheet on the list or
something I guess, and avoid rebuilding the cascade data in some cases.

Depends on D85615

Differential Revision: https://phabricator.services.mozilla.com/D85616
2020-08-10 18:00:44 +00:00
Emilio Cobos Álvarez 3e6d61cbd1 Bug 1655751 - Fix a silly mistake in which we'd prefer a local name / tag invalidation to an id invalidation. r=heycam
ID invalidations should always win.

This also prefers invalidations deeper in the subtree to higher up.

Differential Revision: https://phabricator.services.mozilla.com/D85615
2020-08-10 18:00:29 +00:00
Dorel Luca c594ecfbe7 Backed out 4 changesets (bug 1656236) for Webrender build bustage in reftests/filters/filter-drop-shadow-clip-3.yaml. CLOSED TREE
Backed out changeset c24f6a05294b (bug 1656236)
Backed out changeset a5d6a6f2f3ac (bug 1656236)
Backed out changeset bf4a2fe9f9c0 (bug 1656236)
Backed out changeset c5189b274b91 (bug 1656236)
2020-08-05 18:39:35 +03:00
Nicolas Silva 22f326b43d Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-05 09:15:24 +00:00
Nicolas Silva 31d1e467eb Bug 1656236 - Update to euclid 0.22. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D85549
2020-08-05 14:43:44 +00:00
Cristina Coroiu 2930787297 Backed out 4 changesets (bug 1656236) for build bustages on a CLOSED TREE
Backed out changeset bd79e14bc5ba (bug 1656236)
Backed out changeset dc76da883823 (bug 1656236)
Backed out changeset c4883923e091 (bug 1656236)
Backed out changeset 9464c1dcb0c9 (bug 1656236)
2020-08-05 12:10:43 +03:00
Nicolas Silva 4db3a418e0 Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-05 08:37:38 +00:00
Nicolas Silva 66fc42bbc6 Bug 1656236 - Update to euclid 0.22. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D85549
2020-08-05 08:35:29 +00:00
Emilio Cobos Álvarez 62f6fc74f8 Bug 1656954 - Use Overflow::is_scrollable in StyleAdjuster. r=mats
It was introduced in the overflow: clip work but this standalone
equivalent remained.

Differential Revision: https://phabricator.services.mozilla.com/D85778
2020-08-03 21:19:56 +00:00
Mats Palmgren 910e11aa99 Bug 1531609 part 2 - Implement overflow:clip/visible combinations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73717
2020-08-01 01:57:41 +00:00
Jeremy Ir 20235b390f Bug 1531609 part 1 - Rename overflow:-moz-hidden-unscrollable to overflow:clip. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73716
2020-08-01 01:56:58 +00:00
Butkovits Atila cc95b93cba Backed out 3 changesets (bug 1635473, bug 1531609) for reftest failures. CLOSED TREE
Backed out changeset 1e7b32808be8 (bug 1531609)
Backed out changeset e64a61869cdb (bug 1531609)
Backed out changeset 6da37d7f6dd3 (bug 1635473)
2020-07-31 23:56:54 +03:00
Mats Palmgren c875610606 Bug 1531609 part 2 - Implement overflow:clip/visible combinations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73717
2020-07-31 15:31:36 +00:00
Jeremy Ir 92b8f0f77a Bug 1531609 part 1 - Rename overflow:-moz-hidden-unscrollable to overflow:clip. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73716
2020-07-31 16:40:48 +00:00
Zeke Medley dc8e84e2d4 Bug 546052 - Add parsing for cross-fade from CSS Image Values and Replaced Content Module Level 4 r=emilio
This is the first of what will likely be a couple patches for
cross-fade's implementation. Bug 546052 tracks it's complete
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D81889
2020-07-31 16:11:38 +00:00
Dorel Luca 3714922d1b Backed out changeset 9e9c50bbb2f3 (bug 546052) for build bustage on Linux. CLOSED TREE 2020-07-29 02:12:55 +03:00
Zeke Medley 1f9a50dd97 Bug 546052 - Add parsing for cross-fade from CSS Image Values and Replaced Content Module Level 4 r=emilio
This is the first of what will likely be a couple patches for
cross-fade's implementation. Bug 546052 tracks it's complete
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D81889
2020-07-28 22:18:31 +00:00
Brian Birtles cb11586e66 Bug 1654195 - Make text-combine-upright not animatable; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D84935
2020-07-27 18:45:35 +00:00
Alexander Surkov 305d2fd10d Bug 921504 - implement -moz-inert CSS property r=emilio
-moz-inert CSS property reflects inert subtrees concept and can be used to implement HTML:dialog element and HTML:inert attribute

Differential Revision: https://phabricator.services.mozilla.com/D81701
2020-07-26 21:30:56 +00:00
Philipp Zech 3d4be168ae Bug 1648938 - Convert writing-modes #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D84016
2020-07-23 21:31:23 +00:00
Narcis Beleuzu 37cb83a398 Backed out 2 changesets (bug 921504) for wpt failures on inert-retargeting-iframe.tentative.html . CLOSED TREE
Backed out changeset 8b75cd744e80 (bug 921504)
Backed out changeset a56b2d354613 (bug 921504)
2020-07-22 23:53:55 +03:00
Alexander Surkov 1c382cad65 Bug 921504 - implement HTML:inert r=emilio,heycam
Differential Revision: https://phabricator.services.mozilla.com/D81701
2020-07-22 04:26:08 +00:00
Brian Birtles 029c6ab57b Bug 1637532 - Allow animations and transitions on ::marker; r=boris
As per the following change to the spec:

6b3d7240b5

The additional failure annotation is added because we don't currently treat
text-combine-upright as non-animatable and this patch exposes the existing bug
(bug 1654195).

Differential Revision: https://phabricator.services.mozilla.com/D84308
2020-07-22 00:44:18 +00:00
Brian Birtles 9159650f0b Bug 1636562 - Respect property restrictions on pseudo elements when animating; r=boris
Differential Revision: https://phabricator.services.mozilla.com/D84306
2020-07-21 23:12:35 +00:00
Mats Palmgren 0a85300e43 Bug 1653052 - [css-grid] Make empty and all-whitespace strings in 'grid-template-areas' invalid. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D84398
2020-07-21 19:46:45 +00:00
Narcis Beleuzu 0ac1595a1a Backed out 2 changesets (bug 921504) for mochitest failures on test_animation-type-longhand.html . CLOSED TREE
Backed out changeset e87edffd46b9 (bug 921504)
Backed out changeset eb53880e5f0e (bug 921504)
2020-07-20 17:37:32 +03:00
Alexander Surkov cf6cccf0ef Bug 921504 - implement HTML:inert r=emilio,heycam
Differential Revision: https://phabricator.services.mozilla.com/D81701
2020-07-20 04:22:36 +00:00
Emilio Cobos Álvarez 12c7ce039a Bug 1652698 - Make stylesheet invalidation faster. r=heycam
This fixes performance issues when there's a massive number of rules and
a massive DOM.

Instead of going through all rules for all the DOM, we now look stuff in
hashmaps.

Differential Revision: https://phabricator.services.mozilla.com/D83506
2020-07-20 07:40:17 +00:00
Cameron McCormack 82b32f112e Bug 1643246 - Don't use attribute selectors for determining if a select is a drop down or a list box. r=emilio
Instead add a pseudo-class that does the expected size="" attribute parsing.

Removing the Gtk-specific rule setting the text color since it doesn't
seem to have any effect currently.

Differential Revision: https://phabricator.services.mozilla.com/D83448
2020-07-17 09:56:53 +00:00
Cameron McCormack ec3a51f08d Bug 1620467 - Part 12: Hide range and number-input appearance values from content. r=emilio
Forgot to follow up on these two remaining non-standard values that may have
been being used to reset a <meter> or <input type=number> back to its
original appearance, but which telemetry showed no usage of.

Differential Revision: https://phabricator.services.mozilla.com/D83598
2020-07-16 22:04:38 +00:00
Cameron McCormack dbda1613e6 Bug 1620467 - Part 11: Re-order Appearance values. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83437
2020-07-16 22:04:31 +00:00
Cameron McCormack 557d0316a9 Bug 1620467 - Part 8: Make `appearance: button` behave like auto on various elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83434
2020-07-16 22:04:24 +00:00
Cameron McCormack 4de7c62706 Bug 1620467 - Part 7: Avoid exposing `appearance: range-thumb` to content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83433
2020-07-16 22:04:21 +00:00
Cameron McCormack 7794182b6d Bug 1620467 - Part 6: Mark appearance values that are only used internally as chrome-only. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83432
2020-07-16 22:04:17 +00:00
Cameron McCormack af3cb9efc8 Bug 1620467 - Part 5: Remove appearance values not used by the browser or Web content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83431
2020-07-16 22:04:14 +00:00
Cameron McCormack dd61f595eb Bug 1620467 - Part 4: Change internal uses of -moz-appearance to appearance and -moz-default-appearance. r=emilio,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,ntim,agi,miketaylr
Uses of `-moz-appearance: none` are changed to `appearance: none`.

Uses of other values that are simply reverting the appearance back to
its default are changed to `appearance: auto`.

Uses of values in UA sheets that are defining the inherent appearance of
widgets are changed to:

  appearance: auto;
  -moz-default-appearance: <value>;

since those values are either no longer supported on (-moz-)appearance,
or are still supported but only in some limited form.

There are some uses of `-moz-appearance: textfield` on <input
type=number> elements that are renamed to `appearance: textfield`.

Differential Revision: https://phabricator.services.mozilla.com/D83430
2020-07-16 22:04:14 +00:00
Cameron McCormack 1fe732d979 Bug 1620467 - Part 3: Defer to -moz-default-appearance when appearance is auto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83429
2020-07-16 22:04:12 +00:00
Cameron McCormack 1739610d9a Bug 1620467 - Part 2: Add unprefixed appearance property and make -moz-appearance and -webkit-appearance be aliases. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83428
2020-07-16 22:04:11 +00:00
Cameron McCormack 4e13fec003 Bug 1620467 - Part 1: Remove appearance use counters. r=emilio
They have served their purpose.

Differential Revision: https://phabricator.services.mozilla.com/D83427
2020-07-16 22:03:54 +00:00
Emilio Cobos Álvarez a4fa8230aa Bug 1653339 - Teach style_derive's map_type_params about mapping self correctly. r=boris
Consider the following:

struct Complex<T> {
    something: T,
    #[compute(field_bound)]
    something_else: Generic<Self, T>,
}

That will generate:

impl<T> ToComputedValue for Complex<T>
where
    T: ToComputedValue,
    Generic<Self, T>: ToComputedValue<ComputedValue = Generic<Self, <T as ToComputedValue>::ComputedValue>>,
{
    // ...
}

That last clause is obviously incorrect. map_type_params correctly maps
the T, but it should know also about Self.

Ideally we could just do the same as for T and do:

    <Self as ToComputedValue>::ComputedValue

But that doesn't quite work, because we are in that implementation of
the trait, and the compiler rightfully complains about we don't yet
knowing the computed type. So we need to pass it explicitly, which is
simple enough, if a bit annoying.

Differential Revision: https://phabricator.services.mozilla.com/D83816
2020-07-16 18:51:21 +00:00
Simon Giesecke 4e8c935384 Bug 1652023 - Remove unnecessary includes from PresShell.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83114
2020-07-15 13:53:02 +00:00
Simon Giesecke f4dc6dfdea Bug 1652010 - Reduce instantiations and cost of StyleOwnedSlice::AsSpan. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83104
2020-07-15 12:48:16 +00:00
Emilio Cobos Álvarez d275fd6251 Bug 1631449 - Apply a grayscale filter to pages when monochrome. r=jwatt
This hooks the "monochrome" media query and co to the
nsIPrintSettings.printInColor setting.

This print setting we're using is not exposed in the print preview UI,
but you can test it setting the print.print_in_color preference to
"false", and then print preview will correctly show up greyscale'd.

Once this lands, the UI folks just have to use it as they see fit :)

I would've liked to add a proper rendering test, but the print reftests
check only whether the PDF text matches.

I could add a test to printpreview_helper.xhtml, but I'm refactoring
that file in bug 1648064 so I'd rather wait a bit and add it in a
separate bug. The test for the media feature should make sure that we
test that code path at least.

Differential Revision: https://phabricator.services.mozilla.com/D83552
2020-07-15 03:45:33 +00:00
Emilio Cobos Álvarez 8a684e8429 Bug 1650189 - Fix an off-by-one in the transition property iterator. r=mrobinson
By the time we get to iterate over the longhands of a shorthand, we've
already advanced the range iterator, so we look at the next duration and
such, which causes this bug.

I'm seriously baffled that no existing test caught this when it
landed, neither in our internal test suite nor wpt...  :/

Differential Revision: https://phabricator.services.mozilla.com/D82396
2020-07-06 16:26:20 +00:00
Cameron McCormack e309ecf825 Bug 1650259 - Remove unused function on Appearance. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D82124
2020-07-03 04:11:18 +00:00
Cameron McCormack c40850b854 Bug 1650256 - Remove unused StyleAppearance values. r=emilio
The parsing of these values was disabled in bug 1554150.

Differential Revision: https://phabricator.services.mozilla.com/D82122
2020-07-03 04:06:13 +00:00
Emilio Cobos Álvarez 3f74138cd4 Bug 1631929 - Have the destructor of CalcNode be never inline. r=dmajor
You tell me which other things need it... Copy-constructor? operator==?
and such?

Differential Revision: https://phabricator.services.mozilla.com/D73385
2020-06-30 22:31:22 +00:00
Zeke Medley 83e9191999 Bug 1506364 - Implement the prefers-contrast media-query. r=morgan,emilio
Differential Revision: https://phabricator.services.mozilla.com/D79553
2020-06-29 17:46:12 +00:00
Emilio Cobos Álvarez b9b9e38dd9 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-22 09:45:40 +00:00
Emilio Cobos Álvarez 40b0214e2c Bug 1646811 - Fix gecko build.
Depends on D80248

Differential Revision: https://phabricator.services.mozilla.com/D80249
2020-06-18 18:14:29 +00:00
Emilio Cobos Álvarez 3222b8debd Bug 1646811 - Remove some unused extern crate declarations now that style is in rust 2018.
This avoids some warnings.

Depends on D80247

Differential Revision: https://phabricator.services.mozilla.com/D80248
2020-06-18 18:14:24 +00:00
Emilio Cobos Álvarez 886d53972c Bug 1646811 - servo: Remove the dependency on font-kit from style.
No good reason to have this IMO, and helps remove some #[cfg] blocks.

Depends on D80246

Differential Revision: https://phabricator.services.mozilla.com/D80247
2020-06-18 18:14:21 +00:00