aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/properties/helpers.mako.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* | Auto merge of #17774 - servo:derive-all-the-things, r=emiliobors-servo2017-07-191-0/+7
|\ \ | |/ |/| | | | | | | | | | | Prepare some code for future derivation 🌊 <!-- 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/17774) <!-- Reviewable:end -->
| * Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zeroAnthony Ramine2017-07-191-0/+7
| |
* | style: Cleanup most of the Inner mess.Emilio Cobos Álvarez2017-07-181-3/+3
|/ | | | MozReview-Commit-ID: Ieg2GJT0yUl
* stylo: Use ComputedValuesInner instead of ComputedValues when we don't need itManish Goregaokar2017-07-171-3/+3
|
* Merge per-property substitute_variables* functions into one.Simon Sapin2017-07-131-95/+86
|
* Fix shorthand parsing pushing declarations when parse_entirely returns ErrSimon Sapin2017-07-131-1/+1
|
* var() functions in longhands: use a single code path with IDsSimon Sapin2017-07-131-20/+1
| | | | … rather than generating similar code for every longhand property
* var() functions in shorthands: use a single code path with IDsSimon Sapin2017-07-131-34/+7
| | | | … rather than generating similar code for each shorthand.
* CSS-wide keywords parsing in longhands: use a single code path with IDsSimon Sapin2017-07-131-24/+19
| | | | … rather than generating similar code for every longhand property.
* Serialize font longhands to -moz-use-system-font when using system font like ↵Xidorn Quan2017-07-111-12/+1
| | | | what Gecko does.
* stylo: Create error reporters linked to documents (bug 1352669)Josh Matthews2017-07-101-5/+3
|
* Kill delegate_animate from vector_longhandAnthony Ramine2017-07-051-4/+3
| | | | The impl is now always generated if animation_value_type is ComputedValue.
* Kill gecko_only from vector_longhandAnthony Ramine2017-07-051-163/+156
|
* Handle prefixed value of -moz-user-select properlyXidorn Quan2017-06-291-1/+1
|
* Use the Separator trait for the filter propertyAnthony Ramine2017-06-271-3/+3
|
* Don't use SmallVec<[T; 1]> for computed values with an empty defaultAnthony Ramine2017-06-271-2/+17
|
* Change space_separated_allowed into separatorAnthony Ramine2017-06-271-8/+2
|
* Introduce CommaWithSpaceAnthony Ramine2017-06-271-5/+4
| | | | | This allows us to support stroke-dasharray the same way as comma-separated values.
* Auto merge of #17469 - nox:empty-vs-initial, r=emiliobors-servo2017-06-231-3/+7
|\ | | | | | | | | | | | | | | Distinguish the emptiness of a property from its initial value <!-- 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/17469) <!-- Reviewable:end -->
| * Distinguish the emptiness of a property from its initial valueAnthony Ramine2017-06-231-3/+7
| |
* | Pass some 48-bytes closures by references instead of by value.Simon Sapin2017-06-221-1/+1
|/
* Untry styleSimon Sapin2017-06-181-12/+12
|
* Derive ToCss for some shorthand propertiesAnthony Ramine2017-06-171-2/+8
|
* Resolve counter style during parallel traversal when possible.Xidorn Quan2017-06-141-1/+4
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-26/+39
|
* Derive the most trivial ToCss implementations 🌋Anthony Ramine2017-06-041-9/+1
| | | | | For now, all variants get serialised as the space-separated serialisations of their fields. Unit variants are not supported.
* Auto merge of #17071 - servo:derive-all-the-things, r=emiliobors-servo2017-05-301-2/+2
|\ | | | | | | | | | | | | | | Reuse Rect<T> some more <!-- 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/17071) <!-- Reviewable:end -->
| * Make Rect<T> a struct tupleAnthony Ramine2017-05-281-2/+2
| | | | | | | | | | It makes no sense to have named fields in some cases, notably to reuse Rect<T> in BorderRadius<T>.
* | Set flex-basis to 0% when omitted in flex shorthand.Xidorn Quan2017-05-301-3/+8
|/
* Remove uses of parse_four_sides and serialize_four_sidesAnthony Ramine2017-05-251-14/+13
|
* Auto merge of #16962 - hiikezoe:prefixed-intrinsic-size-value, r=Manishearthselectors-v0.18.0bors-servo2017-05-221-0/+101
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefixed intrinsic size value <!-- Please describe your changes on the following line: --> This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1355402 - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16788 - [X] These changes do not require tests because it's for stylo <!-- 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/16962) <!-- Reviewable:end -->
| * Support prefixed intrinsic size value for flex-basis.Hiroyuki Ikezoe2017-05-211-0/+17
| | | | | | | | auto() and zero() are used in the parser for flex shorthand property.
| * Support prefixed intrinsic size value for {width,height,{inline,block}-size}}.Hiroyuki Ikezoe2017-05-211-1/+1
| |
| * Factor out implemantations for {min,max} size properties as a macro.Hiroyuki Ikezoe2017-05-211-0/+84
| |
* | Remove style::values::HasViewportPercentage reexportAnthony Ramine2017-05-201-1/+1
|/
* Auto merge of #16960 - servo:derive-all-the-things, r=emiliobors-servo2017-05-201-12/+26
|\ | | | | | | | | | | | | | | Derive HasViewportPercentage 🍷 <!-- 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/16960) <!-- Reviewable:end -->
| * Remove a lot of unused importsAnthony Ramine2017-05-201-4/+25
| |
| * Derive HasViewportPercentage 🍷Anthony Ramine2017-05-201-8/+1
| |
* | Avoid returning / passing around a huge ParsedDeclaration typeSimon Sapin2017-05-191-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enum type used to contain the result of parsing one CSS source declaration (`name: value;`) and expanding shorthands. Enum types are as big as the biggest of their variant (plus discriminant), which was quite big because some shorthands expand to many longhand properties. This type was returned through many functions and methods, wrapped and rewrapped in `Result` with different error types. This presumably caused significant `memmove` traffic. Instead, we now allocate an `ArrayVec` on the stack and pass `&mut` references to it for various functions to push into it. This type is also very big, but we never move it. We still use an intermediate data structure because we sometimes decide after shorthand expansion that a declaration is invalid after all and that we’re gonna drop it. Only later do we push to a `PropertyDeclarationBlock`, with an entire `ArrayVec` or nothing. In future work we can try to avoid a large stack-allocated array, and instead writing directly to the heap allocation of the `Vec` inside `PropertyDeclarationBlock`. However this is tricky: we need to preserve this "all or nothing" aspect of parsing one source declaration, and at the same time we want to make it as little error-prone as possible for the various call sites. `PropertyDeclarationBlock` curently does property deduplication incrementally: as each `PropertyDeclaration` is pushed, we check if an existing declaration of the same property exists and if so overwrite it. To get rid of the stack allocated array we’d need to somehow deduplicate separately after pushing multiple `PropertyDeclaration`.
* | Box large components of Longhands structs.Simon Sapin2017-05-191-3/+11
|/
* Add add() method to Animatable interfaceBrian Birtles2017-05-151-0/+4
|
* Rewrite interpolate() in terms of a more general add_weighted() functionBrian Birtles2017-05-151-6/+8
| | | | | Generalizing the procedure like this will allow us to re-use it for addition of most types.
* Merge ComputeDistance trait into Animatable traitBrian Birtles2017-05-101-9/+0
|
* Rename the Interpolate trait to AnimatableBrian Birtles2017-05-101-5/+5
|
* Allow vector properties to be set by iteratorManish Goregaokar2017-05-041-14/+37
|
* Add iterators for vector typesManish Goregaokar2017-05-041-2/+12
| | | | MozReview-Commit-ID: I7oOpYhVP5S
* Stylo: Implement {specified|computed}::LayerImage.cku2017-05-031-1/+1
|
* Use StyleArc in the style system.Bobby Holley2017-05-021-2/+2
| | | | MozReview-Commit-ID: flF0fv9E9M
* Auto merge of #16663 - emilio:style-builder, r=bholleybors-servo2017-04-301-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade. This should fix most of the complaints that caused https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a bunch of other FIXMEs across the style system. <!-- 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/16663) <!-- Reviewable:end -->
| * style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the ↵Emilio Cobos Álvarez2017-04-301-1/+1
| | | | | | | | | | | | | | | | cascade. This should fix most of the complaints that caused https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a bunch of other FIXMEs across the style system.