14298 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
31c279d479 Bug 1799460 - Implement label[value] and start/end cropping with CSS rather than XUL layout. r=Gijs,jfkthame
This reduces the weird interactions that can appear on menus.

This also progresses BiDi support, including for accesskeys.

Differential Revision: https://phabricator.services.mozilla.com/D161498
2022-11-16 16:27:59 +00:00
Ziran Sun
66ffe05661 Bug 1800045 - container-queries: Stop restrict none/auto/normal from <custom-ident>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161764
2022-11-14 15:36:47 +00:00
Ben Freist
e3194e24e2 Bug 1800396 - [refactor] Migrate NS_STYLE_TEXT_COMBINE_UPRIGHT_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161965
2022-11-14 08:43:36 +00:00
Connor Pearson
57fc8a2f26 Bug 1764850 - Remove unused std::ops::Rem implementations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161844
2022-11-10 21:35:00 +00:00
Emilio Cobos Álvarez
f58e73e709 Bug 1799580 - Remove display: -moz-popup. r=TYLin
We already rely on it applying only to XULPopupElement's. Make it
explicit and remove the CSS value.

Differential Revision: https://phabricator.services.mozilla.com/D161552
2022-11-09 20:38:04 +00:00
Emily McDonough
d9855beed3 Bug 1798816 - Check that we do not insert more than MAX_GRID_LINE subgrid line name lists while constructing the list r=emilio
This helps avoid OOM with very large repeats.

Differential Revision: https://phabricator.services.mozilla.com/D161533
2022-11-09 20:09:59 +00:00
Emilio Cobos Álvarez
7cc7492f55 Bug 1799901 - Make panel animations a LookAndFeel int. r=dao,Gijs
This will allow us to enable panel animations in some Linux
configurations but not others. Also, it's cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D161693
2022-11-09 19:31:08 +00:00
Csoregi Natalia
9d2ea21e26 Backed out 3 changesets (bug 1799343, bug 1799580) for causing failures on /browser_history_after_appMenu.js. CLOSED TREE
Backed out changeset 63c270ba91ad (bug 1799343)
Backed out changeset 713e6f0fbd20 (bug 1799580)
Backed out changeset 42d1b8742662 (bug 1799343)
2022-11-09 21:26:06 +02:00
Emilio Cobos Álvarez
58a308d108 Bug 1799580 - Remove display: -moz-popup. r=TYLin
We already rely on it applying only to XULPopupElement's. Make it
explicit and remove the CSS value.

Differential Revision: https://phabricator.services.mozilla.com/D161552
2022-11-09 14:19:22 +00:00
Cristian Tuns
01dcbc81d3 Backed out 2 changesets (bug 1799580, bug 1799343) for causing mochitest failures on win7 CLOSED TREE
Backed out changeset fb0df93a4719 (bug 1799580)
Backed out changeset 493c9ca00c91 (bug 1799343)
2022-11-09 07:15:51 -05:00
Emilio Cobos Álvarez
636d705f3b Bug 1799580 - Remove display: -moz-popup. r=TYLin
We already rely on it applying only to XULPopupElement's. Make it
explicit and remove the CSS value.

Differential Revision: https://phabricator.services.mozilla.com/D161552
2022-11-09 09:17:22 +00:00
Connor Pearson
0f359a70e2 Bug 1764850 Implement CSS round() function. r=emilio
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>

Differential Revision: https://phabricator.services.mozilla.com/D156742
2022-11-05 21:25:16 +00:00
Csoregi Natalia
4f7b803fd6 Backed out changeset c7e10bd5cd69 (bug 1764850) for causing bustage on nsStyleStruct.cpp. CLOSED TREE 2022-11-05 00:01:38 +02:00
Connor Pearson
c3971e400d Bug 1764850 Implement CSS round() function. r=emilio
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>

Differential Revision: https://phabricator.services.mozilla.com/D156742
2022-11-04 20:00:06 +00:00
Jonathan Kew
2a0c6e3416 Bug 1796983 - patch 2 - Fix serialization of the font-variant shorthand when font-variant-emoji is preffed off. r=emilio
Depends on D160256

Differential Revision: https://phabricator.services.mozilla.com/D160257
2022-11-04 17:41:40 +00:00
Emilio Cobos Álvarez
cfe3a0e68a Bug 1798932 - Don't bother preserving authored colors for canvas. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D161266
2022-11-04 14:03:19 +00:00
Emilio Cobos Álvarez
54807dbdad Bug 1798898 - Fix container query evaluation on unsupported axis. r=dshin
We were falling back to viewport size, which is not what the spec says.

Differential Revision: https://phabricator.services.mozilla.com/D161132
2022-11-03 14:07:02 +00:00
Emily McDonough
7f3a7a1925 Bug 1798581 - Add optional page name argument to Servo_ComputedValues_GetForAnonymousBox and ServoStyleSet::ResolveNonInheritingAnonymousBoxStyle r=emilio
This needs to bypass the cache on ServoStyleSet when looking up styles with
named pages. We could possibly cache the last used named page style, which
would avoid extra style calculations for multiple sequential pages with the
same page name, but for now the cache is just ignored.

Differential Revision: https://phabricator.services.mozilla.com/D160976
2022-11-02 23:24:41 +00:00
Sandor Molnar
07b5a37242 Backed out changeset a0bebf5f154c (bug 1798581) for causing build bustages. CLOSED TREE 2022-11-03 00:56:11 +02:00
Emily McDonough
f697f06790 Bug 1798581 - Add optional page name argument to Servo_ComputedValues_GetForAnonymousBox and ServoStyleSet::ResolveNonInheritingAnonymousBoxStyle r=emilio
This needs to bypass the cache on ServoStyleSet when looking up styles with
named pages. We could possibly cache the last used named page style, which
would avoid extra style calculations for multiple sequential pages with the
same page name, but for now the cache is just ignored.

Differential Revision: https://phabricator.services.mozilla.com/D160976
2022-11-02 22:30:19 +00:00
Ziran Sun
2c8e232176 Bug 1790059 - Only a single name allowed in @container rule. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158775
2022-11-02 14:15:35 +00:00
Jonathan Watt
0f1f88eea5 Bug 1798312 - Rename page::PageOrientation to page::PageSizeOrientation. r=AlaskanEmily
The @page rule may contain both 'page-orientation' and 'size' properties. The
'size' property can contain an orientation component which was being
represented as 'PageOrientation' prior to this patch. This patch changes that
to 'PageSizeOrientation' so that 'PageOrientation' can be used for
'page-orientation' in a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D160790
2022-10-31 22:52:16 +00:00
Andrew Osmond
c356c45582 Bug 1793379. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159654
2022-10-30 23:48:26 +00:00
Emilio Cobos Álvarez
dcedd55035 Bug 1794040 - Simplify container-type implementation. r=dshin
It was made a bitfield so that we could include style. But then style
containment was removed and the bitfield keeps causing us to do wrong
check (since INLINE_SIZE intersects SIZE).

So just make it an enum. This causes a progression and a test that
failed now times out (which is a pre-existing issue, just like the
pseudo-elements test that times out).

Differential Revision: https://phabricator.services.mozilla.com/D160371
2022-10-27 10:48:58 +00:00
Marian-Vasile Laza
52127c7dd1 Backed out changeset bee94ed5a33d (bug 1794040) for causing wpt failures on container-type-containment.html. 2022-10-26 22:31:01 +03:00
Emilio Cobos Álvarez
3a328a3ef8 Bug 1794040 - Simplify container-type implementation. r=dshin
It was made a bitfield so that we could include style. But then style
containment was removed and the bitfield keeps causing us to do wrong
check (since INLINE_SIZE intersects SIZE).

So just make it an enum. This causes a progression and a test that
failed now times out (which is a pre-existing issue, just like the
pseudo-elements test that times out).

Differential Revision: https://phabricator.services.mozilla.com/D160371
2022-10-26 16:56:07 +00:00
Emilio Cobos Álvarez
d9378b9fc5 Bug 1797146 - Remove system font support for various font longhands. r=jfkthame
We don't use them[1], and these are generally not properties that
authors would be able to set via the font shorthand anyways.

Let's simplify the code. This fixes the font-variant bug and also
unblocks further clean-ups of these properties in the future.

[1]: https://searchfox.org/mozilla-central/rev/59f0bf3c13dd455d9f5415b89178de701ea6b850/widget/LookAndFeelTypes.ipdlh#12-18

Differential Revision: https://phabricator.services.mozilla.com/D160352
2022-10-26 14:42:49 +00:00
Emilio Cobos Álvarez
3f55839fe0 Bug 1797407 - Don't propagate bits for children invalidated under display:none/not in the flat tree. r=boris,firefox-style-system-reviewers
Much like invalidated_descendants. This preserves our invariant that we
only visit elements with data in the post-traversal.

Differential Revision: https://phabricator.services.mozilla.com/D160338
2022-10-26 14:37:34 +00:00
sskcvqikf
c53abb7b6e Bug 1797012 - Change NS_STYLE_MATH_STYLE_* macros to enum StyleMathStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160016
2022-10-24 17:47:34 +00:00
Marian-Vasile Laza
e80c0a7ce7 Backed out changeset f39d284f4db7 (bug 1797012) for causing wpt failures on frac-1.html. CLOSED TREE 2022-10-24 15:46:12 +03:00
sskcvqikf
15eb00a7bf Bug 1797012 - Change NS_STYLE_MATH_STYLE_* macros to enum StyleMathStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160016
2022-10-24 09:29:05 +00:00
Jonathan Kew
89c8d6a003 Bug 1461589 - Add support for the CSS font-variant-emoji property to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147494
2022-10-22 09:43:48 +00:00
David Shin
cbe1692752 Bug 1796593 - Container Relative Units: Set flag for USES_VIEWPORT_UNITS only when viewport fallback is actually used. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159866
2022-10-20 18:37:39 +00:00
Emilio Cobos Álvarez
f503f8eca3 Bug 1790652 - Invalidate viewport units on container-queries properly. r=dshin
By re-selector-matching the element (thus re-evaluating the container
query condition).

Depends on D159852

Differential Revision: https://phabricator.services.mozilla.com/D159853
2022-10-20 14:30:25 +00:00
Emilio Cobos Álvarez
4c7dc0668f Bug 1790652 - Allow propagating computed style bits from the selector-matching process. r=dshin
This allows us to propagate flags from the container query styles all the
way to the computed style of the element.

The flag for viewport units in container queries has to be different
because it requires rematching, see comments.

Depends on D159851

Differential Revision: https://phabricator.services.mozilla.com/D159852
2022-10-20 14:24:36 +00:00
Emilio Cobos Álvarez
9f9bdc7ccb Bug 1790652 - Split in_media_query and in_container_query bits from computed::Context. r=dshin
No behavior change, but it makes more sense this way :)

Differential Revision: https://phabricator.services.mozilla.com/D159851
2022-10-20 14:24:36 +00:00
Emilio Cobos Álvarez
32728dff0f Bug 1790652 - Make a wrapper struct for extra matching data. r=dshin
No behavior change but we're about to add some extra field to it.

Differential Revision: https://phabricator.services.mozilla.com/D159850
2022-10-20 14:24:35 +00:00
Ziran Sun
a4248fe12c Bug 1790055 - @container rules should support not without parentheses. r=emilio
We are currently detect 'not' as part of the container-name.

Differential Revision: https://phabricator.services.mozilla.com/D159836
2022-10-20 13:54:33 +00:00
Emilio Cobos Álvarez
5dcfa83235 Bug 1794720 - fix invalidation of sibling combinators in different slots. r=firefox-style-system-reviewers,layout-reviewers,boris
This extends the code to deal with sibling invalidation to handle the
case where the flat tree doesn't match the DOM tree. In the test-case
for example, dom is:

 * details
   * summary id=a
   * summary

But flat tree is:

 * details
  * slot
    * summary id=a
  * slot
    * summary

Differential Revision: https://phabricator.services.mozilla.com/D159150
2022-10-20 08:39:18 +00:00
David Shin
ceb39a5e21 Bug 1744231: Part 5 - Rematch all descendants when container-type changes. r=emilio
Extend WPT to ensure invalidation of descendants deeper than one.

Differential Revision: https://phabricator.services.mozilla.com/D158058
2022-10-17 17:26:14 +00:00
David Shin
5ee4d158da Bug 1744231: Part 4 - Enable lookup and computation of container size queries. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158057
2022-10-17 17:26:13 +00:00
David Shin
3e04e32ba0 Bug 1744231: Part 3 - Flag computed styles of elements with container-type: *size set & propagate them to their descendants. r=emilio
Low-hanging fruit optimization that enables short-circuit exit of container query lookups.

Differential Revision: https://phabricator.services.mozilla.com/D158056
2022-10-17 17:26:13 +00:00
David Shin
da4bd1885a Bug 1744231: Part 2 - Centralize construction of computed::Context. r=emilio
For controlled construction and access of upcoming, lazily-evaluated container query size.

Differential Revision: https://phabricator.services.mozilla.com/D158055
2022-10-17 17:26:12 +00:00
David Shin
9205afc4f7 Bug 1744231: Part 1 - Implement parsing of container relative lengths. r=emilio
- For now, implementation always returns the fallback value, i.e. small viewport lengths.
- Enabled via existing pref `layout.css.container-queries.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D158054
2022-10-17 17:26:12 +00:00
Anurag Kalia
a98122da5e Bug 1792608 - Make vertical writing mode (left/right) in text-emphasis-position optional r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158399
2022-10-17 09:28:44 +00:00
Iulian Moraru
a3a61d1d43 Backed out changeset c5ede12b748e (bug 1790059) for causing multiple failures container related. CLOSED TREE 2022-10-13 18:52:25 +03:00
Ziran Sun
81361c6b99 Bug 1790059 - Only a single name allowed in @container rule. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158775
2022-10-13 13:56:24 +00:00
Frederic Wang
4766c8a994 Bug 1793387 - disable lquote/rquote attributes on the <ms> element. r=emilio
This commit introduces a MathML preference for the legacy implementation
of the lquote/rquote attributes, and disable it by default. This feature
is not implemented in Chromium or WebKit, not part of MathML Core and
Firefox's implementation has issues (e.g. bugs 787215 and 1108608).

Differential Revision: https://phabricator.services.mozilla.com/D158479
2022-10-08 11:37:32 +00:00
Jonathan Kew
b593702fb8 Bug 1791782 - Connect CSS font-palette features to rendering via the presContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157959
2022-10-07 23:00:46 +00:00
Jonathan Kew
d69f7c1c95 Bug 1791778 - CSS support for the font-palette property. r=emilio
This is just the CSS parsing, not yet connected to the rendering back-end.

Differential Revision: https://phabricator.services.mozilla.com/D157957
2022-10-07 23:00:44 +00:00