| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This will allow writing `tests/unit/*` in the root `Cargo.toml` file
to designate Servo unit tests.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This also makes the `border` shorthand not reset them.
Bug: 1417200
Reviewed-by: xidorn
MozReview-Commit-ID: KNais1e5FnE
|
|
|
|
|
|
|
| |
This is on top of https://github.com/servo/servo/pull/19285.
Rust Nightly has new enum memory layout optimizations:
https://github.com/rust-lang/rust/pull/45225
|
| |
|
|
|
|
|
|
|
| |
That is, in cases where it would fail to link.
This will help make Rust CI be gated on compiling Stylo:
https://github.com/rust-lang/rust/pull/44603
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
MozReview-Commit-ID: 34KFtcwCkBB
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools. This name is also used as the base
URL for the source-map URL resolution algorithm. sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831
This patch changes servo to preserve and expose this value for use in M-C.
|
|
|
|
|
|
| |
Without this change, the previous commit increases the size of ElementData.
MozReview-Commit-ID: 87BZuXINiT9
|
|
|
|
|
|
|
|
| |
Now that rust-cssparser reports 1-based locations, bump the required
cssparser version and remove get_location_with_offset. Previously,
some code paths were not calling get_location_with_offset; see
https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 for some
background.
|
|
|
|
| |
MozReview-Commit-ID: Ks4km7R9VGr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes the MallocSizeOf stuff in Stylo work more like the HeapSizeOf
stuff already in Servo, except better. In particular, it adds deriving support
for MallocSizeOf, which will make it easier to improve coverage.
The patch does the following.
- Combines servo/components/style/stylesheets/memory.rs and the heapsize crate
into a new crate, malloc_size_of.
- Forks the heapsize_derive crate, calling it malloc_size_of, so that
MallocSizeOf can be derived.
- Both the new crates have MIT/Apache licenses, like heapsize, in case they are
incorporated into heapsize in the future.
- Renames the methods within MallocSizeOf and the related traits so they are
more concise.
- Removes MallocSizeOfWithGuard.
- Adds `derive(MallocSizeOf)` to a lot of types, in some cases replacing an
equivalent or almost-equivalent hand-written implementation.
- Adds stuff so that Rc/Arc can be handled properly.
|
|
|
|
| |
This reduces memory consumption of list-valued properties in the common case of one entry in the list.
|
|
|
|
|
|
|
| |
Gradients and rects are rare, and large. Image is much smaller with them boxed.
This is part of of the fix for Gecko bug 1397614
<https://bugzilla.mozilla.org/show_bug.cgi?id=1397614>
|
| |
|
| |
|
|
|
|
|
|
| |
The tests are designed for this, and trying to accommodate 32-bit
platforms is difficult. Size concerns due to element packing and holes
are less of a problem on 32-bit platforms in any event.
|
|
|
|
| |
We used a string instead of stringify!'ing the name, whoops.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
move stylo_test build script guts from Python to Rust
stylo_test's build script is split between Python and Rust. style's
build script already has to perform complicated dances to determine an
appropriate binary to execute, depending on the platform. To avoid
copying and pasting that code, it seems reasonable to simply port the
Python code into Rust, thus making the relationship between generated
files and the cargo dependency output clearer. The new Rust is somewhat
more verbose, but not terribly so.
Doing this makes running `stylo_test` on Windows somewhat easier, as
we don't have to care about the particulars of Python executables. And
more Rust is more better.
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17925)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
stylo_test's build script is split between Python and Rust. style's
build script already has to perform complicated dances to determine an
appropriate binary to execute, depending on the platform. To avoid
copying and pasting that code, it seems reasonable to simply port the
Python code into Rust, thus making the relationship between generated
files and the cargo dependency output clearer. The new Rust is somewhat
more verbose, but not terribly so.
|
| |
| |
| |
| | |
We no longer need to pass special features down to sub-crates.
|
|/
|
|
|
| |
This change means that stylo_tests doesn't depend on a version of the
style crate with the `testing` feature defined.
|
| |
|
|
|
|
| |
https://github.com/servo/rust-cssparser/pull/171
|
|
|
|
| |
reporting (bug 1352669).
|
| |
|
|
|
|
|
|
| |
CLOSED TREE
Backs out https://github.com/servo/servo/pull/17624
|
|
|
|
| |
reporting (bug 1352669).
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Stylo: Move match and cascade temporaries to CurrentElementInfo
https://bugzilla.mozilla.org/show_bug.cgi?id=1370719
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17481)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`ElementStyles` holds an optional list of values for each eager pseudo-element.
However, the type was declared as a slice instead of a fixed size array, so an
extra 8 bytes were being allocated to hold the size, even though it never
changes.
Moving the constant size into the type reduces `ElementStyles` and `ElementData`
by 8 bytes.
MozReview-Commit-ID: GaO6DKFxUMo
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this change, the `ComputedStyle` struct that is part of permanent style
data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2
`Arc<ComputedValues>` (unvisited and visited).
Both rule nodes and the visited values don't actually need to be here. This
patch moves these 3 to new temporary storage in `CascadeInputs` on
`CurrentElementInfo` during the match and cascade process. Rule nodes are
pushed down inside the `ComputedValues` for later access after the cascade.
(Visited values were already available there.)
The permanent style data per element now has just the `Arc<ComputedValues>` for
itself and eager pseudo-elements (plus the `RestyleHint`).
MozReview-Commit-ID: 3wq52ERMpdi
|
|/ |
|
|
|
|
|
| |
a None variant to StyleSource as an indicator for a lack of style
source, and refactor all uses with this new form
|
|
|
|
| |
MozReview-Commit-ID: 9jVkDM4P8mC
|
| |
|
| |
|
|
|
|
|
| |
Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf
|
| |
|
|
|
|
| |
MozReview-Commit-ID: Id6iedlK5tg
|
|
|
|
| |
MozReview-Commit-ID: EXnAzfyoZ1e
|
|
|
|
|
|
| |
by another word.
MozReview-Commit-ID: 7B1i1g0HLTj
|
|
|
|
| |
MozReview-Commit-ID: AKNTZZqke1O
|