aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* style: Update stylo to itertools:0.10, itoa:1.0 and toml:0.5Mike Hommey2023-10-022-3/+6
| | | | 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
* style: Support scroll-timeline-axis longhand in style systemBoris Chiou2023-10-025-8/+20
| | | | | | Implement "scroll-timeline-axis: block | inline | vertical | horizontal". Differential Revision: https://phabricator.services.mozilla.com/D146019
* style: Support scroll-timeline-name longhand in style systemBoris Chiou2023-10-026-6/+65
| | | | | | Implement "scroll-timeline-name: none | <custom-ident>". Differential Revision: https://phabricator.services.mozilla.com/D146018
* Further changes required by ServoOriol Brufau2023-10-029-89/+73
|
* style: Move fixed-point font types to RustEmilio Cobos Álvarez2023-10-0210-318/+393
| | | | | | | | | Now that cbindgen and rust support const generics, it seems more simple. This centralizes all the relevant font constants etc in rust and avoids conversions when going from rust to C++ and vice versa. Differential Revision: https://phabricator.services.mozilla.com/D148847
* style: Update derive_more to 0.99.17Mike Hommey2023-10-022-2/+2
| | | | | | | Limit its features to those we actually use, which turns out is none for webrender_api. Differential Revision: https://phabricator.services.mozilla.com/D148734
* Further changes required by ServoOriol Brufau2023-10-021-1/+1
|
* style: Add a low-priority selector list for pseudo-classes that have global ↵Emilio Cobos Álvarez2023-10-022-15/+86
| | | | | | | | | rules This avoids trying to match those global rules for most elements that can't match them anyways. Differential Revision: https://phabricator.services.mozilla.com/D147640
* style: Rename :-moz-modal-dialog to :modalTiaan Louw2023-10-022-2/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D148751
* style: While at it use some better names for some bitsEmilio Cobos Álvarez2023-10-022-6/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D148538
* Further changes required by ServoOriol Brufau2023-10-0227-91/+266
|
* style: Unify Gecko and Servo EventState/ElementState bitsEmilio Cobos Álvarez2023-10-0217-220/+70
| | | | | | | | | | | | | | | | Add a dom/base/rust crate called just "dom" where we can share these. Most of the changes are automatic: s/mozilla::EventStates/mozilla::dom::ElementState/ s/EventStates/ElementState/ s/NS_EVENT_STATE_/ElementState::/ s/NS_DOCUMENT_STATE_/DocumentState::/ And so on. This requires a new cbindgen version to avoid ugly casts for large shifts. Differential Revision: https://phabricator.services.mozilla.com/D148537
* style: Add parsing for linear easing function and gate it behind prefDavid Shin2023-10-021-1/+38
| | | | Differential Revision: https://phabricator.services.mozilla.com/D146839
* style: Hook up linear easing calculation for servo and expose it to C++David Shin2023-10-023-11/+64
| | | | Differential Revision: https://phabricator.services.mozilla.com/D146838
* style: Rust side plumbing work for linear easing functionDavid Shin2023-10-026-25/+81
| | | | | | | Add LinearFunction to TimingFunction. Because the linear function is a variable list of linear stops, the enum is no longer Copyable. Differential Revision: https://phabricator.services.mozilla.com/D146837
* style: Use debug_unreachable!() in matches_simple_selectorEmilio Cobos Álvarez2023-10-022-1/+5
| | | | | | | | | This shrinks the function by avoiding generating rather noisy panic code. Depends on D145486 Differential Revision: https://phabricator.services.mozilla.com/D145487
* style: Reorder some variantsEmilio Cobos Álvarez2023-10-022-69/+70
| | | | | | | | | | | | | This doesn't make a difference, I was hoping it would allow us to remove the special-casey code we have here: https://searchfox.org/mozilla-central/rev/997a56b018662e2940c99bbaf57a6ac9d1aa5422/servo/components/selectors/matching.rs#610-632 But it doesn't. Still I think it doesn't hurt tho, shouldn't change behavior. Depends on D145485 Differential Revision: https://phabricator.services.mozilla.com/D145486
* style: Simplify a bit hot selector-matching loopEmilio Cobos Álvarez2023-10-021-11/+7
| | | | | | | | | | | | Note that element.clone() is just copying a couple pointers. Have a single place where we compute the next element and check for linky-ness. This saves a couple checks (very very minor win in the micro-benchmark I've been looking at, but consistent). Depends on D145484 Differential Revision: https://phabricator.services.mozilla.com/D145485
* style: Compute hover / active quirk state lazilyEmilio Cobos Álvarez2023-10-021-35/+22
| | | | | | | | | This makes the inner function much smaller which improves selector-matching performance very mildly for the benchmarks I've been looking at. Also, this should help selector matching on quirks mode by only doing this when we actually find :hover / :active pseudo-classes. Differential Revision: https://phabricator.services.mozilla.com/D145484