Commit Graph

10211 Commits

Author SHA1 Message Date
Boris Chiou
4583d70c27 Bug 1789447 - Part 2: Drop @scroll-timeline rule entirely. r=emilio,hiro
This rule is not used in tests and should be removed per spec.

Differential Revision: https://phabricator.services.mozilla.com/D157249
2022-09-22 03:47:11 +00:00
Boris Chiou
efa21074db Bug 1789447 - Part 1: Drop the usage of @scroll-timeline from animation builder. r=hiro
@scroll-timeline rule was removed from the spec and wpt, so it's safe to
remove this from Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D157248
2022-09-22 03:47:11 +00:00
Emilio Cobos Álvarez
2bc0294d20 Bug 1791281 - Simplify our setup for font metric queries from style. r=jfkthame
While looking at moving the flag around I realized that the only reason
we have FontMetricsProvider and co is because we didn't have access to
the per-document font-prefs cache. That's trivial to fix tho, so do
that and simplify the setup for font queries even more.

Differential Revision: https://phabricator.services.mozilla.com/D157589
2022-09-20 19:30:45 +00:00
Emilio Cobos Álvarez
d92f89dc43 Bug 1791455 - Honor currentColor in HCM. r=morgan
I think it's fair to honor it, just like we honor system color keywords.

By definition if we're forcing colors currentColor can only be forced or
a system color.

Differential Revision: https://phabricator.services.mozilla.com/D157675
2022-09-20 17:52:34 +00:00
Ziran Sun
6d6193cadd Bug 1777733 - Rename initial value of `container-type' from 'none' to 'normal'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157098
2022-09-15 13:37:16 +00:00
criss
8bedc22cb1 Backed out 2 changesets (bug 1667090, bug 1788605) for causing Xpcshell failures on test_css-properties-db.js. CLOSED TREE
Backed out changeset cee98ae67ea4 (bug 1788605)
Backed out changeset 404e0b4bcd0f (bug 1667090)
2022-09-15 12:13:28 +03:00
Frederic Wang
b48c61455f Bug 1667090 - Implement CSS font-size: math and math-depth properties. r=emilio
The font-size math keyword is implemented. It behaves as a font-size: 1em
with the extra fixup due to math-level change (and other legacy MathML
attributes). After that change, the CSS for math-level / font-size: math
is behaving as per the specification, so the math-depth is turned in
nightly.

The adjusting function for font-size: math is modified so that it's
executed only if both font-size: math (otherwise the spec says no scale
should apply) and math-depth (otherwise the scale is 1 and function exists
early anyway) are set on the element. Also checking if the current node
has a scriptsizemultiplier rule applied to use MathML3's scaling is
incorrect. Instead this is changed to check if a non-default
scriptsizemultiplier is set.

Differential Revision: https://phabricator.services.mozilla.com/D91744
2022-09-15 08:14:49 +00:00
Ziran Sun
077ef58b84 Bug 1789799 - Disallow 'not', 'and', and 'or' from <container-name>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D156805
2022-09-14 11:48:01 +00:00
Narcis Beleuzu
bdc2841939 Backed out changeset f3406027a192 (bug 1777733) for mochitest failures. CLOSED TREE 2022-09-14 12:36:14 +03:00
Ziran Sun
5bcb2e887f Bug 1777733 - Rename initial value of `container-type' from 'none' to 'normal'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157098
2022-09-14 08:33:35 +00:00
Emilio Cobos Álvarez
bdb52e059d Bug 1790495 - React to font-size changes on query containers. r=dshin
Much like we react to font-size changes on the root.

Differential Revision: https://phabricator.services.mozilla.com/D157173
2022-09-13 17:08:46 +00:00
Emilio Cobos Álvarez
f5420e884e Bug 1789191 - Add CSSContainerRule.queryContainerFor(Element). r=nchevobbe,dshin
This actually caught a bug in the existing selection logic.

Differential Revision: https://phabricator.services.mozilla.com/D156414
2022-09-10 12:25:22 +00:00
Sandor Molnar
209e69728d Backed out changeset 0552fd39333b (bug 1789191) for causing mochitest failures in layout/style/test/test_revert.html CLOSED TREE 2022-09-10 07:11:24 +03:00
Emilio Cobos Álvarez
a6955c6735 Bug 1789191 - Add CSSContainerRule.queryContainerFor(Element). r=nchevobbe,dshin
This actually caught a bug in the existing selection logic.

Differential Revision: https://phabricator.services.mozilla.com/D156414
2022-09-10 02:37:44 +00:00
Sandor Molnar
7213ef3c80 Backed out changeset 56c223bba6d6 (bug 1789191) for causing mochitest failures in layout/style/test/test_transitions_per_property.html CLOSED TREE 2022-09-09 23:42:13 +03:00
Emilio Cobos Álvarez
a9ffddedde Bug 1789191 - Add CSSContainerRule.queryContainerFor(Element). r=nchevobbe,dshin
This actually caught a bug in the existing selection logic.

Differential Revision: https://phabricator.services.mozilla.com/D156414
2022-09-09 19:34:55 +00:00
Emilio Cobos Álvarez
8389eba443 Bug 1789712 - Allow backplating if there's a background-image which is none. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D156756
2022-09-08 11:57:15 +00:00
Emilio Cobos Álvarez
f6ef818f6b Bug 1789123 - Make anonymous box wrapping inside XUL boxes be similar to modern flex boxes. r=dholbert
I haven't spotted any UI regression from this, and this should generally
make the XUL -> modern flex transition easier, and simplify some
of the relevant code.

This does fix a few layout issues with emulated flexbox.

For the most part, this shouldn't change behavior without that. This
changes behavior if you have mixed inline/non-inline content in the same
XUL box (before they'd get a single item, now you'd get the flexbox /
grid behavior of one item per inline run), and multiple inline-elements
(which would become their own flex items). But I pushed a patch with
some asserts and they didn't fire on our browser mochitests, so I think
we're good.

The UA rule refactoring (removing the inherit from xul anon blocks)
shouldn't matter in practice, since we only have one item (so
box-ordinal is irrelevant) and they have overflow: visible (so
text-overflow and overflow-clip-box shouldn't have an effect).

Differential Revision: https://phabricator.services.mozilla.com/D156375
2022-09-08 11:51:15 +00:00
Emilio Cobos Álvarez
d9361c3825 Bug 1786147 - Remove layout.css.webkit-line-clamp.enabled, and add a new pref to apply line-clamp to all BFCs. r=dholbert
It's always true, so remove it.

Add another pref to allow -webkit-line-clamp to work on all blocks
rather than just legacy -webkit-boxes, which seems something we should
try to look into, eventually.

Depends on D155181

Differential Revision: https://phabricator.services.mozilla.com/D155182
2022-09-07 23:57:18 +00:00
Emilio Cobos Álvarez
777e2aa014 Bug 1786147 - Make -webkit-line-clamp create a block container in the appropriate situations. r=dholbert
This is a hack, sorta, similar to Chromium's:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_object.cc;l=356;drc=312b74e385e6aba98ab31fd911238c0dc16b396c

except at computed-value rather than used-value time, because it's both
simpler to reason about and prevents lying in the computed style.

This fixes the relevant test-case, and matches closer what Chromium does,
by not creating anonymous flex items for all elements inside the
line-clamp context.

The behavior change is covered by the test changes. I had to also fix a
couple pre-existing bugs that were caught by tests, now that the
line-clamped block is the -webkit-box-styled element rather than an anonymous
flex item (and thus now had padding).

Depends on D155180

Differential Revision: https://phabricator.services.mozilla.com/D155181
2022-09-07 23:57:18 +00:00
Emilio Cobos Álvarez
6d01c09261 Bug 1789248 - Remove @supports selector pref. r=firefox-style-system-reviewers,layout-reviewers,boris
We've shipped it for a while.

Differential Revision: https://phabricator.services.mozilla.com/D156469
2022-09-06 17:03:20 +00:00
Emilio Cobos Álvarez
833cd2c374 Bug 1789248 - Disallow forgiving selector-parsing in @supports. r=firefox-style-system-reviewers,layout-reviewers,boris
As per spec, see https://github.com/w3c/csswg-drafts/issues/7280

Differential Revision: https://phabricator.services.mozilla.com/D156468
2022-09-06 17:00:33 +00:00
Frederic Wang
0d6dd90e26 Bug 1588733 - Make maction/semantics elements behave as an mrow with the first child. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/BWUvjERSXUM

Differential Revision: https://phabricator.services.mozilla.com/D49285
2022-09-06 04:32:15 +00:00
Frederic Wang
5971327802 Bug 1788645: Do not reset font-weight/font-style when mathvariant is specified. r=emilio
In the past, mathvariant was cancelling the effect of legacy
fontstyle/fontweight attributes by resetting the font-style/font-weight
properties. These legacy attributes have been removed in bug 1783841,
so remove this hack from Stylo and add corresponding WPT test.

Differential Revision: https://phabricator.services.mozilla.com/D156174
2022-09-03 07:09:44 +00:00
Emilio Cobos Álvarez
3fe82b7873 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
2b7e437550 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
90070eb1ea 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
b67019f66c 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
d107252b35 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
fd0dfc615f 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
669787c79c 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
442844a6b8 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
3def482eee 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
76715dc986 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
8d72beeace 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
Connor Pearson
536d44bfee 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
926b234011 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
3f996b1250 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
f766d52455 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
60e0b9b8f8 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
667819e0ae 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
Jonathan Kew
e38622a12c 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
Jonathan Kew
47d4aa9c51 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
08356cafca 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
c71cb025a1 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
3fc8bff3ff 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
b2a2b27770 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
4a84154178 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
3dd02d51f6 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
37f1fe9925 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