Oriol Brufau
dbd3eab9cd
Further changes required by Servo
2023-11-06 09:35:57 +01:00
Jonathan Kew
449fe2338e
style: Create a pref to list icon font families that should be used even when use_document_fonts=0, overriding the browser's font prefs
...
Some widely-used icon fonts use ligature rules to replace icon names such as "volume_up"
or "down_arrow" with icon glyphs. If the site is designed to use such a font, but the user
disables document fonts and we use our default Latin font instead, the underlying text will
be rendered instead of the intended icon.
To enable such fonts to continue to work, we provide a list of known ligature-icon fonts
and allow them to be used even when the document-fonts setting is disabled.
Differential Revision: https://phabricator.services.mozilla.com/D167923
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
Emilio Cobos Álvarez
863716a0a1
style: Minor clean-up to transform interpolation code
...
Differential Revision: https://phabricator.services.mozilla.com/D167616
2023-11-06 09:35:57 +01:00
Boris Chiou
fffb3c0830
style: Avoid infinite output progress after applying the easing function
...
The output progress of easing functions could be inf or -inf, per spec,
https://drafts.csswg.org/css-easing-2/#output-progress-value .
But we should avoid using infinity to calculate interpolation or use
the infinite progress in Web Animations API, per the spec issue comments:
https://github.com/w3c/csswg-drafts/issues/8344#issuecomment-1399033481
Differential Revision: https://phabricator.services.mozilla.com/D167342
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
Jonathan Kew
d54d9ec25a
style: De-dup items with the same tag in the computed value of font-feature-settings and font-variation-settings
...
Differential Revision: https://phabricator.services.mozilla.com/D167012
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
fe8cdbe328
style: Use the same computed time representation between Servo and Gecko
...
Same as above.
Differential Revision: https://phabricator.services.mozilla.com/D167126
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
Jonathan Kew
b7d64ee6a4
style: Animate the 'normal' value of font-style as 'oblique 0deg'
...
This matches what the spec[1] says for font-style:
> Animation type: by computed value type; normal animates as oblique 0deg
A bunch of WPT tests for font-style animation are landing in https://github.com/web-platform-tests/wpt/pull/37570 .
Current Gecko passes 66/129 of the testcases there; with this patch applied it passes all the tests.
[1] https://drafts.csswg.org/css-fonts-4/#font-style-prop
Differential Revision: https://phabricator.services.mozilla.com/D166128
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
Emily McDonough
8193fb3985
style: Check that we do not insert more than MAX_GRID_LINE subgrid line name lists while constructing the list
...
This helps avoid OOM with very large repeats.
Differential Revision: https://phabricator.services.mozilla.com/D161533
2023-11-03 08:59:49 +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
David Shin
14eece6f5a
style: Container Relative Units: Set flag for USES_VIEWPORT_UNITS
only when viewport fallback is actually used
...
Differential Revision: https://phabricator.services.mozilla.com/D159866
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
Ziran Sun
b89c2be4bd
style: @container rules should support not without parentheses
...
We are currently detect 'not' as part of the container-name.
Differential Revision: https://phabricator.services.mozilla.com/D159836
2023-11-03 08:59:49 +01:00
David Shin
27958b191a
style: Enable lookup and computation of container size queries
...
Differential Revision: https://phabricator.services.mozilla.com/D158057
2023-11-03 08:59:49 +01:00