aboutsummaryrefslogtreecommitdiffstats
path: root/components/style_traits/specified_value_info.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-138/+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
* Revert changes to servo_arc, style_derive, and style_traits (#31387)Martin Robinson2024-02-221-5/+3
| | | | | | | This reverts the Rust edition updates to these three traits as well as incorporates https://phabricator.services.mozilla.com/D117887. The purpose of this change is to reduce the diff with upstream stylo. Finally, formatting is disabled for these crates as well.
* style: Remove dependency on servo_url (#31358)Martin Robinson2024-02-161-1/+1
| | | | | In order for stylo to be a separate crate, it needs to depend on less things from Servo. This change makes it so that stylo no longer depends on servo_url.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-3/+5
| | | | | * strict imports formatting * Reformat all imports
* style: Refactor grid types to preserve repeat() at computed value time and ↵Emilio Cobos Álvarez2019-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* style: Use ArcSlice for quotes.Emilio Cobos Álvarez2019-05-291-0/+1
| | | | | | This saves the intermediate allocation. Differential Revision: https://phabricator.services.mozilla.com/D30546
* style: Use OwnedSlice in the specified and computed values of most vector ↵Emilio Cobos Álvarez2019-05-291-0/+2
| | | | | | | | | | | | | | | | properties. This is just a refactor in the right direction. Eventual goal is: * All inherited properties use ArcSlice<>. * All reset properties use OwnedSlice<> (or ThinVec<>). No conversion happens at all, so we can remove all that glue, and also compute_iter and co. Of course there's work to do, but this is a step towards that. Differential Revision: https://phabricator.services.mozilla.com/D30127
* style: Introduce ArcSlice, a small wrapper over ThinArc but without an ↵Emilio Cobos Álvarez2019-05-101-0/+2
| | | | | | | | | | explicit header. We could make the header PhantomData or something, but then we wouldn't be able to bind to C++, since C++ doesn't have ZSTs. So add a canary instead to add a runtime check of stuff being sane. Differential Revision: https://phabricator.services.mozilla.com/D30133
* style: Make cssPropertySupportsType take an enum.Emilio Cobos Álvarez2019-03-271-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D22427
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Format component of style_traitschansuke2018-09-081-1/+1
|
* style: Move some parsing-only attributes to use #[parse(..)] instead of ↵Emilio Cobos Álvarez2018-06-121-1/+1
| | | | | | | | | | #[css(..)]. I need to admit I'm ambivalent about this one :). Bug: 1466609 Reviewed-by: xidorn MozReview-Commit-ID: F1jlfnQKXwo
* style: Move represents_keyword to the css attributes.Emilio Cobos Álvarez2018-05-051-2/+0
| | | | | | Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: 21yuU4h34AQ
* style: Fix tidy issues and Servo build.Emilio Cobos Álvarez2018-04-291-0/+7
|
* style: Add some attributes for SpecifiedValueInfo to help deriving more from ↵Xidorn Quan2018-04-291-0/+30
| | | | | | | | types. Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: IyohSTbUO31
* style: Add collect_values function to SpecifiedValueInfo trait for ↵Xidorn Quan2018-04-291-0/+26
| | | | | | | | | | | | collecting possible values. This is the basic structure of the stuff. Following patches will fill the gap between Gecko and Servo on value generating, and finally hook it into InspectorUtils. Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: KNLAfFBiY6e
* style: Add a ValueInfo trait for exposing types needed by devtools.Xidorn Quan2018-04-291-0/+71
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