aboutsummaryrefslogtreecommitdiffstats
path: root/components/style
Commit message (Collapse)AuthorAgeFilesLines
* build(deps): bump parking_lot from 0.11.2 to 0.12.0 (#30199)dependabot[bot]2023-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * build(deps): bump parking_lot from 0.11.2 to 0.12.0 Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.11.2 to 0.12.0. - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/0.11.2...0.12.0) --- updated-dependencies: - dependency-name: parking_lot dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade parking-log in style and layout_thread* as well --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Format toml files (#30112)Samson2023-08-171-6/+16
| | | | | | | * Add taplo fmt config for toml fmt * fmt toml files * Add even-better-toml to extensions recommendations
* style: Add an input-region-margin to widgets, and implement it on LinuxEmilio Cobos Álvarez2023-08-161-0/+10
| | | | | | | | | Recompute the input region when resizing the widget and so on, and use it to check for rollups. Depends on D148211 Differential Revision: https://phabricator.services.mozilla.com/D148222
* Further changes required by ServoOriol Brufau2023-08-161-24/+26
|
* style: Use ColorMix for interpolated colors in the computed style rather ↵Emilio Cobos Álvarez2023-08-1610-535/+458
| | | | | | | | | than ComplexColorRatios This among other things preserves the right color-space when interpolating currentColor. Differential Revision: https://phabricator.services.mozilla.com/D147512
* style: Remove -moz-scrollbar-thumb-proportionalEmilio Cobos Álvarez2023-08-161-5/+1
| | | | | | | | It unconditionally matches on all platforms, so it's not returning any useful information. Depends on D147689 Differential Revision: https://phabricator.services.mozilla.com/D147690
* style: Update style to uluru 3.0Mike Hommey2023-08-161-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D147477
* style: Update style to arrayvec 0.7Mike Hommey2023-08-161-8/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D147476
* style: Fix warnings about whitelist/blocklist functions being deprecated in ↵Mike Hommey2023-08-161-3/+3
| | | | | | bindgen 0.59 Differential Revision: https://phabricator.services.mozilla.com/D147695
* style: Remove some dead vibrancy codeEmilio Cobos Álvarez2023-08-162-8/+0
| | | | | | Drive-by cleanup. Differential Revision: https://phabricator.services.mozilla.com/D147698
* style: Improve Percentage -> LengthPercentage conversionEmilio Cobos Álvarez2023-08-163-7/+17
| | | | | | | | | This doesn't change behavior because we only use them for images that have no clamping. Depends on D147008 Differential Revision: https://phabricator.services.mozilla.com/D147511
* style: Do hue interpolations in degrees rather than radians. r=barretEmilio Cobos Álvarez2023-08-161-26/+21
| | | | | | This gives us a bit more precision. Differential Revision: https://phabricator.services.mozilla.com/D147007
* style: Fix hue adjustment to match the specEmilio Cobos Álvarez2023-08-161-3/+3
| | | | | | | The value to sum is tau, not pi. This was caught by some tests, see https://drafts.csswg.org/css-color/#shorter Differential Revision: https://phabricator.services.mozilla.com/D147006
* style: Fix color-mix() percentage normalizationEmilio Cobos Álvarez2023-08-161-4/+21
| | | | Differential Revision: https://phabricator.services.mozilla.com/D147005
* style: Implement more color-mix() color-spacesEmilio Cobos Álvarez2023-08-162-162/+299
| | | | | | We had code to convert between these and the latest draft supports them so... Differential Revision: https://phabricator.services.mozilla.com/D147004
* style: Make the color interpolation code more genericEmilio Cobos Álvarez2023-08-161-260/+160
| | | | | | | It's really piece-wise premultiplied interpolation, with a special-case for hue, so centralize the implementation. Differential Revision: https://phabricator.services.mozilla.com/D147003
* Further changes required by ServoOriol Brufau2023-08-161-8/+0
|
* style: Update color-mix() syntax to match the current specEmilio Cobos Álvarez2023-08-163-82/+134
| | | | | | Test expectation updates for this in the latest patch of the bug. Differential Revision: https://phabricator.services.mozilla.com/D147002
* style: Parse scroll-snap-stop style and propagate it to APZ sideHiroyuki Ikezoe2023-08-167-5/+39
| | | | | | Depends on D146147 Differential Revision: https://phabricator.services.mozilla.com/D145850
* style: Cache computed styles objects display: none subtreesEmilio Cobos Álvarez2023-08-163-9/+46
| | | | | | | | | | | | | This reuses our existing undisplayed style generation, but in a per-document rather than per-nsComputedDOMStyle object, which means that we can avoid re-resolving styles of elements in display: none subtrees much more often. This brings the test-case in the bug to par with other browsers or better, and is much simpler than the initial approach I tried back in the day. Differential Revision: https://phabricator.services.mozilla.com/D147547
* style: Make modal dialog code more generic, and make it apply to fullscreen ↵Emilio Cobos Álvarez2023-08-163-4/+4
| | | | | | | | | | too behind a pref For now, don't turn it on by default yet, because I want to wait for more discussion in https://github.com/w3c/csswg-drafts/issues/6965 and so on. But I think the code is simple enough to land this. Differential Revision: https://phabricator.services.mozilla.com/D147295
* style: Change order of container shorthandOriol Brufau2023-08-161-9/+9
| | | | | | | | | Since the initial value of container-type is an open issue [1], I'm leaving that as-is for now. [1] https://github.com/w3c/csswg-drafts/issues/7202 Differential Revision: https://phabricator.services.mozilla.com/D147338
* style: Implement overflow-clip-margin: <length>Emilio Cobos Álvarez2023-08-161-0/+10
| | | | Differential Revision: https://phabricator.services.mozilla.com/D146432
* style: Ensure options in listbox selects are not stacking contexts by defaultEmilio Cobos Álvarez2023-08-161-1/+3
| | | | | | | We could have a different property or something but this seems reasonable as well probably. Differential Revision: https://phabricator.services.mozilla.com/D146994
* Further changes required by ServoOriol Brufau2023-08-164-8/+11
|
* style: More container queries plumbingEmilio Cobos Álvarez2023-08-1618-143/+420
| | | | | | | | | | | Provide container information in computed::Context and use it to resolve the container queries. This still fails a lot of tests because we are not ensuring that layout is up-to-date when we style the container descendants, but that's expected. Differential Revision: https://phabricator.services.mozilla.com/D146478
* style: Clean up unused -moz-window-shadow valuesEmilio Cobos Álvarez2023-08-161-1/+4
| | | | | | | | | | | | After bug 1768278 and bug 1767815 there's no more uses of the cliprounded value in the tree (also it causes artifacts on HiDPI screens so we probably don't want new usages). The "sheet" value is unused, and the other values other than "default" and "none" are only derived from "default", so they don't need to be exposed in the style system. Differential Revision: https://phabricator.services.mozilla.com/D145821
* style: Implement 'update' media featureAutumn on Tape2023-08-161-1/+35
| | | | Differential Revision: https://phabricator.services.mozilla.com/D146338
* style: Lint and 32-bit build fix.Emilio Cobos Álvarez2023-08-161-0/+1
| | | | MANUAL PUSH: Bustage fix CLOSED TREE
* Further changes required by ServoOriol Brufau2023-08-164-4/+6
|
* style: Move size of tests to compile-time tests in the style crateEmilio Cobos Álvarez2023-08-1610-4/+53
| | | | | | Same reasoning as the previous commit. Differential Revision: https://phabricator.services.mozilla.com/D146104
* style: Convert specified value tests to compile-time testsEmilio Cobos Álvarez2023-08-163-4/+28
| | | | | | | | | | These were written at a time where std::mem::size_of wasn't a `const fn` in Rust. Now that it is, we can make these tests live in the style crate, and the build not to compile if they fail. Differential Revision: https://phabricator.services.mozilla.com/D146103
* style: Implement piecewise linear functionDavid Shin2023-08-162-0/+224
| | | | Differential Revision: https://phabricator.services.mozilla.com/D145256
* style: Fix layer statement rules with multiple layer namesEmilio Cobos Álvarez2023-08-161-2/+2
| | | | MANUAL PUSH: Trivial orange fix CLOSED TREE.
* style: Track @container condition id in style rulesEmilio Cobos Álvarez2023-08-162-54/+135
| | | | | | | | | | | | | | | Much like we track layer rules. Consolidate that "containing rule state we pass down while building the cascade data" in a single struct that we can easily restore. For now, do nothing with it. I want to land this patch separately because it touches the Rule struct and CascadeData rebuilds, which both are performance sensitive. Its layout shouldn't change because I also changed LayerId to be a u16 (this shouldn't matter in practice, since LayerOrder is already a u16). Differential Revision: https://phabricator.services.mozilla.com/D145243
* style: Simplify selector flags setup even moreEmilio Cobos Álvarez2023-08-1611-146/+83
| | | | | | | | | | | | | | | | In my investigation for bug 1766439, I am digging into why selector matching regressed. It doesn't help that the selector-matching code is instantiated a gazillion times (so there's a ton of copies of the relevant functions). This was needed in the past because we had different ways of setting the selector flags on elements, but I unified that recently and now we only need to either set them or not. That is the kind of thing that MatchingContext is really good for, so pass that instead on MatchingContext creation. Differential Revision: https://phabricator.services.mozilla.com/D145428
* style: Remove proton places tooltip codeEmilio Cobos Álvarez2023-08-161-5/+2
| | | | | | | | | | There's nobody working on it, and tooltips should hopefully be nice enough after recent changes (bug 1765423). Having it enabled causes artifacts like bug 1767815 comment 3. We can always rescue this from hg history if needed. Differential Revision: https://phabricator.services.mozilla.com/D145621
* style: Implement media feature expression multi-range syntaxEmilio Cobos Álvarez2023-08-161-90/+214
| | | | Differential Revision: https://phabricator.services.mozilla.com/D145231
* style: Refactor media feature expression representation in preparation to ↵Emilio Cobos Álvarez2023-08-162-127/+159
| | | | | | | | | | support multi-range syntax No behavior change. Depends on D145229 Differential Revision: https://phabricator.services.mozilla.com/D145230
* style: Factor out parsing the query feature nameEmilio Cobos Álvarez2023-08-161-5/+13
| | | | | | No behavior change. Differential Revision: https://phabricator.services.mozilla.com/D145229
* style: Fix insertRule with layer statements before importsEmilio Cobos Álvarez2023-08-163-31/+58
| | | | | | | We need to do a bit more nuanced check because @layer statements might go before imports. Differential Revision: https://phabricator.services.mozilla.com/D144996
* style: Introduce Optional<T> to represent optional values in the style systemEmilio Cobos Álvarez2023-08-164-39/+90
| | | | | | | | | | | cross-fade() was kinda doing this in its own way with PercentOrNone, but since now we have more use-cases for this we should probably make this a slightly more general solution. I added some convenience APIs, but they're unused as of this patch so let me know if you want them gone. Differential Revision: https://phabricator.services.mozilla.com/D144831
* Further changes required by ServoOriol Brufau2023-08-161-3/+3
|
* style: Add support for parsing container-query-specific featuresEmilio Cobos Álvarez2023-08-1616-79/+205
| | | | | | | There are some mediaqueries-5 features that we still don't support and explain the remaining failures in at-container-{parsing,serialization}. Differential Revision: https://phabricator.services.mozilla.com/D144446
* Further changes required by ServoOriol Brufau2023-08-161-2/+11
|
* style: cleanup animation-nameEmilio Cobos Álvarez2023-08-164-97/+129
| | | | | | | | | | | | | Make the representation the same between Gecko and Servo code. This will enable further clean-ups in the future. Make serialization be correct, serializing as identifier unless it's an invalid one (in which case we serialize as a string). This changes our stringification behavior in the specified style, but now it will match the computed style and be more correct over-all. Differential Revision: https://phabricator.services.mozilla.com/D144473
* Further changes required by ServoOriol Brufau2023-08-161-3/+2
|
* style: Move some of the media query code to a more generic queries moduleEmilio Cobos Álvarez2023-08-1610-118/+127
| | | | | | | | | | | | No behavior change, just moving and renaming files. The code in the "queries" module will be shared between @media and @container. @media has some other code that container queries doesn't need like MediaList / MediaType / etc. That remains in the media_queries module. Differential Revision: https://phabricator.services.mozilla.com/D144435
* style: Tweak contain bitflag definition order to avoid static constructorsEmilio Cobos Álvarez2023-08-161-4/+4
| | | | | | | | | | | | | This has no behavior change otherwise. The STRICT definition depended on SIZE, which was defined later. That's fine in Rust, but in C++ it causes the initialization to be dynamic because it doesn't have the definition of SIZE yet (ugh). This is the fix for the regression, though the following patch turns on constexpr support in cbindgen, which would've caught this at build-time, and guarantees that we don't have extra static constructors. Differential Revision: https://phabricator.services.mozilla.com/D144316
* style: Add scroll() to animation-timeline for style systemBoris Chiou2023-08-161-0/+91
| | | | | | | | | | | scroll() is defined in the spec proposal, and there is a temporary spec: https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-notation. The spec is still under development, so we don't drop the orignal scroll-timeline at rule. Instead, we add a new scroll() notation to animation-timeline, and support both syntax for now. Differential Revision: https://phabricator.services.mozilla.com/D143417