Use cbindgen for grid line properties.
Categories
(Core :: CSS Parsing and Computation, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(5 files)
This will also introduce the ability to generate style system constants via cbindgen.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Option<> is not FFI-safe, so if we want to use the same representation
everywhere we need to get rid of it. This also makes it take the same amount of
memory as the C++ representation, and it's not very complex, I'd think.
Assignee | ||
Comment 2•6 years ago
|
||
We serialize these using Servo now.
Depends on D35195
Assignee | ||
Comment 3•6 years ago
|
||
This needs https://github.com/eqrion/cbindgen/pull/362, but I expect it to be
uncontroversial. I'll add a patch to this bug when it's merged to update it.
cbindgen historically didn't include these, but it turns out to be pretty useful
to generate constants for the style crate (since the binding crate is
servo/ports/geckolib
).
An alternative is to get a completely different cbindgen-generated header for
these, but that seems a bit wasteful. This generates the constants with the
Style prefix (so we'll get StyleMAX_GRID_LINE
for example), which is very
ugly. But we probably want to eventually stop using the Style prefix and use a
namespace instead, plus it's trivial to do auto kMaxLine = StyleMAX_GRID_LINE
,
for example, so it's probably not a huge deal.
Another alternative would be to use associated consts, which are generated by
cbindgen. Something like:
struct GridConstants([u8; 0]);
impl GridConstants {
const MAX_GRID_LINE: i32 = 10000;
}
Which would yield something like:
static const int32 StyleGridConstants_MAX_GRID_LINE = 10000;
I'm not sure if you find it preferrable, but I'm also happy to change it in a
follow-up to use this.
We need to fix a few manual C++ function signature definitions to match the C++
declaration.
Depends on D35196
Assignee | ||
Comment 4•6 years ago
|
||
We clamp earlier (parse time rather than computed value time), but that's the
only behavior change, which I think doesn't really matter.
Depends on D35197
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Backed out 4 changesets for causing bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/c95bc282ae96b48c3249b3d4942b7c15fbda5a58
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=253581393&repo=autoland&lineNumber=7370
[task 2019-06-26T20:55:17.834Z] 20:55:17 ERROR - make[1]: *** [force-cargo-test-run] Error 101
[task 2019-06-26T20:55:17.834Z] 20:55:17 INFO - make[1]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/toolkit/library/rust'
[task 2019-06-26T20:55:17.834Z] 20:55:17 INFO - /builds/worker/workspace/build/src/config/recurse.mk:101: recipe for target 'toolkit/library/rust/rusttests' failed
[task 2019-06-26T20:55:17.834Z] 20:55:17 INFO - make: *** [toolkit/library/rust/rusttests] Error 2
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
Just a few tests that are now "passing" because the grid line representation is more compact. I updated it by removing the boxed=true.
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43c03fe50773
https://hg.mozilla.org/mozilla-central/rev/9e01b4a3ac61
https://hg.mozilla.org/mozilla-central/rev/e6e5d5bfc6ed
https://hg.mozilla.org/mozilla-central/rev/06b5dca91073
Description
•