mirror of
https://github.com/servo/servo.git
synced 2025-07-19 13:23:46 +01:00
Extracted shorthands to separate files. Following up on #10813, here is a similar extraction of the shorthand stuff as well. I've deliberately tried to keep things similarly structured as in the longhand files. I.e. if a given property is in e.g. longhand/box.mako.rs, the shorthand stuff that relates to the same property is in shorthand/box.mako.rs and so forth. ---- The file is now down from ~7000 LoC to ~1750. A big improvement in my eyes, but there's still room for improving more. However, that shouldn't be done until we've had a bit of discussion about it. What we've done so far has been more-or-less obvious (after resolving the underlying Python/Mako issues with how to get things to properly communicate when things got split into multiple files etc). The remaining stuff is basically a plethora of anything from enums to structs to impls to... you name it. One way to try and sort this out is to continue abusing Mako %include:s for this. I'm not sure it's the right way, but it would be a reasonably _easy_ way to do it. Another way would be to use Rust modules/crates etc. for sorting it out. I feel like too much of a novice on the Rust side of stuff yet to have any sensible opinions on how to get that done, so here I'd very much like suggestions from other people in the project. (This is more of an entry point for discussion, and we could very well move that to a separate issue if you like. I think the more important short-term point is to try and get this merged. 😊 Please let me know if you feel it is OK, and if not, feel free to suggest adjustments.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10863) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
canvas | ||
canvas_traits | ||
compositing | ||
devtools | ||
devtools_traits | ||
gfx | ||
gfx_traits | ||
layout | ||
layout_traits | ||
msg | ||
net | ||
net_traits | ||
plugins | ||
profile | ||
profile_traits | ||
range | ||
script | ||
script_traits | ||
servo | ||
style | ||
style_traits | ||
util | ||
webdriver_server |