aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/values/generics/url.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-47/+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: Update cbindgen.Emilio Cobos Álvarez2019-09-121-2/+0
| | | | | | | | | | | | | | | | | | This cleans up the pattern of "Use a private dtor so that the helper functions do the right thing" by enabling it everywhere using: https://github.com/eqrion/cbindgen/pull/377 It also caught some uninitialized value issues. I think they're mostly harmless since we zero-initialize our structs: https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632 And since we override the clip rect, which is the other bit of code that was failing to build with this change. Differential Revision: https://phabricator.services.mozilla.com/D43491
* style: Use cbindgen for URIs.Emilio Cobos Álvarez2019-06-041-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't clean up as much as a whole, but it's a step in the right direction. In particular, it allows us to start using simple bindings for: * Filters * Shapes and images, almost. Need to: * Get rid of the complex -moz- gradient parsing (let layout.css.simple-moz-gradient.enabled get to release). * Counters, almost. Need to: * Share the Attr representation with Gecko, by not using Option<>. * Just another variant should be enough (ContentItem::{Attr,Prefixedattr}, maybe). Which in turn allows us to remove a whole lot of bindings in followups to this. The setup changes a bit. This also removes the double pointer I complained about while reviewing the shared UA sheet patches. The old setup is: ``` SpecifiedUrl * CssUrl * Arc<CssUrlData> * String * UrlExtraData * UrlValueSource * Arc<CssUrlData> * load id * resolved uri * CORS mode. * ... ``` The new one removes the double reference to the url data via URLValue, and looks like: ``` SpecifiedUrl * CssUrl * Arc<CssUrlData> * String * UrlExtraData * CorsMode * LoadData * load id * resolved URI ``` The LoadData is the only mutable bit that C++ can change, and is not used from Rust. Ideally, in the future, we could just use rust-url to resolve the URL after parsing or something, and make it all immutable. Maybe. I've verified that this approach still works with the UA sheet patches (via the LoadDataSource::Lazy). The reordering of mWillChange is to avoid nsStyleDisplay from going over the size limit. We want to split it up anyway in bug 1552587, but mBinding gains a tag member, which means that we were having a bit of extra padding. One thing I want to explore is to see if we can abuse rustc's non-zero optimizations to predict the layout from C++, but that's something to explore at some other point in time and with a lot of care and help from Michael (who sits next to me and works on rustc ;)). Differential Revision: https://phabricator.services.mozilla.com/D31742
* style: Derive ToResolvedValue.Emilio Cobos Álvarez2019-04-121-0/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D26783
* style: Add derived ToShmem implementations.Cameron McCormack2019-04-121-0/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17197
* style: Improve #[derive(Parse)].Emilio Cobos Álvarez2019-02-231-20/+1
| | | | | | | | | | | | | I want to do this so that I can get rid of Either<>. The reasons for getting rid of either are multiple: * It doesn't generate as nice C++ code using cbindgen. * It isn't that nice to use either from Rust. * cbindgen has bugs with zero-sized types. I started using this for ColorOrAuto and a few others, for now. Differential Revision: https://phabricator.services.mozilla.com/D19844
* 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-1/+1
| | | | | Since we're in an inconsistent state because mako files weren't updated, and it's really really ugly.
* `cargo fix --edition`Simon Sapin2018-11-101-2/+2
|
* Format style component.chansuke2018-09-091-3/+13
|
* style: Add a ValueInfo trait for exposing types needed by devtools.Xidorn Quan2018-04-291-2/+3
| | | | | | | | | | | | 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-3/+6
| | | | | | | | | | 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)
* Implement a URL-generic type for list-style-imageFausto Núñez Alberro2018-04-031-0/+39
This should fix the following two "expected to fail" tests: - getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL - getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL