aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Further changes required by ServoOriol Brufau2023-10-021-2/+16
|
* style: Accept keywords in addition to strings in the @font-face format() ↵Jonathan Kew2023-10-021-4/+33
| | | | | | | | | | hint function 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
* style: Do not allow a list of strings in the @font-face src descriptor's ↵Jonathan Kew2023-10-021-19/+10
| | | | | | | | | | | | format() function, only a single format string 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
* style: Don't use -moz-bool-pref for flexbox -moz-box emulationEmilio Cobos Álvarez2023-10-021-1/+2
| | | | | | | Use a bool pref media query which allows dynamic changes to get reflected instantly. Differential Revision: https://phabricator.services.mozilla.com/D154449
* style: Add a chrome-only -moz-box-layout: legacy | flex, and use that to ↵Emilio Cobos Álvarez2023-10-021-0/+10
| | | | | | implement flexbox emulation Differential Revision: https://phabricator.services.mozilla.com/D154153
* style: Remove -moz-* display values enabled-in-content prefsEmilio Cobos Álvarez2023-10-021-12/+3
| | | | | | | We have unshipped these since forever, no point in keeping the pref around. Move the relevant tests to chrome ref/mochitests. Differential Revision: https://phabricator.services.mozilla.com/D154152
* style: Remove aspect-ratio preferenceBoris Chiou2023-10-021-1/+0
| | | | | | | We shipped this in Firefox 89, one year ago. It should be okay to drop this preference now. Differential Revision: https://phabricator.services.mozilla.com/D153680
* style: Make color-scheme affect Windows' non-native menusEmilio Cobos Álvarez2023-10-022-12/+5
| | | | | | | | | | | | This matches what Linux and macOS do, and that allows the fix for bug 1782623 to work on Windows for unstyled selects. This also simplifies the CSS (though it adds a new system color which is a bit more annoying). I filed https://github.com/w3c/csswg-drafts/issues/7561 to propose adding a more generic way to do this in the future (not just for Firefox). Differential Revision: https://phabricator.services.mozilla.com/D153549
* style: Properly fail to serialize grid shorthand when not roundtrippingEmilio Cobos Álvarez2023-10-021-29/+36
| | | | | | | Other browsers also don't roundtrip properly, but they fail less severely. Differential Revision: https://phabricator.services.mozilla.com/D152794
* style: Remove nsTimingFunction and ComputedTimingFunctionEmilio Cobos Álvarez2023-10-021-8/+4
| | | | | | | They're simple wrappers of StyleComputedTimingFunction so we can remove them. Differential Revision: https://phabricator.services.mozilla.com/D152700
* style: `linear(...)` easing: Implement right-continuous behaviour on ↵David Shin2023-10-021-15/+18
| | | | | | discontinuities Differential Revision: https://phabricator.services.mozilla.com/D152078
* style: Ensure we cancel transitions without the need of an extra flushEmilio Cobos Álvarez2023-10-022-1/+7
| | | | | | | | | | | | | | | | | When something switches to display: none, right now we rely on StopAnimationsForElementsWithoutFrames(), which posts a restyle and the previous ProcessPendingRestyles call was papering over it. For other elements in the display none subtree it doesn't matter, because we don't keep their styles around, but for the display: none element themselves we do need to update transitions on time. We could, possibly more generally, remove StopAnimationsForElementsWithoutFrames() altogether and cancel animations when we clear style data, perhaps... But that's probably worth a follow-up. Differential Revision: https://phabricator.services.mozilla.com/D151600
* style: Propagate flags from original property to aliasesEmilio Cobos Álvarez2023-10-021-0/+1
| | | | | | | | | | | | Even we don't have internal aliases right now (and that seems a bit silly) we do have pref-gated aliases. An alias ID passed to IsEnabled with the wrong EnabledState would misbehave, assert, and crash. Though we don't have such callers in the tree because InspectorUtils passes only arguments that make us not look at the flags, it seems more reliable this way. Differential Revision: https://phabricator.services.mozilla.com/D151594
* Further changes required by ServoOriol Brufau2023-10-021-1/+2
|
* style: Support animation-composition in keyframe at rulesBoris Chiou2023-10-022-34/+85
| | | | | | | | | | | | | | So we can specify the keyframe-specific composite operation. However, these is a spec issue about the default composite for CSS Animations: https://github.com/w3c/csswg-drafts/issues/7476. I choose to use auto as the default composite for missing keyframes to match the definition in web-animations-1 because I think this makes more sense: > If the keyframe-specific composite operation for a keyframe is not set, the > composite operation specified for the keyframe effect as a whole is used for > values specified in that keyframe. Differential Revision: https://phabricator.services.mozilla.com/D150808
* style: Implement CSS animation-composition longhand in style systemBoris Chiou2023-10-022-1/+19
| | | | | | | | | | | | This patch introduces animation-composition longhand but we don't accept it in @keyframe rule for now. I will support this for @keyframe in the patch series. Besides, the shorthand of animation doesn't include animation-composition. The spec issue is: https://github.com/w3c/csswg-drafts/issues/6946. We could fix the shorthand once this spec issue gets updated. Differential Revision: https://phabricator.services.mozilla.com/D150299
* style: Clean up a bit traversal cullingEmilio Cobos Álvarez2023-10-021-26/+4
| | | | Differential Revision: https://phabricator.services.mozilla.com/D151544
* style: make contain-intrinsic-size *animatable*Ziran Sun2023-10-022-2/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D151231
* style: C++ `ComputedTimingFunction` uses Rust's timing function calculationDavid Shin2023-10-025-85/+134
| | | | | | | | This was made economical by having Rust's computed `easing::TimingFunction` use a fully resolved function for `linear(...)` easing, as per draft resolution from https://github.com/w3c/csswg-drafts/issues/7415 Differential Revision: https://phabricator.services.mozilla.com/D151295
* style: Port bezier edge cases handling from C++ to RustDavid Shin2023-10-022-13/+68
| | | | Differential Revision: https://phabricator.services.mozilla.com/D150569
* style: Update rust's step function basd on C++ `ComputedTimingFunction`David Shin2023-10-023-19/+50
| | | | Differential Revision: https://phabricator.services.mozilla.com/D150566
* style: Move Rust animation to `ComputedTimingFunction`David Shin2023-10-022-69/+75
| | | | Differential Revision: https://phabricator.services.mozilla.com/D150565
* Further changes required by ServoOriol Brufau2023-10-021-1/+1
|
* style: Add color-mix to DevTools autocompleteEmilio Cobos Álvarez2023-10-021-0/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D151180
* style: Minor indentation fix. DONTBUILDEmilio Cobos Álvarez2023-10-021-1/+1
| | | | MANUAL PUSH: White-space only change
* style: Add support for parsing the `contain-intrinsic-size` property from ↵Ziran Sun2023-10-027-3/+101
| | | | | | the CSS-sizing specification Differential Revision: https://phabricator.services.mozilla.com/D151001
* style: Make fullscreen modalEmilio Cobos Álvarez2023-10-021-1/+1
| | | | | | As per https://github.com/w3c/csswg-drafts/issues/7311. Differential Revision: https://phabricator.services.mozilla.com/D150335
* style: `linear(...)` easing: Simplify piecewise linear implementation given ↵David Shin2023-10-022-8/+4
| | | | | | parsing simplification Differential Revision: https://phabricator.services.mozilla.com/D150163
* style: `linear(...)` easing: Parsing should split a linear stop value into ↵David Shin2023-10-023-31/+37
| | | | | | | | two for entries with both `linear-stop-length` set This brings the behaviour inline with `linear-gradient(...)` Differential Revision: https://phabricator.services.mozilla.com/D149926
* style: `linear(...)` Easing: First linear entry should Get 0.0 assigned for ↵David Shin2023-10-021-11/+5
| | | | | | | | | | input if not specified Previously, had the smallest input value over all entries was assigned. However, that does not match the behaviour of `linear-gradient(...)`, which this easing function is modeled after. Differential Revision: https://phabricator.services.mozilla.com/D149916
* style: Improve LookAndFeel color cachingEmilio Cobos Álvarez2023-10-021-52/+53
| | | | | | | | | | | | | | | | | | To be honest, I'm a bit baffled that bug 1773795 caused a performance regression, but I think it's because the standins codepath is not really cached, so system colors that are "spoofed" always go through the massive switch, which could potentially be expensive. To fix, this, rejigger a bit the caches so that we key on both color-scheme and use-standins. Also, while at it, make the set of colors we spoof a single bitflag check, rather than relying on the compiler to do something potentially smart with it. I had to shuffle the order of colors around so that the expression to initialize the bitfield is constexpr (doesn't go over 1 << 64), but other than that this patch should be relatively straight-forward. Differential Revision: https://phabricator.services.mozilla.com/D150100
* Further changes required by ServoOriol Brufau2023-10-021-2/+0
|
* style: Use Rust's `ComputedTimingFunction` for IPDLDavid Shin2023-10-022-0/+11
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149663
* style: Use style interpolation code for gradientsEmilio Cobos Álvarez2023-10-023-3/+5
| | | | | | | | This ensures they're clamped on Animated -> sRGB conversion, and in the future we'll have to implement different color spaces so we'll need to use it anyways. Differential Revision: https://phabricator.services.mozilla.com/D149792
* Further changes required by ServoOriol Brufau2023-10-021-0/+2
|
* style: Implement CSS 'contain: style'Martin Robinson2023-10-023-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an implementation of CSS `contain: style`. This introduces two new data structures, the ContainStyleScope and ContainStyleScopeManager. ContainStyleScope manages one `contain: style` "world" which has its own counter and quote lists. The contents of these lists depend on their parent scopes, but are not affected by their children. ContainStyleScopeManager manages a tree of scopes starting at a root scope which is outside of any `contain: style` element. Scopes are stored in a hash table that is keyed off of the nsIContent which establishes the `contain: style` scope. When modifying quote or content lists, the ContainStyleScopeManager is responsible for finding the appropriate `contain: style` scope to modify. Perhaps the most complex part of this is that counters and quotes have read access to the state of counters and quotes that are in ancestor `contain: style` scopes. In the case of counters, USE nodes that are at the beginning of counter lists might have a counter scope that starts in an ancestor `contain: style` scope. When nsCounterNode::SetScope() is called, the code may look upward in the `contain: style` scope tree to find the start of the counter scope. In the case of quotes, the first node in the quote list must look for the state of quotes in ancestor `contain: style` scopes. Differential Revision: https://phabricator.services.mozilla.com/D149508
* style: Implement AccentColor/AccentColorText and remove -moz-prefixed ↵Emilio Cobos Álvarez2023-10-021-4/+4
| | | | | | | | | | | version of the color As per https://github.com/w3c/csswg-drafts/issues/7347. Mostly renaming, doesn't change behavior other than exposing the new color keywords (tested in wpt). Differential Revision: https://phabricator.services.mozilla.com/D149876
* style: Refactor function parsing branches for ↵David Shin2023-10-021-60/+74
| | | | | | `specified::easing::TimingFunction` Differential Revision: https://phabricator.services.mozilla.com/D149756
* Further changes required by ServoOriol Brufau2023-10-021-1/+4
|
* style: Check for allowed colors recursively in forced-colors modeEmilio Cobos Álvarez2023-10-022-22/+20
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149733
* Further changes required by ServoOriol Brufau2023-10-023-3/+19
|
* style: Add simple parsing and matching support for :hasTiaan Louw2023-10-028-10/+85
| | | | | | | | Parsing is behind a config value `layout.css.has-selectors.enabled`. This change does not support p:has(> a) combinators, but will handle them gracefully, just not matching on them. Differential Revision: https://phabricator.services.mozilla.com/D149515
* style: Fix grid shorthand parsing to not incorrectly ignore the last token ↵Emilio Cobos Álvarez2023-10-021-1/+1
| | | | | | in one case Differential Revision: https://phabricator.services.mozilla.com/D149666
* Further changes required by ServoOriol Brufau2023-10-021-1/+1
|
* style: Update stylo to itertools:0.10, itoa:1.0 and toml:0.5Mike Hommey2023-10-023-16/+22
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149454
* style: Only accept the CSS2 font-variant values (normal/small-caps) in the ↵Jonathan Kew2023-10-021-2/+14
| | | | | | font shorthand; CSS Fonts 3/4 font-variant additions are not allowed Differential Revision: https://phabricator.services.mozilla.com/D149440
* style: Fix dynamic viewport sizeEmilio Cobos Álvarez2023-10-021-4/+7
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149275
* style: Make viewport-relative units zoomable via "zoom text only"Emilio Cobos Álvarez2023-10-024-25/+47
| | | | | | They're not font relative, so it we probably want them to be zoomed. Differential Revision: https://phabricator.services.mozilla.com/D148796
* style: Hook named scroll timelines to animation-timelineBoris Chiou2023-10-021-2/+6
| | | | | | | | | | | | | | Basically, animation-timeline could be 1. auto 2. none 3. <timeline-name> We extend the <timeline-name> to cover both @scroll-timeline rule and scroll-timeline-name property. We check @scroll-timeline rule first. If it doesn't exist, we check scroll-timeline-name of the element itself, the previous silbings, and their ancestors. Differential Revision: https://phabricator.services.mozilla.com/D146358
* style: Support scroll-timeline shorthand in style systemBoris Chiou2023-10-021-0/+73
| | | | | | | Implement "scroll-timeline: <'scroll-timeline-axis'> || <'scroll-timeline-name'>". Differential Revision: https://phabricator.services.mozilla.com/D146020