aboutsummaryrefslogtreecommitdiffstats
path: root/components/style
Commit message (Collapse)AuthorAgeFilesLines
...
* style: Infinity angles should degenerate compute to 0CanadaHonk2023-11-211-1/+8
| | | | | | | | Also adjusted WPT tests to always expect deg like similar past changes. WPT tests: https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-infinity-nan-computed.html#L57-L71 Differential Revision: https://phabricator.services.mozilla.com/D172401
* style: Rustfmt recent changes to calc.rsEmilio Cobos Álvarez2023-11-212-15/+19
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172339
* style: Add resolution support to calc()Emilio Cobos Álvarez2023-11-216-47/+171
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172338
* style: Make image-set without valid images render nothingEmilio Cobos Álvarez2023-11-213-6/+4
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172341
* style: Re-define CoordPair structBoris Chiou2023-11-211-6/+10
| | | | | | Redefine/Rename the fields in CoordPair to align the data members of gfx::Point. Differential Revision: https://phabricator.services.mozilla.com/D5903
* style: Add popover attribute and part of basic popover functionalityZiran Sun2023-11-213-0/+7
| | | | | | | | | | Starts to add part of the basic functionality for popover. Including [1] :open & :closed CSS pseudo class [2] showPopover(), hidePopover() and togglePopover() interfaces. Much of the functionality is still to-do. [3] PopoverData interface Differential Revision: https://phabricator.services.mozilla.com/D171719
* style: Parse and serialize NaN and infinity times correctlyCanadaHonk2023-11-212-56/+55
| | | | | | | | | | | | | | | | Times like NaN and infinity are now parsed and serialized correctly. Rewrote time to use `calc_clamping_mode` instead of `was_calc` to stop some parse-time clamping which broke these values. Adjusted WPT test expectations, 19 newly pass :tada: Also added a new WPT test to cover a missing edge case: `calc(1<unit> * NaN)` -> `calc(NaN * 1<canonical_unit>)` The very similar angle tests do this already for angle's units. Differential Revision: https://phabricator.services.mozilla.com/D171911
* Further changes required by ServoOriol Brufau2023-11-211-0/+2
|
* style: Create timeline objects when mutating scroll-timeline propertyBoris Chiou2023-11-214-0/+54
| | | | | | And so we can lookup the timeline from TimelineCollection. Differential Revision: https://phabricator.services.mozilla.com/D169273
* Further changes required by ServoOriol Brufau2023-11-211-1/+1
|
* style: Be consistent for which URIs we expose chrome rulesEmilio Cobos Álvarez2023-11-212-3/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D171640
* Further changes required by ServoOriol Brufau2023-11-211-5/+6
|
* style: Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colorsTiaan Louw2023-11-2117-256/+233
| | | | | | | | | | | | | | Computed color values will not be in the correct format, closer to the one specified by the author. This also means that colors accross the code are stored now as AbsoluteColor or StyleAbsoluteColor. This allows color space/gamut information to be available for use. Some animation related test failures had to be changed, because colors now has greater precision. Animated a color now causes a lot more animation updates, which was not initially expected. See the bug for discussion. Differential Revision: https://phabricator.services.mozilla.com/D171021
* Enable new color functions from CSS Color 4 (#30752)Oriol Brufau2023-11-201-2/+2
| | | | | | | | I will need to do most of the work anyways during the style updates, so by enabling this it will be easier to detect mistakes. Also, canvas colors are now parsed as <color>, precisely to support these new features. This is according to the HTML spec: https://html.spec.whatwg.org/multipage/infrastructure.html#parsed-as-a-css-color-value
* Further changes required by ServoOriol Brufau2023-11-061-1/+4
|
* style: Serialize NaN and infinity angles as per specCanadaHonk2023-11-063-16/+66
| | | | | | | | | | | `NaN`, `infinity`, and `-infinity` angles should be specially serialized. Also fixed a few relevant WPT tests which did not follow spec. (see https://github.com/web-platform-tests/wpt/pull/38825) Adjusted WPT test expectations, 40 newly pass :tada: Differential Revision: https://phabricator.services.mozilla.com/D171658
* Further changes required by ServoOriol Brufau2023-11-061-1/+10
|
* style: Make <ray-size> optional and default to 'closest-side'Boris Chiou2023-11-062-12/+13
| | | | | | | | | | | | | | | Per the spec update, the new syntax is: `ray() = ray( <angle> && <ray-size>? && contain? )` And for `<ray-size>`: "If no <ray-size> is specified it defaults to closest-side." So `<ray-size>` is optional and we omit it if it's default value, for serialization. By the way, offset=* properties are supported only in Gecko, so we don't need a servo function to check the preference. Differential Revision: https://phabricator.services.mozilla.com/D171625
* style: Move legacy -moz-box collapse to its own CSS propertyEmilio Cobos Álvarez2023-11-061-0/+10
| | | | | | | | | | | | Make display: -moz-box's visibility: collapse handling switchable by its own CSS property. Longer term maybe we should switch the front-end away from visibility: collapse altogether (there are some alternatives), but for now this will allow to move the front-end to switch to modern `display: flex` while keeping `visibility: collapse` work as in -moz-box. Differential Revision: https://phabricator.services.mozilla.com/D171472
* Further changes required by ServoOriol Brufau2023-11-061-1/+8
|
* style: Implement CSS exponential functionsEm Zhan2023-11-062-40/+147
| | | | Differential Revision: https://phabricator.services.mozilla.com/D170842
* style: Support offset-position in the style systemBoris Chiou2023-11-062-19/+63
| | | | | | | | | | | | | | | | Also, we make it animatable but don't apply it to the motion transform and don't run it on the compositor for now (so it works for getComputedStyle but doesn't have rendering result). Per spec: https://w3c.github.io/csswg-drafts/css-values/#calc-serialize, we tweak the WPT to let calc() serialize the percentage first, and maintain zero-valued terms, i.e. 0%. (We are doing the same thing as offset-anchor, so it should be fine with other browsers.) Besides, I tweak the serialization of shorthand a little bit so we match the implementation of WebKit. Differential Revision: https://phabricator.services.mozilla.com/D170972
* style: Fix appearance-cssom-001.htmlEmilio Cobos Álvarez2023-11-061-3/+0
| | | | | | | | | | | | | | | | | | * Remove some legacy appearance aliases that other engines don't implement. * Allow to pass with unimplemented <compat-auto> values, since per the spec the idea of these is to get them removed, see https://github.com/w3c/csswg-drafts/issues/8506 for the ones we don't implement. * Also allow the `-moz-` prefix to be implemented, because we can't quite get rid of it (people use it to remove the <input type=number> buttons with -moz-appearance: textfield and so on), and the alternative is to implement a bunch of non-standard ::-webkit- pseudo-elements. Differential Revision: https://phabricator.services.mozilla.com/D171243
* style: Make -moz-box-layout: flex default, and clean-up CSSEmilio Cobos Álvarez2023-11-062-6/+2
| | | | | | | | Now it's on by default everywhere, so all this is not needed. No behavior change effectively since the xul.css bits being removed effectively achieve the same. Differential Revision: https://phabricator.services.mozilla.com/D170944
* Further changes required by ServoOriol Brufau2023-11-061-2/+2
|
* style: Use abstract color parserTiaan Louw2023-11-062-63/+81
| | | | | | | | In stead of having the css parser construct a color in it's own format and then converting it to what Gecko needs to perform operations, we now construct a Gecko friendly color type directly. Differential Revision: https://phabricator.services.mozilla.com/D170187
* style: Don't reject negative resolutions eitherEmilio Cobos Álvarez2023-11-061-4/+0
| | | | | | | | | | This unveils an issue with image-set() tests, which expect 0x to not parse (inconsistently with media queries). Fix the test, since the spec doesn't restrict the range of <resolution> values (and more importantly, it shouldn't allow open ranges). Differential Revision: https://phabricator.services.mozilla.com/D170762
* style: Don't reject negative values at parse time in media featuresEmilio Cobos Álvarez2023-11-063-9/+9
| | | | | | Clean-up some other test expectations while at it. Differential Revision: https://phabricator.services.mozilla.com/D170677
* style: Fix parsing nested image-set funcs as validCanadaHonk2023-11-061-22/+31
| | | | | | | | | Nested image-set CSS functions should fail to parse as per spec. WPT tests (2 newly pass): https://github.com/web-platform-tests/wpt/blob/a2154e3f971f3630643741206ce02bbbc5f31d6f/css/css-images/image-set/image-set-parsing.html#L223-L239 Differential Revision: https://phabricator.services.mozilla.com/D170829
* style: Layer should be an invalid media typeEmilio Cobos Álvarez2023-11-061-2/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D170676
* style: Remove -moz-image-region support from layoutEmilio Cobos Álvarez2023-11-061-11/+0
| | | | | | | There are no users of non-auto values, so we can just simplify some code and remove the property. Differential Revision: https://phabricator.services.mozilla.com/D170010
* Further changes required by ServoOriol Brufau2023-11-061-0/+6
|
* style: Expose scrollbar-inline-size as a chrome-only environment variableEmilio Cobos Álvarez2023-11-062-1/+21
| | | | | | After the previous patches this is rather straight-forward. Reviewed in: https://phabricator.services.mozilla.com/D168148
* style: Expose chrome-only environment variables to all chrome:// documents, ↵Emilio Cobos Álvarez2023-11-061-1/+4
| | | | | | | | not just chrome-docshells This will be necessary to make the new env var testable. Reviewed in: https://phabricator.services.mozilla.com/D168148
* style: `linear()` easing function should not consider less than 2 linear ↵David Shin2023-11-061-3/+4
| | | | | | | | stop arguments valid Latest spec no longer handles `linear() == linear` and `linear(<single value>) == <single value>`. Differential Revision: https://phabricator.services.mozilla.com/D169955
* Further changes required by ServoOriol Brufau2023-11-061-3/+5
|
* style: Add forced-color-adjust propertyFred Chasen2023-11-068-3/+44
| | | | | | | | 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
* style: Part 3 - Color mixing is done with new color spacesTiaan Louw2023-11-064-700/+103
| | | | | | | The color mixing is npw using AbsoluteColor and it's conversion functions. The result is still being converted back to sRGB for now. Differential Revision: https://phabricator.services.mozilla.com/D169930
* style: Part 2 - Use new color space for color mixingTiaan Louw2023-11-063-65/+220
| | | | | | | | Mixing is now using the new color space for specifying the interpolation color space. For that reason hsl and hwb is added to the color space and also converting to/from them. Differential Revision: https://phabricator.services.mozilla.com/D169929
* style: Part 1 - Move color mixing code to color moduleTiaan Louw2023-11-065-1044/+1050
| | | | | | | 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
* style: add subgrid to list of suggestions for grid-template-* propertiesChristian Sonne2023-11-061-0/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D169862
* Further changes required by ServoOriol Brufau2023-11-063-7/+22
|
* style: Expose line-height resolution to style, and use it from ToResolvedValueEmilio Cobos Álvarez2023-11-064-28/+62
| | | | | | | | | For ToResolvedValue implementation purposes we wouldn't need to split out the vertical / font / line-height arguments and we could just pass around the ComputedStyle, but the lh unit would need that distinction, (because computing lh on font properties should use the parent style). Differential Revision: https://phabricator.services.mozilla.com/D168705
* style: Use non-native menus in Windows for documents where we don't have a ↵Emilio Cobos Álvarez2023-11-061-2/+2
| | | | | | | | native theme Untested, but it should work. Differential Revision: https://phabricator.services.mozilla.com/D169836
* style: Move AbsoluteColor to common color moduleTiaan Louw2023-11-064-287/+299
| | | | Differential Revision: https://phabricator.services.mozilla.com/D169607
* style: Add missing color conversionsTiaan Louw2023-11-061-35/+83
| | | | | | The patch adds some of the color conversions away from sRGB. Differential Revision: https://phabricator.services.mozilla.com/D168895
* style: Implement ipdl reads without needing default ctorsEmilio Cobos Álvarez2023-11-065-7/+0
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149743
* style: Hint directionality of label content for crop="start" labelsEmilio Cobos Álvarez2023-11-061-6/+5
| | | | Differential Revision: https://phabricator.services.mozilla.com/D168788
* style: [devtools] Add `color` to DevTools autocompleteNicolas Chevobbe2023-11-061-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D168520
* style: Resolve <number> to <length> in ToResolvedValue for line-heightJonathan Kew2023-11-062-1/+20
| | | | | | | | | | This makes the serialization of the 'font' shorthand on computed style return the line-height as an absolute length rather than a number (font-size multiplier), which is consistent with what the line-height longhand already returns, and with other browsers. (See also https://github.com/w3c/csswg-drafts/issues/8385.) Differential Revision: https://phabricator.services.mozilla.com/D168542