aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/stylo
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo unit tests out of tests/unitSimon Sapin2017-12-076-281/+0
| | | | | This will allow writing `tests/unit/*` in the root `Cargo.toml` file to designate Servo unit tests.
* Update smallvec to 0.6Bastien Orivel2017-12-051-1/+1
|
* style: Update cssparser to 0.23.Emilio Cobos Álvarez2017-12-051-1/+1
|
* style: Make -moz-border-colors chrome only.Emilio Cobos Álvarez2017-12-011-1/+1
| | | | | | | | This also makes the `border` shorthand not reset them. Bug: 1417200 Reviewed-by: xidorn MozReview-Commit-ID: KNais1e5FnE
* Fix Stylo tests to pass on both Stable and Nightly Rust.Simon Sapin2017-11-212-2/+9
| | | | | | | 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
* Update expected stylo sizes for rust-lang/rust#45225.Eduard-Mihai Burtescu2017-11-191-2/+2
|
* Make test-stylo compile an empty crate on Windows without GeckoSimon Sapin2017-10-242-0/+13
| | | | | | | 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
* style: Remove Servo_GetStyleVariables test special case.Cameron McCormack2017-10-141-5/+1
|
* Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-101-1/+1
|
* Only generate structs file for the current buildXidorn Quan2017-10-051-1/+1
|
* Revert #18668 - Add mprotect diagnostics for HashMap crashBobby Holley2017-10-032-2/+0
|
* Round hashglobe allocations up to the nearest page size.Bobby Holley2017-09-282-0/+2
| | | | MozReview-Commit-ID: 34KFtcwCkBB
* Store custom properties in keyframes into servo's PropertyDeclarationBlockHiroyuki Ikezoe2017-09-272-0/+2
|
* stylo: Update ComputedValues size in testManish Goregaokar2017-09-231-1/+1
|
* Preserve sourceURL comment on style sheetsTom Tromey2017-09-141-1/+1
| | | | | | | | | | | | | 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.
* Eliminate RestyleData entirely.Bobby Holley2017-09-121-2/+1
| | | | | | Without this change, the previous commit increases the size of ElementData. MozReview-Commit-ID: 87BZuXINiT9
* Remove get_location_with_offsetTom Tromey2017-09-121-1/+1
| | | | | | | | 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.
* Drive-by: Add size_of test for ComputedValues.Bobby Holley2017-09-111-0/+3
| | | | MozReview-Commit-ID: Ks4km7R9VGr
* Overhaul MallocSizeOf and related things.Nicholas Nethercote2017-09-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update rust-cssparser to 0.20.2.Boris Zbarsky2017-09-111-1/+1
| | | | This reduces memory consumption of list-valued properties in the common case of one entry in the list.
* Box gradients and rects in Image. r=xidornBoris Zbarsky2017-09-091-0/+10
| | | | | | | 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>
* Fix some warningsSimon Sapin2017-09-023-29/+1
|
* Parse at-rule without block in two stagesXidorn Quan2017-09-011-1/+1
|
* only run stylo_tests's size_of tests on 64-bit platformsNathan Froyd2017-08-252-1/+2
| | | | | | 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.
* use the proper property name in specified_values testsNathan Froyd2017-08-251-1/+1
| | | | We used a string instead of stringify!'ing the name, whoops.
* Update to cssparser 0.19, count line numbers during tokenizationSimon Sapin2017-08-091-1/+1
|
* Auto merge of #17925 - froydnj:stylo-test-rustify, r=Manishearthbors-servo2017-08-073-45/+56
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * move stylo_test build script guts from Python to RustNathan Froyd2017-08-013-45/+56
| | | | | | | | | | | | | | | | | | | | 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.
* | remove features from styl{e,o}_tests crateNathan Froyd2017-08-041-3/+0
| | | | | | | | We no longer need to pass special features down to sub-crates.
* | move specified values size testing entirely into stylo_testsNathan Froyd2017-08-043-5/+50
|/ | | | | This change means that stylo_tests doesn't depend on a version of the style crate with the `testing` feature defined.
* style: Remove now-unused empty Variables struct.Cameron McCormack2017-07-281-4/+1
|
* Update cssparser to 0.18Simon Sapin2017-07-241-1/+1
| | | | https://github.com/servo/rust-cssparser/pull/171
* stylo: Update rust-cssparser; extract more specific error types when ↵Josh Matthews2017-07-101-1/+1
| | | | reporting (bug 1352669).
* stylo: Create error reporters linked to documents (bug 1352669)Josh Matthews2017-07-101-0/+3
|
* Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout ↵Gecko Backout2017-07-061-1/+1
| | | | | | CLOSED TREE Backs out https://github.com/servo/servo/pull/17624
* stylo: Update rust-cssparser; extract more specific error types when ↵Josh Matthews2017-07-061-1/+1
| | | | reporting (bug 1352669).
* Auto merge of #17481 - jryans:move-rule-node, r=bholleybors-servo2017-06-221-4/+4
|\ | | | | | | | | | | | | | | | | | | | | 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 -->
| * Shrink ElementData by moving pseudo count to typeJ. Ryan Stinnett2017-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | `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
| * Move match and cascade temporaries to CurrentElementInfoJ. Ryan Stinnett2017-06-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Bump cssparser version to 0.16.1 in toml filesNazım Can Altınova2017-06-221-1/+1
|/
* Remove Option wrapper from RuleNode's StyleSource to save one word, addBrian Lewis2017-06-191-1/+1
| | | | | a None variant to StyleSource as an indicator for a lack of style source, and refactor all uses with this new form
* Reuse the prev_sibling slot for free_count to save a word.Bobby Holley2017-06-161-1/+1
| | | | MozReview-Commit-ID: 9jVkDM4P8mC
* Upgrade cssparser to 0.15Simon Sapin2017-06-161-1/+1
|
* Bump serde to 1.0Bastien Orivel2017-06-161-2/+2
|
* style: Inline RestyleData.Emilio Cobos Álvarez2017-06-161-1/+2
| | | | | Bug: 1368236 MozReview-Commit-ID: 49s3SO0PMHf
* Bump euclid to 0.14.Nicolas Silva2017-06-141-1/+1
|
* Add a size_of test for RuleNode.Bobby Holley2017-06-121-1/+5
| | | | MozReview-Commit-ID: Id6iedlK5tg
* Hoist ApplicableDeclaration{Block,List} into a separate file.Bobby Holley2017-06-121-1/+1
| | | | MozReview-Commit-ID: EXnAzfyoZ1e
* Use even fewer bits for source order and shrink ApplicableDeclarationsBlock ↵Bobby Holley2017-06-121-1/+1
| | | | | | by another word. MozReview-Commit-ID: 7B1i1g0HLTj
* Make source_order u32 and shrink Rule.Bobby Holley2017-06-121-1/+1
| | | | MozReview-Commit-ID: AKNTZZqke1O