Use cbindgen for URIs
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
Assignee | ||
Comment 1•5 years ago
|
||
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).
- Get rid of the complex -moz- gradient parsing (let
- Counters, almost. Need to:
- Share the Attr representation with Gecko, by not using Option<>.
- Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
maybe).
- Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
- Share the Attr representation with Gecko, by not using Option<>.
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 ;)).
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=79d258a5265a38b6937f9e93225e3b96d12c1339 (that fails a couple moz-image-rect reftests that are fixed already)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bdbfbb5b342 Use cbindgen for URIs. r=heycam
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/80db9f845237 Tweak rust tests to account for more compact URL representation. r=bustage
Comment 5•5 years ago
|
||
Backed out 3 changesets (Bug 1552708, Bug 1552878) for build bustages and compiler issues.
Backout: https://hg.mozilla.org/integration/autoland/rev/354e127d754fae84199afd2758e41e6175d40eb4
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=1bdbfbb5b3424672257f3c850b69eced2e91f757&selectedJob=248531935
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=248531935&repo=autoland&lineNumber=7212
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=248538653&repo=autoland&lineNumber=21809
Assignee | ||
Comment 6•5 years ago
|
||
12:57:26 INFO - LLVM ERROR: SEH unwind data splitting not yet implemented
Huh, wasn't that bug fixed? Nathan, do you know about how to deal with it?
Assignee | ||
Comment 7•5 years ago
|
||
Oh well, I just pushed on top of the try runs for bug 1554006 and it's gone, so I hope that can land soon.
Comment 8•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)
12:57:26 INFO - LLVM ERROR: SEH unwind data splitting not yet implemented
Huh, wasn't that bug fixed? Nathan, do you know about how to deal with it?
It's very possible that the LLVM fix hasn't made it into the rustc we use...
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/388ab8151b4d Use cbindgen for URIs. r=heycam
Comment 10•5 years ago
|
||
bugherder |
Description
•