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

14201 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 3b00b2f6db Bug 1786147 - Fix typo to avoid devtools property-db failures.
MANUAL PUSH: Orange fix CLOSED TREE
2022-08-31 15:43:26 +02:00
Emilio Cobos Álvarez 83c7733c7c Bug 1786147 - Move line-clamp out of mako and do some adjacent clean-up. r=boris
No behavior change, but simplifies the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D155180
2022-08-31 12:39:19 +00:00
Jonathan Kew 6187a4d845 Bug 1788036 - Update font-tech feature-* keywords to features-*, as per editorial fix in the spec. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D155962
2022-08-30 14:29:42 +00:00
Frederic Wang e65e52a1da Bug 1187682 - Use ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants. r=emilio
The math-depth implementation is refined to take into account the
ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants (if the
parent's first valid font has a MATH table) in order to calculate the
scale factor between math-deth 0 and 1, and between 0 and 2 respectively.

Behavior is unchanged if the legacy scriptsizemultiplier attribute is
specified or if no MATH table is available.

The preference layout.css.math-depth.enabled remains disabled in nightly
until the remaining bit (support for font-size: math) is implemented in
bug 1667090.

Differential Revision: https://phabricator.services.mozilla.com/D91604
2022-08-30 10:16:33 +00:00
Connor Pearson a6f8d9c1af Bug 1565111 Improve serialization of the outline shorthand. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D155569
2022-08-26 19:30:40 +00:00
AW255 4d7b018d55 Bug 1573830 - 0% values are not skipped when parsing CSS transform. r=emilio
Adds trait ZeroNoPercent to check for values that are 0 (such as 0px) but not 0%

Updated test css/css-transforms/animation/translate-interpolation.html and removed unnecessary formatting changes

Differential Revision: https://phabricator.services.mozilla.com/D154930
2022-08-26 11:11:30 +00:00
Emilio Cobos Álvarez 44438f746a Bug 1787173 - Improve CSS OM for CSSContainerRule. r=nchevobbe
This implements https://github.com/w3c/csswg-drafts/pull/7293, pending a
spec resolution, so landing test as tentative for now, but the change
makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D155602
2022-08-26 10:31:38 +00:00
Jonathan Kew 5bcdc7cf69 Bug 1786493 - Implement CSS @supports font-format(...) and font-tech(...) functions. r=emilio
These are gated by the same layout.css.font-tech.enabled pref as the
closely-related `tech()` function for the @font-face src descriptor;
once the spec questions are settled, we should enable them all together.

Differential Revision: https://phabricator.services.mozilla.com/D155359
2022-08-25 12:19:21 +00:00
Marian-Vasile Laza 07de1f7c1b Backed out 2 changesets (bug 1786493) for causing build bustages. CLOSED TREE
Backed out changeset 077219c44704 (bug 1786493)
Backed out changeset b1b0464f9bed (bug 1786493)
2022-08-25 14:26:59 +03:00
Jonathan Kew 4642b812a4 Bug 1786493 - Implement CSS @supports font-format(...) and font-tech(...) functions. r=emilio
These are gated by the same layout.css.font-tech.enabled pref as the
closely-related `tech()` function for the @font-face src descriptor;
once the spec questions are settled, we should enable them all together.

Differential Revision: https://phabricator.services.mozilla.com/D155359
2022-08-25 11:09:10 +00:00
Jonathan Kew 9a9e4251de Bug 1786804 - Put the @font-face src tech() function behind a pref, enabled only on Nightly for now. r=emilio
There are a couple of current issues/discussions that may lead to a change in the set of supported keywords, so we may want to hold back a little on actually shipping this.

- In https://github.com/w3c/IFT/pull/113, the WebFonts WG proposes several new incremental-* keywords (and maybe implies dropping the currently-defined incremental?)

- In https://github.com/w3c/csswg-drafts/issues/7633, I just proposed renaming the feature-* keywords to features-* (plural) for better readability; I'd like to see a decision on that before we ship this to release.

Differential Revision: https://phabricator.services.mozilla.com/D155458
2022-08-24 11:27:42 +00:00
Boris Chiou 3897893bd1 Bug 1694741 - Part 6: Map width/height attributes to the style of img elements. r=emilio
This patch will use the width/height attributes from <source> to override
width/height/aspect-ratio CSS property values of <img> elements.

So basically, we need to introduce an extra nsMappedAttribtue member in
HTMLSourceElement (and it only stores width and height attributes).
And then we use it as an extra declarations (which are generated by
Gecko_GetExtraContentStyleDeclarations()) so we can override the
declarations created from presentation attributes of <img>.

Besides, we need to make sure <img> elements get restyled in the
following cases:
1. width/height attributes is changed in <source> elements
2. <source> is inserted as a <picture>'s child
3. <source> is removed from the child list of <picture>
4. <img> is inserted as a <picture>'s child
5. <img> is removed from the child list of <picture>

We make the responsive source synchronously get updated in the previous patch,
so now we can just restyle the image when updating its responsive source.

Note: We fix the reflection of percentages for width/height attributes in
the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D152586
2022-08-22 20:18:39 +00:00
Connor Pearson 781d2bbaca Bug 1134171 - When serializing background shorthand skip initial values and order values according to grammar. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D155077
2022-08-21 22:13:04 +00:00
Emilio Cobos Álvarez 6d0f2b63a9 Bug 1682444 - Add basic support for nan / infinity in calc(). r=boris
Fix some tests to:

 * Not assume `double` precision.
 * Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295

Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.

Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.

I left those untouched for now.

Differential Revision: https://phabricator.services.mozilla.com/D154883
2022-08-18 08:54:30 +00:00
Emilio Cobos Álvarez 9cb731ca93 Bug 1774589 - Implement atan2(), and enable calc() trigonometric functions by default on nightly. r=boris
We now have test coverage, so let's do this.

The remaining failures are just about infinity/nan, which is a
completely different feature.

Differential Revision: https://phabricator.services.mozilla.com/D154831
2022-08-18 08:49:30 +00:00
Marian-Vasile Laza 77fe747849 Backed out 5 changesets (bug 1682444, bug 1774589) for causing wpt failures on acos-asin-atan-atan2-serialize.html. CLOSED TREE
Backed out changeset 1d850765046a (bug 1774589)
Backed out changeset 08ec785b9923 (bug 1682444)
Backed out changeset bf0c0ff13cc1 (bug 1682444)
Backed out changeset bcf5fcb47b4a (bug 1774589)
Backed out changeset 03b2061c924b (bug 1774589)
2022-08-18 04:28:11 +03:00
Emilio Cobos Álvarez 5e73feeb12 Bug 1682444 - Add basic support for nan / infinity in calc(). r=boris
Fix some tests to:

 * Not assume `double` precision.
 * Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295

Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.

Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.

I left those untouched for now.

Differential Revision: https://phabricator.services.mozilla.com/D154883
2022-08-17 21:12:08 +00:00
Emilio Cobos Álvarez 3372ba4c5d Bug 1774589 - Implement atan2(), and enable calc() trigonometric functions by default on nightly. r=boris
We now have test coverage, so let's do this.

The remaining failures are just about infinity/nan, which is a
completely different feature.

Differential Revision: https://phabricator.services.mozilla.com/D154831
2022-08-17 20:56:38 +00:00
Emilio Cobos Álvarez a7401488af Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 23:13:41 +00:00
Jonathan Kew 70dfa83f89 Bug 1715546 - Add support for the @font-face src descriptor's tech() function. r=emilio
WPT tests to be added in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D154399
2022-08-12 22:17:24 +00:00
Marian-Vasile Laza 7f5e2711c6 Backed out 3 changesets (bug 1784265) for causing reftest failures on flex-emulation-1.xhtml. CLOSED TREE
Backed out changeset 415da4b53bdd (bug 1784265)
Backed out changeset e27b21c54b1f (bug 1784265)
Backed out changeset fcb1a053fbe2 (bug 1784265)
2022-08-13 01:14:13 +03:00
Emilio Cobos Álvarez a2ec6564f3 Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 19:34:34 +00:00
Jonathan Kew 99b0686d3d Bug 650372 - Use the style-system format hint directly in gfx, instead of mapping to a separate internal enum. r=gfx-reviewers,aosmond,lsalzman
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)

Depends on D154237

Differential Revision: https://phabricator.services.mozilla.com/D154238
2022-08-12 11:25:59 +00:00
Jonathan Kew dfd2d5cda8 Bug 650372 - Accept keywords in addition to strings in the @font-face format() hint function. r=emilio
The CSS Fonts 4 spec requires this, and Safari (at least) has long supported it.

Depends on D154277

Differential Revision: https://phabricator.services.mozilla.com/D154237
2022-08-12 11:25:59 +00:00
Jonathan Kew c435f5c7ab Bug 1784058 - Do not allow a list of strings in the @font-face src descriptor's format() function, only a single format string. r=emilio
This aligns with CSS Fonts 4 (rather than Fonts 3) and with behavior in other browsers;
I don't expect any significant breakage, given that specifying multiple format strings
was never supported in other engines AFAIK, and never served any useful purpose.

Depends on D154234

Differential Revision: https://phabricator.services.mozilla.com/D154235
2022-08-12 11:25:58 +00:00
Emilio Cobos Álvarez ff538cab0e Bug 1784349 - Don't use -moz-bool-pref for flexbox -moz-box emulation. r=dholbert,perftest-reviewers,sparky
Use a bool pref media query which allows dynamic changes to get
reflected instantly.

Differential Revision: https://phabricator.services.mozilla.com/D154449
2022-08-11 23:22:52 +00:00
Iulian Moraru 6794af9029 Backed out 7 changesets (bug 1784058, bug 650372) for causing wpt failures on format-specifiers-variations.html. CLOSED TREE
Backed out changeset 2aa97ebc8593 (bug 650372)
Backed out changeset 41d1c62f11ac (bug 650372)
Backed out changeset 8340c08ff8b6 (bug 650372)
Backed out changeset cbe59d9bbcbb (bug 1784058)
Backed out changeset 40b00a214019 (bug 1784058)
Backed out changeset 714d84a2680a (bug 1784058)
Backed out changeset e5b24489d365 (bug 1784058)
2022-08-11 23:24:20 +03:00
Jonathan Kew 13890ac701 Bug 650372 - Use the style-system format hint directly in gfx, instead of mapping to a separate internal enum. r=gfx-reviewers,aosmond,lsalzman
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)

Depends on D154237

Differential Revision: https://phabricator.services.mozilla.com/D154238
2022-08-11 18:03:58 +00:00
Jonathan Kew 1ce43d55b7 Bug 650372 - Accept keywords in addition to strings in the @font-face format() hint function. r=emilio
The CSS Fonts 4 spec requires this, and Safari (at least) has long supported it.

Depends on D154277

Differential Revision: https://phabricator.services.mozilla.com/D154237
2022-08-11 18:03:58 +00:00
Jonathan Kew 08f7295a51 Bug 1784058 - Do not allow a list of strings in the @font-face src descriptor's format() function, only a single format string. r=emilio
This aligns with CSS Fonts 4 (rather than Fonts 3) and with behavior in other browsers;
I don't expect any significant breakage, given that specifying multiple format strings
was never supported in other engines AFAIK, and never served any useful purpose.

Depends on D154234

Differential Revision: https://phabricator.services.mozilla.com/D154235
2022-08-11 18:03:56 +00:00
Cristian Tuns f124fa4b1e Backed out 7 changesets (bug 650372, bug 1784058) for causing reftest failures on variation-format-hint-1a.html CLOSED TREE
Backed out changeset c78a59ace7ec (bug 650372)
Backed out changeset eea47293ce56 (bug 650372)
Backed out changeset e978496c7ea0 (bug 650372)
Backed out changeset 597837e9753f (bug 1784058)
Backed out changeset 6d71bcfcc1a1 (bug 1784058)
Backed out changeset 5d21f6e4f8e0 (bug 1784058)
Backed out changeset 35634f66cb37 (bug 1784058)
2022-08-11 10:28:40 -04:00
Jonathan Kew 7e6bfba42c Bug 650372 - Use the style-system format hint directly in gfx, instead of mapping to a separate internal enum. r=gfx-reviewers,aosmond,lsalzman
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)

Differential Revision: https://phabricator.services.mozilla.com/D154238
2022-08-11 13:10:04 +00:00
Jonathan Kew 40c398325d Bug 650372 - Accept keywords in addition to strings in the @font-face format() hint function. r=emilio
The CSS Fonts 4 spec requires this, and Safari (at least) has long supported it.

Differential Revision: https://phabricator.services.mozilla.com/D154237
2022-08-11 13:10:03 +00:00
Jonathan Kew 91d8e38d70 Bug 1784058 - Do not allow a list of strings in the @font-face src descriptor's format() function, only a single format string. r=emilio
This aligns with CSS Fonts 4 (rather than Fonts 3) and with behavior in other browsers;
I don't expect any significant breakage, given that specifying multiple format strings
was never supported in other engines AFAIK, and never served any useful purpose.

Differential Revision: https://phabricator.services.mozilla.com/D154235
2022-08-11 13:10:01 +00:00
Emilio Cobos Álvarez e23e2a0212 Bug 1783934 - Add a chrome-only -moz-box-layout: legacy | flex, and use that to implement flexbox emulation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D154153
2022-08-10 19:46:37 +00:00
Marian-Vasile Laza 8274331cda Backed out changeset 449fe2d946ea (bug 1783934) for causing mochitest failures on test_animation-type-longhand.html. CLOSED TREE 2022-08-10 19:48:38 +03:00
Emilio Cobos Álvarez f4206bdde5 Bug 1783934 - Add a chrome-only -moz-box-layout: legacy | flex, and use that to implement flexbox emulation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D154153
2022-08-10 15:47:41 +00:00
Emilio Cobos Álvarez 9f8d56e747 Bug 1783940 - Remove -moz-* display values enabled-in-content prefs. r=dholbert
We have unshipped these since forever, no point in keeping the pref
around. Move the relevant tests to chrome ref/mochitests.

Differential Revision: https://phabricator.services.mozilla.com/D154152
2022-08-10 15:43:51 +00:00
Sandor Molnar 2fd0743a13 Backed out changeset 28c712b01ff9 (bug 1783940) for causing mochitest plain failures in layout/generic/test/test_dynamic_reflow_root_disallowal.html 2022-08-10 02:26:47 +03:00
Emilio Cobos Álvarez 8efdb3cc26 Bug 1783940 - Remove -moz-* display values enabled-in-content prefs. r=dholbert
We have unshipped these since forever, no point in keeping the pref
around. Move the relevant tests to chrome ref/mochitests.

Differential Revision: https://phabricator.services.mozilla.com/D154152
2022-08-09 21:59:45 +00:00
Boris Chiou 82bf45d69f Bug 1746528 - Remove aspect-ratio preference. r=emilio
We shipped this in Firefox 89, one year ago. It should be okay to drop
this preference now.

Differential Revision: https://phabricator.services.mozilla.com/D153680
2022-08-04 17:58:03 +00:00
Emilio Cobos Álvarez cf26510de6 Bug 1782858 - Make color-scheme affect Windows' non-native menus. r=desktop-theme-reviewers,dao
This matches what Linux and macOS do, and that allows the fix for bug 1782623
to work on Windows for unstyled selects.

This also simplifies the CSS (though it adds a new system color which is a bit
more annoying). I filed https://github.com/w3c/csswg-drafts/issues/7561 to
propose adding a more generic way to do this in the future (not just for
Firefox).

Differential Revision: https://phabricator.services.mozilla.com/D153549
2022-08-03 20:33:09 +00:00
Emilio Cobos Álvarez 684ee21201 Bug 1780240 - Properly fail to serialize grid shorthand when not roundtripping. r=dholbert
Other browsers also don't roundtrip properly, but they fail less
severely.

Differential Revision: https://phabricator.services.mozilla.com/D152794
2022-07-26 22:43:26 +00:00
Emilio Cobos Álvarez d98aff87e0 Bug 1781140 - Remove nsTimingFunction and ComputedTimingFunction. r=dshin
They're simple wrappers of StyleComputedTimingFunction so we can remove
them.

Differential Revision: https://phabricator.services.mozilla.com/D152700
2022-07-26 14:49:02 +00:00
David Shin 6269eeec34 Bug 1780038 - `linear(...)` easing: Implement right-continuous behaviour on discontinuities. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152078
2022-07-18 19:55:08 +00:00
Emilio Cobos Álvarez 575e1efaa1 Bug 1778983 - Ensure we cancel transitions without the need of an extra flush. r=boris
When something switches to display: none, right now we rely on
StopAnimationsForElementsWithoutFrames(), which posts a restyle and the
previous ProcessPendingRestyles call was papering over it.

For other elements in the display none subtree it doesn't matter,
because we don't keep their styles around, but for the display: none
element themselves we do need to update transitions on time.

We could, possibly more generally, remove
StopAnimationsForElementsWithoutFrames() altogether and cancel
animations when we clear style data, perhaps... But that's probably
worth a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D151600
2022-07-14 12:45:14 +00:00
Emilio Cobos Álvarez 7c3737dc89 Bug 1777982 - Propagate flags from original property to aliases. r=AlaskanEmily
Even we don't have internal aliases right now (and that seems a bit
silly) we do have pref-gated aliases. An alias ID passed to IsEnabled
with the wrong EnabledState would misbehave, assert, and crash.

Though we don't have such callers in the tree because InspectorUtils
passes only arguments that make us not look at the flags, it seems more
reliable this way.

Differential Revision: https://phabricator.services.mozilla.com/D151594
2022-07-12 22:22:17 +00:00
Boris Chiou ccc7ef067d Bug 1293490 - Part 3: Support animation-composition in keyframe at rules. r=emilio
So we can specify the keyframe-specific composite operation. However,
these is a spec issue about the default composite for CSS Animations:
https://github.com/w3c/csswg-drafts/issues/7476.

I choose to use auto as the default composite for missing keyframes to match
the definition in web-animations-1 because I think this makes more sense:
> If the keyframe-specific composite operation for a keyframe is not set, the
> composite operation specified for the keyframe effect as a whole is used for
> values specified in that keyframe.

Differential Revision: https://phabricator.services.mozilla.com/D150808
2022-07-12 19:02:04 +00:00
Boris Chiou 41a30d913e Bug 1293490 - Part 1: Implement CSS animation-composition longhand in style system. r=emilio
This patch introduces animation-composition longhand but we don't
accept it in @keyframe rule for now. I will support this for @keyframe
in the patch series.

Besides, the shorthand of animation doesn't include animation-composition.
The spec issue is: https://github.com/w3c/csswg-drafts/issues/6946.
We could fix the shorthand once this spec issue gets updated.

Differential Revision: https://phabricator.services.mozilla.com/D150299
2022-07-12 19:02:03 +00:00
Emilio Cobos Álvarez 8e30aa6f90 Bug 1779078 - Clean up a bit traversal culling. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D151544
2022-07-12 09:38:47 +00:00