servo/components/style/values/specified
Emilio Cobos Álvarez ccff9b294f style: Use cbindgen for URIs.
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
2019-06-04 01:03:50 -04:00
..
align.rs style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
angle.rs style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
background.rs style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
basic_shape.rs style: Rustfmt + build fix. 2019-05-10 12:43:06 +02:00
border.rs style: Use cbindgen for border-image-width. 2019-05-29 16:14:23 +02:00
box.rs style: Use OwnedSlice for will-change. 2019-05-29 16:14:12 +02:00
calc.rs style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
color.rs style: Hide -moz-gtk-buttonactivetext from content. 2019-06-04 01:03:49 -04:00
column.rs style: Improve #[derive(Parse)]. 2019-02-23 21:04:44 -08:00
counters.rs style: Implement the counter-set property. 2019-03-27 14:29:21 +01:00
easing.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
effects.rs style: Accept empty argument for some filters. 2019-05-29 16:14:15 +02:00
flex.rs style: Improve #[derive(Parse)]. 2019-02-23 21:04:44 -08:00
font.rs style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
gecko.rs style: Remove old CSS scroll snap implementation. 2019-05-29 16:14:24 +02:00
grid.rs Rustfmt recent changes. 2019-01-08 12:01:28 +01:00
image.rs style: Rustfmt recent changes. 2019-05-07 12:56:02 +02:00
length.rs style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
list.rs style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
mod.rs style: Implement offset-rotate. 2019-05-29 16:14:27 +02:00
motion.rs style: Implement offset-rotate. 2019-05-29 16:14:27 +02:00
outline.rs style: Derive ToResolvedValue. 2019-04-12 12:20:09 +02:00
percentage.rs style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
position.rs style: [cssom][css-grid] 'grid-auto-flow: row dense' should serialize to 'dense' since 'row' is implied. 2019-05-07 12:55:25 +02:00
rect.rs style: Use Rust types for some misc properties. 2019-02-23 21:04:33 -08:00
resolution.rs style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
source_size_list.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
svg.rs style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
svg_path.rs style: Rustfmt + build fix. 2019-05-10 12:43:06 +02:00
table.rs style: Derive ToResolvedValue. 2019-04-12 12:20:09 +02:00
text.rs style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
time.rs style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
transform.rs style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
ui.rs style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
url.rs style: Use cbindgen for URIs. 2019-06-04 01:03:50 -04:00