David Shin
017ab0cb24
style: linear()
easing function should not consider less than 2 linear stop arguments valid
...
Latest spec no longer handles `linear() == linear` and `linear(<single value>) == <single value>`.
Differential Revision: https://phabricator.services.mozilla.com/D169955
2023-11-06 09:35:57 +01:00
Fred Chasen
9d41dd1ad9
style: Add forced-color-adjust property
...
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.
Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-11-06 09:35:57 +01:00
Tiaan Louw
e963abe2e9
style: Part 1 - Move color mixing code to color module
...
No functional changes, just moving the code to the shared library in
preperation for replacing it with the new AbsoluteColor.
Differential Revision: https://phabricator.services.mozilla.com/D169928
2023-11-06 09:35:57 +01:00
Tiaan Louw
a9998e899b
style: Move AbsoluteColor to common color module
...
Differential Revision: https://phabricator.services.mozilla.com/D169607
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
dc295dad31
style: Implement ipdl reads without needing default ctors
...
Differential Revision: https://phabricator.services.mozilla.com/D149743
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
a55ae0ee90
style: Hint directionality of label content for crop="start" labels
...
Differential Revision: https://phabricator.services.mozilla.com/D168788
2023-11-06 09:35:57 +01:00
Nicolas Chevobbe
647434532d
style: [devtools] Add color
to DevTools autocomplete
...
Differential Revision: https://phabricator.services.mozilla.com/D168520
2023-11-06 09:35:57 +01:00
Jonathan Kew
816a0f960b
style: Fixes for font-language-override parsing and tests
...
Differential Revision: https://phabricator.services.mozilla.com/D168555
2023-11-06 09:35:57 +01:00
Jonathan Kew
2d441672be
style: Ensure font-variant-alternates values are serialized in canonical order
...
Differential Revision: https://phabricator.services.mozilla.com/D168281
2023-11-06 09:35:57 +01:00
Jonathan Kew
8a2cfc0b24
style: Use write_char in place of write_str when serializing single-character literals
...
Generated by running
find servo/components/style -name "*.rs" -exec perl -p -i -e "s/write_str\(\"(.)\"\)/write_char('\1')/g" {} \;
(and then added `use std::fmt::Write;` in a couple of places to fix build errors that arose).
Differential Revision: https://phabricator.services.mozilla.com/D168217
2023-11-06 09:35:57 +01:00
Jonathan Kew
05fb1b62b7
style: Implement the font-synthesis-{weight,style,small-caps} longhand properties, and make font-synthesis into a shorthand
...
Differential Revision: https://phabricator.services.mozilla.com/D167480
2023-11-06 09:35:57 +01:00
Tiaan Louw
922914aa38
style: Implement color() function from CSS specification
...
Colors can now be defined in different color spaces with the color()
function.
https://w3c.github.io/csswg-drafts/css-color-4/#predefined
Differential Revision: https://phabricator.services.mozilla.com/D164866
2023-11-06 09:35:57 +01:00
Oriol Brufau
47a54ced2b
Further changes required by Servo
2023-11-06 09:35:57 +01:00
Nicolas Chevobbe
d9a9ae4d7b
style: Add lab
, lch
, oklab
and oklch
to DevTools autocomplete
...
Differential Revision: https://phabricator.services.mozilla.com/D167803
2023-11-06 09:35:57 +01:00
Boris Chiou
1bb98a9e16
style: Accept auto for {scroll|view}-timeline-name
...
Per https://github.com/w3c/csswg-drafts/issues/7431 , both timeline name
should accept `auto`.
Differential Revision: https://phabricator.services.mozilla.com/D166476
2023-11-06 09:35:57 +01:00
Boris Chiou
835268aec2
style: Support view-timeline-inset in style system
...
Support view-timeline-inset: `[ [ auto | <length-percentage> ]{1,2} ]#`.
And its initial value is 0.
Differential Revision: https://phabricator.services.mozilla.com/D166243
2023-11-06 09:35:57 +01:00
Oriol Brufau
bb55e923bb
Further changes required by Servo
2023-11-06 09:35:57 +01:00
Tiaan Louw
4559546fbb
style: Add lab(), lch(), oklab(), oklch() to specified colors
...
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.
Introduced a new color type AbsoluteColor. It represents any kind of
color that has absolute numerical values. It is also tied to a color
space and therefore can be trivially converted to another color space.
Differential Revision: https://phabricator.services.mozilla.com/D163579
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
6ce64abe7e
style: Clean up list interpolation code
...
Factor out duplicated / common code to its own module, add / fix spec
links, and clean-up callers.
Differential Revision: https://phabricator.services.mozilla.com/D167253
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
b96f8f748c
style: Share computed animation-iteration-count representation between Servo and Gecko
...
This removes the special AnimationIterationCount -> f32 conversion from
gecko.mako.rs which will be useful to simplify coordinated properties.
Differential Revision: https://phabricator.services.mozilla.com/D167123
2023-11-06 09:35:57 +01:00
Jonathan Watt
dd372eb5c2
style: Style changes to support the 'page-orientation' property
...
Differential Revision: https://phabricator.services.mozilla.com/D161800
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
a973371cf2
style: Remove non-standard values of caption-side for good
...
They have been disabled since bug 1688695. There's a variety of
table-caption bugs that would be easier to fix if we didn't have to
account for side-captions.
Differential Revision: https://phabricator.services.mozilla.com/D165690
2023-11-04 08:17:09 +01:00
Ben Freist
dc225e0b2f
style: [refactor] Migrate NS_STYLE_MASONRY_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D164422
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
18b9e1b615
style: Use used, rather than computed font-size for font-metric dependent units
...
Differential Revision: https://phabricator.services.mozilla.com/D165737
2023-11-04 08:17:09 +01:00
Oriol Brufau
58600c7854
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
042864d34a
style: Implement overflow: overlay as an alias on auto, and enable on Nightly
...
See related webcompat issues and discussion in
https://github.com/w3c/csswg-drafts/issues/8063
Differential Revision: https://phabricator.services.mozilla.com/D165058
2023-11-04 08:17:09 +01:00
Daniel Holbert
db4dd48d31
style: Remove the about:config pref for subgrid, layout.css.grid-template-subgrid-value.enabled, since it's been default-enabled for years
...
Differential Revision: https://phabricator.services.mozilla.com/D164389
2023-11-04 08:17:09 +01:00
Ben Freist
37c2d4d30a
style: [refactor] Migrate NS_STYLE_LIST_STYLE_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D163792
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
dbba87d73e
style: Implement Buttonborder/mark/marktext
...
Needs some extra test expectation updates.
Differential Revision: https://phabricator.services.mozilla.com/D157748
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
11313368ac
style: Remove non-standard and unused system font values
...
And hide internal but used values. System fonts are not exposed in the
computed style so this should be fine.
If we need the old values for some obscure reason, it's trivial to alias
them to e.g., menu or so.
Differential Revision: https://phabricator.services.mozilla.com/D163269
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
020ba9e749
style: Follow-up clean-ups and tweaks
...
<general-enclosed> should be handled in parse_in_parens.
Add some convenience functions to KleeneValue.
Differential Revision: https://phabricator.services.mozilla.com/D163214
2023-11-04 08:17:09 +01:00
Ziran Sun
bee44a5259
style: Add parsing for <general-enclosed> in queries conditions
...
See https://drafts.csswg.org/mediaqueries-5/#typedef-general-enclosed
Differential Revision: https://phabricator.services.mozilla.com/D158662
2023-11-04 08:17:09 +01:00
Oriol Brufau
a298c296e4
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Connor Pearson
e55c03c8ff
style: Implement CSS mod() and rem() functions
...
Differential Revision: https://phabricator.services.mozilla.com/D163166
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
cc30a418a3
style: Remove unused -moz-window-frame appearance constants
...
Differential Revision: https://phabricator.services.mozilla.com/D162864
2023-11-04 08:17:09 +01:00
Ziran Sun
ea04827f05
style: Use root element font size for rem calculation in Container queries
...
Differential Revision: https://phabricator.services.mozilla.com/D162853
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
63c3d36d28
style: Remove appearance: -moz-win-glass, which is unused
...
This we don't need to uplift.
Differential Revision: https://phabricator.services.mozilla.com/D162535
2023-11-04 08:17:09 +01:00
Oriol Brufau
d53696e452
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
57da2712d0
style: Implement label[value] and start/end cropping with CSS rather than XUL layout
...
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
2023-11-04 08:17:09 +01:00
Ziran Sun
aee17ed05c
style: container-queries: Stop restrict none/auto/normal from <custom-ident>
...
Differential Revision: https://phabricator.services.mozilla.com/D161764
2023-11-04 08:17:09 +01:00
Connor Pearson
2a7055a8ff
style: Remove unused std::ops::Rem implementations
...
Differential Revision: https://phabricator.services.mozilla.com/D161844
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
91626808e9
style: Remove display: -moz-popup
...
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
2023-11-04 08:17:09 +01:00
Oriol Brufau
a4d2beecd3
Further changes required by Servo
2023-11-03 08:59:49 +01:00
Connor Pearson
6a4a97ad7c
style: Implement CSS round() function
...
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>
Differential Revision: https://phabricator.services.mozilla.com/D156742
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
8ffe78e511
style: Don't bother preserving authored colors for canvas
...
Differential Revision: https://phabricator.services.mozilla.com/D161266
2023-11-03 08:59:49 +01:00
Ziran Sun
aba0a4bce0
style: Only a single name allowed in @container rule
...
Differential Revision: https://phabricator.services.mozilla.com/D158775
2023-11-03 08:59:49 +01:00
Jonathan Watt
2c1799a8df
style: Rename page::PageOrientation to page::PageSizeOrientation
...
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
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
b2ab136cd9
style: Simplify container-type implementation
...
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
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
efdf518acc
style: Remove system font support for various font longhands
...
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
2023-11-03 08:59:49 +01:00
Emilio Cobos Álvarez
bfa293c5c5
style: Split in_media_query and in_container_query bits from computed::Context
...
No behavior change, but it makes more sense this way :)
Differential Revision: https://phabricator.services.mozilla.com/D159851
2023-11-03 08:59:49 +01:00