Commit Graph

10263 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
ffc79bc856 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
4d4e91c825 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
Ziran Sun
d6a2049da7 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
26fe398c62 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
Emilio Cobos Álvarez
a5161d1d9a 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
5c6c39850a 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
9c90d9eda8 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
cdc1679ad0 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
f2318b7e5d 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
9a203ce2a6 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
b44b3fb628 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
97899b4a8d 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
5c0ba3e4f8 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
d0337701bd 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
58ebe83bbb 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
fae75bada0 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
ba6d75d582 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
1530d75aee 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
156e9c3eba 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
f53d909a8c 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
0a3b90acdc 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
4c8905f472 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
f4da38ebff 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
e6136e9a0e 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
e0b0f70d44 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
3116fe7913 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
9c1b9b6f33 Backed out changeset c5ede12b748e (bug 1790059) for causing multiple failures container related. CLOSED TREE 2022-10-13 18:52:25 +03:00
Ziran Sun
eacb79b6ea 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
0937ed5fc0 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
ee7fe6a9b9 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
6c8aa5c7ca 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
Jonathan Kew
d7c7be9b43 Bug 1791777 - patch 1 - Implement CSS parsing for the @font-palette-values rule. r=emilio
Not yet hooked up to any rendering functionality.

The intention is for both the @font-palette-values at-rule and the font-palette property
to be behind the same pref being introduced here.

Differential Revision: https://phabricator.services.mozilla.com/D157953
2022-10-07 23:00:43 +00:00
Noemi Erli
5bff78ad47 Backed out 9 changesets (bug 1791778, bug 1791782, bug 1791780, bug 1791777) for causing build bustages in TestCOLRv1.cpp CLOSED TREE
Backed out changeset aeb44b79bf31 (bug 1791782)
Backed out changeset 292fd3a1b6dd (bug 1791782)
Backed out changeset 9947218170d0 (bug 1791780)
Backed out changeset 528b4c022a44 (bug 1791778)
Backed out changeset c734ff661a66 (bug 1791778)
Backed out changeset 6585dd386ee3 (bug 1791777)
Backed out changeset af4243189ef1 (bug 1791777)
Backed out changeset a47ae5f76514 (bug 1791777)
Backed out changeset 24ce615e77fd (bug 1791777)
2022-10-08 00:08:57 +03:00
Jonathan Kew
68ba474c47 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 18:58:53 +00:00
Jonathan Kew
c4f1dbdd1e 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 18:58:52 +00:00
Jonathan Kew
168db94ae2 Bug 1791777 - patch 1 - Implement CSS parsing for the @font-palette-values rule. r=emilio
Not yet hooked up to any rendering functionality.

The intention is for both the @font-palette-values at-rule and the font-palette property
to be behind the same pref being introduced here.

Differential Revision: https://phabricator.services.mozilla.com/D157953
2022-10-07 18:58:50 +00:00
Cristian Tuns
7e076fb429 Backed out 9 changesets (bug 1791777, bug 1791780, bug 1791778, bug 1791782) for causing build bustages on TestCOLRv1.cpp CLOSED TREE
Backed out changeset f145a34cfbc1 (bug 1791782)
Backed out changeset 2f12216fbeda (bug 1791782)
Backed out changeset 61bd2a4496bf (bug 1791780)
Backed out changeset 4e4eb99a7fd9 (bug 1791778)
Backed out changeset 32d171a28810 (bug 1791778)
Backed out changeset e317795cd27a (bug 1791777)
Backed out changeset 5e32d5a01917 (bug 1791777)
Backed out changeset cf87497dbead (bug 1791777)
Backed out changeset 586c735b005e (bug 1791777)
2022-10-07 13:46:43 -04:00
Jonathan Kew
e532c384de 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 16:53:36 +00:00
Jonathan Kew
7e5352013d 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 16:53:34 +00:00
Jonathan Kew
168ae32f94 Bug 1791777 - patch 1 - Implement CSS parsing for the @font-palette-values rule. r=emilio
Not yet hooked up to any rendering functionality.

The intention is for both the @font-palette-values at-rule and the font-palette property
to be behind the same pref being introduced here.

Differential Revision: https://phabricator.services.mozilla.com/D157953
2022-10-07 16:53:33 +00:00
Norisz Fay
c89c407e10 Backed out 9 changesets (bug 1791780, bug 1791782, bug 1791778, bug 1791777) for causing multiple mochitest failures CLOSED TREE
Backed out changeset 6de1ade5a9b6 (bug 1791782)
Backed out changeset ce96452a38a1 (bug 1791782)
Backed out changeset 7cc8e027f5a7 (bug 1791780)
Backed out changeset 8e023280032c (bug 1791778)
Backed out changeset 26d65d76d02a (bug 1791778)
Backed out changeset a98dd552df64 (bug 1791777)
Backed out changeset 766386309ee5 (bug 1791777)
Backed out changeset 7de66a218ba4 (bug 1791777)
Backed out changeset 1d17c257444e (bug 1791777)
2022-10-07 17:36:38 +03:00
Jonathan Kew
77713230cf 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 12:16:53 +00:00
Jonathan Kew
4d2afdb7c3 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 12:16:52 +00:00
Jonathan Kew
f428a1f30c Bug 1791777 - patch 1 - Implement CSS parsing for the @font-palette-values rule. r=emilio
Not yet hooked up to any rendering functionality.

The intention is for both the @font-palette-values at-rule and the font-palette property
to be behind the same pref being introduced here.

Differential Revision: https://phabricator.services.mozilla.com/D157953
2022-10-07 12:16:51 +00:00
Ting-Yu Lin
78c77ab5fa Bug 1792134 Part 6 - More rename and clean up related to StyleClear. r=emilio
* Rename `mBreakType` to `mFloatClearType` in nsLineBox and nsReflowStatus and
  the methods around it.
* Rename `mBreakType` to `mClear` in nsStyleDisplay.
* Many other method parameters or local variables rename such as from
  `aBreakType` to `aClearType`.

Differential Revision: https://phabricator.services.mozilla.com/D158276
2022-09-29 03:40:56 +00:00
Ting-Yu Lin
4eabe31e73 Bug 1792134 Part 4 - Move clear property out of gecko.mako.rs. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158225
2022-09-29 03:40:56 +00:00
Ting-Yu Lin
3ce44b3c06 Bug 1792134 Part 3 - Remove StyleClear::Line. r=emilio
Before this patch, StyleClear::Line indicates that the nsLineBox has break-after
but no float clearance (note we don't allow line break-before with clear:none);
StyleClear::None indicates the line has no break-before nor break-after.

In this patch, I added `mHasForcedLineBreak` bit in nsLineBox to indicate the
line has a break so that StyleClear can serve its original meaning -- the float
clearance. In Part 6, I'll rename more existing methods and variables related to
float clearance.

Now, instead of using StyleClear::None to clear the line break status, the
caller should use ClearForcedLineBreak(); Similar to set
SetInlineLineBreakBeforeAndReset() and SetInlineLineBreakAfter on
nsReflowStatus, SetBreakTypeBefore/SetBreakTypeAfter on nsLineBox always sets
break status with an optional float clearance parameter.

This patch shouldn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D158224
2022-09-29 03:40:55 +00:00
Ting-Yu Lin
a6d1bf0cc4 Bug 1792615 - Run "cargo +nightly fmt" for style components in servo. r=emilio
The directories changed:
* servo/components/selectors/
* servo/components/style/
* servo/components/style_derive/
* servo/ports/geckolib/

Per review request, disable rustfmt in `components_to_transform_3d_matrix()` to
preserve the format for a call to `Transform3D::new`.

My mozilla-central is at
https://hg.mozilla.org/mozilla-central/rev/d1ae84015c22f2034435b47194fdced878072035

My nightly rust is 1.66.0-nightly (8b705839c 2022-09-26).

Differential Revision: https://phabricator.services.mozilla.com/D158234
2022-09-28 07:10:52 +00:00
Anurag Kalia
2f40e58419 Bug 1784022 - [refactor] Convert text-emphasis-position #defines to enum classes r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D155557
2022-09-27 07:38:08 +00:00
Emilio Cobos Álvarez
4ab80589c9 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-27 04:18:16 +00:00