aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/macros.rs
Commit message (Collapse)AuthorAgeFilesLines
* style: Add a ValueInfo trait for exposing types needed by devtools.Xidorn Quan2018-04-291-2/+3
| | | | | | | | | | | | Most of types just derive it using proc_macro directly. Some of value types need manual impl. In my current plan, this new trait will be used in bug 1434130 to expose values as well. Bug: 1455576 Reviewed-by: emilio MozReview-Commit-ID: LI7fy45VkRw
* Fix error name in comment for try_match_ident_ignore_ascii_caseJonathan Watt2018-04-171-1/+1
|
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-10/+13
| | | | | | | | | | 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)
* Kill AnimatedValueAsComputedAnthony Ramine2018-02-101-4/+2
|
* Don't use define_css_keyword_enum in style anymoreAnthony Ramine2018-02-011-22/+0
|
* Kill define_numbered_css_keyword_enumAnthony Ramine2018-02-011-39/+0
|
* style: make the try_match_ident_ignore_ascii_case macro actually return the ↵Emilio Cobos Álvarez2018-01-241-9/+6
| | | | | | error. This allows it to be used as an expression, which I'd like to do very soon.
* Change ToCss to take a CssWriter<W>Anthony Ramine2018-01-231-2/+5
| | | | | | This more concrete wrapper type can write a prefix the very first time something is written to it. This allows removing plenty of useless monomorphisations caused by the former W/SequenceWriter<W> pair of types.
* style: Move font-variant-numeric outside of makoCYBAI2017-11-181-0/+17
|
* Auto merge of #19220 - CYBAI:font-variant-east-asian-out-of-mako, r=emiliobors-servo2017-11-151-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style: Move font-variant-east-asian outside of mako This is a sub-PR of #19015 r? emilio --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19216 - [x] These changes do not require tests <!-- 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/19220) <!-- Reviewable:end -->
| * style: Move font-variant-east-asian outside of makoCYBAI2017-11-151-0/+10
| |
* | Move text-decoration-line out of makoKeith Yeung2017-11-141-0/+17
|/
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-101-5/+8
|
* Measure PropertyDeclaration more thoroughly.Nicholas Nethercote2017-09-141-0/+2
| | | | | | | | | | | | | | | This patch replaces the handwritten MallocSizeOf implementation for PropertyDeclaration with a derived one, which gives much more thorough measurement. This requires (a) deriving MallocSizeOf for a *lot* of additional types (most of which already have `derive(HeapSizeOf)` in Servo builds), and (b) implementing MallocSizeOf for a few more types in the `malloc_size_of` crate. These changes would significantly improve the reporting coverage for gmail if it weren't for the fact that SpecifiedUrl isn't measured due to a lack of clarity about its fields; that can be fixed as a follow-up once bug 1397971 has landed.
* Do not use CVAS for specified::AttrAnthony Ramine2017-09-111-1/+1
|
* style: Unify the trivial ToComputedValue implementations, and add impls for i32.Emilio Cobos Álvarez2017-09-111-2/+0
|
* style: Use derive for -x-span.Emilio Cobos Álvarez2017-09-111-11/+19
|
* style: Derive ToComputedValue for keyword types.Emilio Cobos Álvarez2017-09-111-2/+1
|
* style: Manually expand ComputedValueAsSpecified in the keyword macros.Emilio Cobos Álvarez2017-09-111-2/+12
|
* style: Minor reformatting in macros.rsEmilio Cobos Álvarez2017-09-111-11/+14
|
* Replace some more uses of `write!` in components/styleSimon Sapin2017-09-041-1/+1
|
* style: Remove HasViewportPercentage.Emilio Cobos Álvarez2017-08-291-5/+2
| | | | It's not needed since #18268
* Derive the most trivial Animate implsAnthony Ramine2017-08-221-12/+2
|
* Derive the most trivial ToAnimatedZero implsAnthony Ramine2017-08-221-6/+1
|
* Introduce values::animated::AnimateAnthony Ramine2017-08-221-3/+6
| | | | This replaces the Animatable trait and merges its three former methods into a single one.
* Derive ComputeSquaredDistanceAnthony Ramine2017-08-131-11/+1
|
* Introduce ComputeSquaredDistanceAnthony Ramine2017-08-131-0/+10
| | | | | This allows us to merge the former Animatable methods compute_distance and compute_squared_distance, reducing code size.
* Update cssparser to 0.18Simon Sapin2017-07-241-1/+1
| | | | https://github.com/servo/rust-cssparser/pull/171
* Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zeroAnthony Ramine2017-07-191-0/+5
|
* Introduce ToAnimatedValue 🎥Anthony Ramine2017-06-291-0/+1
|
* Derive ToCss for keyword structsAnthony Ramine2017-06-171-8/+2
|
* style: Reduce some code duplication and ugliness when parsing identifiers.Emilio Cobos Álvarez2017-06-111-4/+20
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-10/+13
|
* Derive HasViewportPercentage 🍷Anthony Ramine2017-05-201-13/+0
|
* Move some style macros into their own module, used firstAnthony Ramine2017-05-181-0/+115