aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/values/specified/grid.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-349/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* style: Remove the about:config pref for subgrid, ↵Daniel Holbert2023-11-041-1/+1
| | | | | | layout.css.grid-template-subgrid-value.enabled, since it's been default-enabled for years Differential Revision: https://phabricator.services.mozilla.com/D164389
* style: Switch all callsites of try() to try_parse() in the style crate.Emilio Cobos Álvarez2020-06-181-15/+22
| | | | | | | | | Fully automated via: $ rg -l '\.try\(' | xargs sed -i 's/\.try(/.try_parse(/g' $ cd servo/components/style && cargo +nightly fmt Differential Revision: https://phabricator.services.mozilla.com/D80099
* style: Implement style system support for Masonry layout.Mats Palmgren2020-06-041-1/+17
| | | | | | | | | | This implements support for this CSS Masonry layout proposal: https://github.com/w3c/csswg-drafts/issues/4650 I've intentionally left out a shorthand (place-tracks?) for now until we have a draft CSS spec for this. Differential Revision: https://phabricator.services.mozilla.com/D67061
* style: Enable multiple grid repeat values in Servo.Emily McDonough2020-04-161-10/+0
| | | | Differential Revision: https://phabricator.services.mozilla.com/D60931
* style: Make some grid/grid-template values serialize to a shorter form.Mats Palmgren2019-11-301-2/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D53913
* style: Fix formatting of recent changes.Emilio Cobos Álvarez2019-08-151-12/+3
|
* style: Use `static_prefs::pref!`.Nicholas Nethercote2019-08-151-2/+1
| | | | | | | | | | It's much nicer. One nice thing about this is that the new code is subject to the existing threadedness checking, which identified that several of these should be atomic because they're accessed off the main thread. Differential Revision: https://phabricator.services.mozilla.com/D40792
* style: Support multiple track sizes for grid-auto-{columns|rows}.Boris Chiou2019-08-151-2/+17
| | | | | | | Support `<track-size>+` on the implicit track sizing properties, grid-auto-columns and grid-auto-rows. Differential Revision: https://phabricator.services.mozilla.com/D38408
* Bug 1519958 - Improve stack size of grid templates and re-enable style ↵Emilio Cobos Álvarez2019-08-151-2/+3
| | | | | | | | | struct size assertions disabled in the previous patch. r=boris This re-enables the assertion which was disabled on the previous patch by doing a bit of boxing around. Differential Revision: https://phabricator.services.mozilla.com/D36599
* style: Refactor grid types to preserve repeat() at computed value time and ↵Emilio Cobos Álvarez2019-08-151-136/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use cbindgen. I'm _really_ sorry for the size of the patch. I tried to do this in two steps but it was a lot of work and pretty ugly. This patch makes us use cbindgen for grid-template-{rows,columns}, in order to: * Make us preserve repeat() at computed-value time. This is per spec since interpolation needs to know about repeat(). Except for subgrid, which did the repeat expansion at parse-time and was a bit more annoying (plus it doesn't really animate yet so we don't need it to comply with the spec). * Tweaks the WPT tests for interpolation to adopt the resolution at: https://github.com/w3c/csswg-drafts/issues/3503. Trade-off here, as this patch stands, is that this change makes us use less long-living memory, since we expand repeat() during layout, but at the cost of a bit of CPU time during layout (conditional on the property applying though, which wasn't the case before). It should be very easy to store a cached version of the template, should this be too hot (I expect it isn't), or to change the representation in other ways to optimize grid layout code if it's worth it. Another trade-off: I've used SmallPointerArray to handle line-name merging, pointing to the individual arrays in the style data, rather than actually heap-allocating the merged lists. This would also be pretty easy to change should we measure and see that it's not worth it. This patch also opens the gate to potentially improving memory usage in some other ways, by reference-counting line-name lists for example, though I don't have data that suggests it is worth it. In general, this patch makes much easier to tweak the internal representation of the grid style data structures. Overall, I think it's a win, the amount of magic going on in that mako code was a bit huge; it took a bit to wrap my head around it. This patch comments out the style struct size assertions. They will be uncommented in a follow-up patch which contains some improvements for this type, which are worth getting reviewed separately. Also, this patch doesn't remove as much code as I would've hoped for because of I tried not to change most of the dom/grid code for inspector, but I think a fair bit of the nsGridContainerFrame.cpp code that collects information for it can be simplified / de-copy-pasted to some extent. But that was a pre-existing problem and this patch is already quite massive. Differential Revision: https://phabricator.services.mozilla.com/D36598
* style: rustfmt recent changes.Emilio Cobos Álvarez2019-07-081-3/+1
|
* style: Use cbindgen for grid track sizing.Emilio Cobos Álvarez2019-07-081-7/+27
| | | | Differential Revision: https://phabricator.services.mozilla.com/D36118
* style: Change `StaticPrefs` from a class to a namespace.Nicholas Nethercote2019-07-081-1/+1
| | | | | | | | | | This doesn't change the way C++ code uses static prefs. But it does slightly change how Rust code uses static prefs, specifically the name generated by bindgen is slightly different. The commit also improves some comments. Differential Revision: https://phabricator.services.mozilla.com/D35764
* Rustfmt recent changes.Emilio Cobos Álvarez2019-01-081-2/+1
|
* style: Manually rename some variables.Emilio Cobos Álvarez2019-01-081-5/+5
| | | | | | lop is not an acceptable variable name for LengthPercentage. Differential Revision: https://phabricator.services.mozilla.com/D15813
* style: Rename LengthOrPercentage to LengthPercentage.Emilio Cobos Álvarez2019-01-081-13/+13
| | | | | | | | | | | | It does not represent `<length> | <percentage>`, but `<length-percentage>`, so `LengthOrPercentage` is not the right name. This patch is totally autogenerated using: rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done Differential Revision: https://phabricator.services.mozilla.com/D15812
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-5/+1
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* style: Revert try -> r#try change.Emilio Cobos Álvarez2018-11-101-18/+15
| | | | | Since we're in an inconsistent state because mako files weren't updated, and it's really really ugly.
* `cargo fix --edition --features gecko`Simon Sapin2018-11-101-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-22/+25
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* style: Don't allow auto in grid line names.Emilio Cobos Álvarez2018-11-051-1/+1
| | | | | | See https://github.com/w3c/csswg-drafts/issues/2856. Differential Revision: https://phabricator.services.mozilla.com/D9882
* Format style component.chansuke2018-09-091-9/+20
|
* style: Add a ValueInfo trait for exposing types needed by devtools.Xidorn Quan2018-04-291-1/+1
| | | | | | | | | | | | Most of types just derive it using proc_macro directly. Some of value types need manual impl. In my current plan, this new trait will be used in bug 1434130 to expose values as well. Bug: 1455576 Reviewed-by: emilio MozReview-Commit-ID: LI7fy45VkRw
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-83/+130
| | | | | | | | | | This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
* Manual fixups so that the rustfmt output won't trigger tidy.Bobby Holley2018-04-101-3/+5
|
* Convert StylePrefs to StaticPrefs.Nicholas Nethercote2018-04-031-1/+1
|
* style: remove unused AsciiExt imports.Emilio Cobos Álvarez2018-03-041-1/+0
| | | | eq_ignore_ascii_case is not in AsciiExt since rustc 1.23.
* stylo: Hide accidentally exposed subgrid behind prefsNazım Can Altınova2017-12-061-3/+18
|
* style: Make css(dimension) apply to the variant.Emilio Cobos Álvarez2017-11-121-1/+1
|
* Allow unused imports for AsciiExt in style code.Simon Sapin2017-11-091-1/+1
| | | | See #19128, this part is cherry-picked so Gecko can build with rust nightly.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-2/+2
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-101-11/+14
|
* style: Properly use integers on grid properties, and derive ToComputedValue.Emilio Cobos Álvarez2017-09-111-11/+15
|
* stylo: store specified value of grid layout repeat() functionFernando Jiménez Moreno2017-09-061-29/+90
|
* style: Remove HasViewportPercentage.Emilio Cobos Álvarez2017-08-291-36/+1
| | | | It's not needed since #18268
* Implement #[compute(clone)] for #[derive(ToComputedValue)]Anthony Ramine2017-08-281-37/+0
|
* Improve handling of trait bounds when deriving fmap-like traitsAnthony Ramine2017-08-281-24/+0
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Update cssparser to 0.18Simon Sapin2017-07-241-4/+4
| | | | https://github.com/servo/rust-cssparser/pull/171
* Add a bug link as comment for repeat functionNazım Can Altınova2017-07-191-0/+2
|
* Convert Vec values into boxed slicesNazım Can Altınova2017-07-191-12/+15
|
* Convert TrackList's 'values' field to store only TrackSize.Nazım Can Altınova2017-07-141-101/+59
| | | | | | | | It was storing both TrackSize and TrackRepeat before and TrackRepeat have to be converted into sequence of TrackSize during serialization. Instead of doing this in serialization process(which is hard and hacky), we converted to do this in parsing process. We were doing this conversion in the ComputedValue conversion. So we only had to move this process to parsing.
* Rename MinMax to MinmaxAnthony Ramine2017-07-121-1/+1
|
* Prevent parsing 'none' keyword in grid-template's columns partNazım Can Altınova2017-07-031-0/+8
|
* Fall back to an older version of the spec in TrackRepeat for the parity with ↵Nazım Can Altınova2017-07-031-0/+10
| | | | gecko
* Switch to GridTemplateComponent for subgrid line namesRavi Shankar2017-07-031-2/+50
|