| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
This reverts the Rust edition updates to these three traits as well as
incorporates https://phabricator.services.mozilla.com/D117887. The
purpose of this change is to reduce the diff with upstream stylo.
Finally, formatting is disabled for these crates as well.
|
|
|
|
|
|
|
|
| |
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt
Depends on D179380
Differential Revision: https://phabricator.services.mozilla.com/D179381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies a tiny bit our bindings in some places, and complicates
it in others, but over all I think it's better.
It requires a bit more manual code in the rust side to drop and cast the
relevant pointers (which was done implicitly before), but it's a lot
less magic than it used to be, and that's all autogenerated so consumers
don't need to care about it.
The set up is still not ideal. I don't like that we rely on destructors
running in both sides of the FFI boundary, but that's for another day.
This is the last usage of RawOffsetArc, so remove that. We now support
proper Arc<> in structs (GridTemplateAreas uses it), so I don't think
we'll need it any time soon.
Differential Revision: https://phabricator.services.mozilla.com/D177905
|
|
|
|
|
|
|
|
|
|
| |
See blocked bug.
For non-Locked types we can just use the same underlying type at the FFI
boundary. Port StylesheetContents and CssUrlData to this set-up.
CssUrlData is already generated by cbindgen anyways.
Differential Revision: https://phabricator.services.mozilla.com/D177559
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More nesting plumbing. Still does nothing because we don't parse the
nested rules.
Should be trivial to prove this patch doesn't change any behavior so
far, but I want to land it on its own because it can have performance
implications.
This follows the pattern of what we do with other rules like layers and
container conditions, that is, keep the ancestor selectors in a stack,
and poke at the last one in order to replace the ancestor.
This changes the behavior of replace_parent_selector as with the newer
version of the spec, stuff like:
div {
.foo {
stuff
}
}
Should work as `div .foo`. A test is added for this case.
Differential Revision: https://phabricator.services.mozilla.com/D176560
|
|
|
|
|
|
| |
Depends on D96634
Differential Revision: https://phabricator.services.mozilla.com/D96636
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This parses the ampersand as a parent selector behind an
(off-by-default) selectors feature.
The plan is to call replace_parent_selector while we're doing the
CascadeData rebuilds, which is where we can have all the ancestor
nesting information.
No behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D167237
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StylesheetContents
This prevents incorrectly reusing cached results when the contents go
away and new contents are allocated with the same address.
Note that these keep alive transitively everything else under them, so
all other medialist keys don't need this.
By making this a proper hashmap it should also improve cache lookup
times if the cache grows too big.
Differential Revision: https://phabricator.services.mozilla.com/D115202
|
|
|
|
|
|
|
| |
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Release selectors 0.24.0 and servo_arc 0.2.0
This patch extends #29361, bumping selectors to 0.24.0 and servo_arc to 0.2.0.
We’ll need to publish them too, in order to close #29105.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29105 (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because there are no functional changes
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| | |
Add missing license files for servo_arc.
Fixes #28966.
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code wasn't sound, as CSSOM objects also needed to go away before
the shared memory goes away (as they keep references to them).
This is sound assuming no presence of reference cycles introduced by CSSOM.
We may want to live with this and rely on chrome code not writing cycles like
this with UA stylesheet DOM objects.
We could explicitly drop all potentially-static objects... That seems pretty
error prone though.
Or we could also just leak the shared memory buffer, is there any reason why we
may not want to do that?
Differential Revision: https://phabricator.services.mozilla.com/D51870
|
| |
|
| |
|
|
|
|
| |
MozReview-Commit-ID: KGhYL6DJRaR
|
|
|
|
| |
MozReview-Commit-ID: DoNcSsKpRn
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
crate.
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.
Differential Revision: https://phabricator.services.mozilla.com/D35197
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
node children.
I need to profile this a bit more, but talos was pretty happy about this, and it
solves the known performance issues here such as the test-case from bug 1483963
for example. This also gets rid of a bunch of unsafe code which is nice.
This still keeps the same GC scheme, removing the key from the hashmap when
needed. I kept those as release assertions, but should probably be turned into
debug-only assertions.
Differential Revision: https://phabricator.services.mozilla.com/D6801
|
|
|
|
|
|
|
|
|
|
|
| |
We cannot compile with just feature(gecko + debug_assertions), since that's how
debug rusttests get compiled and they don't have the refcount logging stuff.
We were getting away with it for the pre-existing usage of the style crate,
because it wasn't used during any test and presumably the linker didn't
complain. But servo_arc is definitely used in tests.
Differential Revision: https://phabricator.services.mozilla.com/D32691
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D32173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Share a singleton to avoid allocating for empty lists.
Differential Revision: https://phabricator.services.mozilla.com/D30543
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
of SVG path data.
As I said over bug 1549593, the eventual goal is to use ArcSlice in all
inherited properties. But this seemed like a good first candidate that doesn't
require me to move around a lot more code, since we were already using cbindgen
for the path commands.
Differential Revision: https://phabricator.services.mozilla.com/D30134
|
|
|
|
|
|
|
|
|
|
| |
explicit header.
We could make the header PhantomData or something, but then we wouldn't be able
to bind to C++, since C++ doesn't have ZSTs. So add a canary instead to add a
runtime check of stuff being sane.
Differential Revision: https://phabricator.services.mozilla.com/D30133
|
|
|
|
|
|
|
| |
I'm hitting this when trying to add bindings for box shadows, which are 32-bit
aligned.
Differential Revision: https://phabricator.services.mozilla.com/D30353
|
|
|
|
|
|
|
|
|
| |
The change from [T; 1] to [T; 0] shouldn't change behavior since they have the
right alignment and we never poke at that particular array, but feels more
correct to avoid creating types that point to uninitialized data or outside of
their allocation, now that we allow empty slices.
Differential Revision: https://phabricator.services.mozilla.com/D30352
|
|
|
|
|
|
| |
See https://github.com/rust-lang/rust/pull/60594#issuecomment-489966933
Differential Revision: https://phabricator.services.mozilla.com/D30169
|
|
|
|
|
|
| |
If only for parallelism with Arc<>.
Differential Revision: https://phabricator.services.mozilla.com/D30131
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D17186
|
| |
|
| |
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D6034
|
|
|
|
|
|
|
|
| |
Fixes #21186
Bug: 1476445
Reviewed-by: Manishearth
Differential Revision: https://phabricator.services.mozilla.com/D2205
|
| |
|
|
|
|
|
|
| |
Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: Jxp2A7cj6CV
|
|
|
|
|
|
|
|
|
|
| |
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)
|