aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/animation.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Change device and rule_set references to accessorsheyzoos2017-05-181-1/+1
|
* Root nodes for the duration of their CSS transitions.Josh Matthews2017-05-151-9/+17
| | | | | | | | This ensures that we can pass a node address as part of the asynchronous transition end notification, making it safe to fire the corresponding DOM event on the node from the script thread. Without explicitly rooting this node when the transition starts, we risk the node being GCed before the transition is complete.
* style: Slim down SharedStyleContext.Emilio Cobos Álvarez2017-05-111-0/+2
| | | | | | | | | | | This slims down SharedStyleContext, in preparation for a few things. First, I would like to eventually move the stylist to the document in Servo, in order for it to hold the StyleSheetSet. Also, this gets rid of a fair amount of overhead while creating it in stylo. Fixes bug 1363245.
* Use StyleArc in the style system.Bobby Holley2017-05-021-1/+1
| | | | MozReview-Commit-ID: flF0fv9E9M
* Auto merge of #16640 - hiikezoe:timing-function, r=xidornbors-servo2017-04-281-5/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FunctionKeyword for computed_value of timing function <!-- Please describe your changes on the following line: --> https://bugzilla.mozilla.org/show_bug.cgi?id=1358330 --- <!-- 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 #15086 <!-- Either: --> - [X] These changes do not require tests because mozilla-central has test cases. There might be some test cases in servo tree. <!-- 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/16640) <!-- Reviewable:end -->
| * Use FunctionKeyword for computed_value of timing-function as well.Hiroyuki Ikezoe2017-04-281-5/+13
| |
* | Bug 1360508: Adjust text-combine properly. r=jryansEmilio Cobos Álvarez2017-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Text style is always resolved via ServoStyleSet::ResolveStyleForText, either from the frame constructor initially, or from ServoRestyleManager::ProcessPostTraversalForText. So text-only adjustments should go there instead. Since that doesn't call into cascade(), all the code that passes `pseudo` there is dead code we can remove. MozReview-Commit-ID: jpbBYpLlUL Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* | Auto merge of #16609 - nox:quirks, r=Manishearth,emiliobors-servo2017-04-271-1/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Implement unitless length quirk The Gecko side doesn't propagate its quirks mode yet. <!-- 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/16609) <!-- Reviewable:end -->
| * Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-1/+2
| | | | | | | | The quirks mode is still not properly propagated in geckolib.
* | Port text-combine-upright writing mode fixup to ServoJ. Ryan Stinnett2017-04-271-0/+1
| | | | | | | | | | | | | | | | Ports the Gecko fixup for text-combine-upright writing mode to Servo. In addition, this passes the current pseudo element (if any) down to the cascade for use during the fixup process. MozReview-Commit-ID: BkHd4AvSsOt
* | Fix inaccurate input progress in the final animation frame.Boris Chiou2017-04-271-1/+9
| |
* | Add frames into style system and update animation with frames functions.Boris Chiou2017-04-271-0/+8
|/
* Bug 1357357 - Make the parser of transition-property match the spec.Boris Chiou2017-04-261-7/+11
| | | | | | | | | 1. We add a new arm to TransitionProperty, TransitionProperty::Unsupported, which contains an Atom, so it's better to remove the Copy trait from TransitionProperty. 2. TransitionProperty::Unsupported(Atom) represents any non-animatable, custom, or unrecognized property, and we use Atom to store the ident string for serialization.
* Keep custom-ident and string separate in animation/keyframes name.Simon Sapin2017-04-261-6/+13
|
* Use CustomIdent for animation-name and @keyframesSimon Sapin2017-04-261-4/+4
|
* Auto merge of #16527 - BorisChiou:stylo/transition/shorthands, r=emiliobors-servo2017-04-191-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stylo: Bug 1353628 - Support shorthand properties for CSS Transition. These patches add shorthand properties into TransitionProperty, so we can parse the shorthand properties properly and create transitions for them. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix Bug 1353628 - [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/16527) <!-- Reviewable:end -->
| * Bug 1353628 - Part 3: Create PropertyAnimation for shorthands.Boris Chiou2017-04-191-0/+11
| | | | | | | | | | | | Therefore, we can start transitions on shorthand properties properly. MozReview-Commit-ID: Ev2u2tEalnK
* | Fix indentation errors in servo rust code that tidy now finds.coalman2017-04-181-1/+1
|/
* stylo: Store font metrics provider in thread local style contextManish Goregaokar2017-04-091-5/+10
|
* style: Properly track whether <angle> or <time> values came from calc() ↵Emilio Cobos Álvarez2017-03-271-2/+2
| | | | expressions.
* Move all PropertyDeclarationBlock from RwLock<_> to Locked<_>Simon Sapin2017-03-191-1/+1
|
* style: Avoid cloning all over the error reporter.Emilio Cobos Álvarez2017-03-141-1/+1
|
* style: Kill SharedStyleContext::default_computed_values.Emilio Cobos Álvarez2017-03-141-1/+0
| | | | | | | Now that cascade() gets a Device, we can use the default computed values from there to avoid propagating that state all over the place. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Add support for non-standard -moz color keyword values.Matt Brubeck2017-03-141-1/+1
| | | | Closes #15928
* Bug 1303229: Get the proper viewport size for stylo. r=heycamEmilio Cobos Álvarez2017-03-111-1/+1
| | | | | | | | | | At least until we support scrollbars properly, this size is going to be the correct one. I've left a TODO to grab the proper one once we support it. This allows to trivially test viewport units for now. MozReview-Commit-ID: JdaZ6WlZ2C6 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Make PropertyDeclarationBlock fields privateSimon Sapin2017-03-071-2/+2
|
* Bug 1341083: Implement dynamic restyling for display: contents. r=heycamEmilio Cobos Álvarez2017-02-251-0/+1
| | | | | MozReview-Commit-ID: KimTU2j4V4p Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Convert animation-iteration-count longhand into vector_longhandNazım Can Altınova2017-01-081-1/+1
|
* Convert transition-timing-function longhand into vector_longhandNazım Can Altınova2017-01-081-2/+2
|
* Auto merge of #14851 - hiikezoe:float-iteration-count-rebased, r=emiliobors-servo2017-01-051-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | animation-iteration-count property is a number instead of integer. <!-- Please describe your changes on the following line: --> This is a revised PR for #14732. @emilio? --- <!-- 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 <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14851) <!-- Reviewable:end -->
| * animation-iteration-count property is a number instead of integer.Hiroyuki Ikezoe2017-01-051-3/+3
| |
* | Bug 1298588 part 10, servo piece. Pass through useful default styles to ↵Boris Zbarsky2017-01-041-0/+1
|/ | | | apply_declarations(). r=bholley
* style: Document the animations code.Emilio Cobos Álvarez2016-12-311-6/+19
|
* layout: Minor style cleanup.Patrick Walton2016-11-301-1/+3
|
* layout: Don't restart a transition if the end value for the newPatrick Walton2016-11-301-1/+17
| | | | | | | | | | | transition is the same as the end value for a running transition per CSS-TRANSITIONS § 3. Besides being contrary to spec, the old behavior could cause a cascade of CSS transitions incorrectly triggering themselves when calls to `getComputedStyle()` were intermingled with them. Improves performance of nytimes.com.
* Remove usage of keyword_list (and prefer single_keyword)Ravi Shankar2016-11-171-5/+5
|
* style: Refactor and add infrastructure for font metrics in style.Emilio Cobos Álvarez2016-11-131-0/+1
| | | | | | | | | | | This commit itself only moves things around and adds an extra parameter to the `apply_declarations` function to eventually handle #14079 correctly. Probably needs a more granular API to query fonts, á la nsFontMetrics, but that's trivial to do once this is landed. Then we should make the font provider mandatory, and implement the missing stylo bits.
* rule tree: Remove unsound transmute()Simon Sapin2016-11-051-2/+3
| | | | | | | | | | | | | RuleTreeDeclarationsIterator would yield &PropertyDeclaration with the lifetime of the rule tree, but the reference would only be valid as long as the iterator was holding the corresponding lock. The lock would be released when the iterator’s `.next()` method moves to the next rule tree node, or when the iterator is dropped. Also change apply_declaration to not require a `Clone` iterator (since closures unfortunately don’t implement `Clone`). Instead have it take a callable that returns a fresh iterator.
* Concurrent rule tree, v1Emilio Cobos Álvarez2016-11-051-16/+17
| | | | | | | | | | | | This patch introduces infrastructure for the rule tree, and constructs it. We don't use it yet, nor have good heuristics for GC'ing it, but this should not happen anymore once we store the rule node reference in the node. I haven't messed up with memory orders because I want to do a try run with it, then mess with them. Take down the ApplicableDeclarationsCache, use the rule tree for doing the cascade.
* Update to string-cache 0.3Simon Sapin2016-11-031-1/+1
|
* Make style context use parking_lot::RwLockXidorn Quan2016-11-021-2/+2
|
* layout: Add a new cascading mode that inherits all properties, evenPatrick Walton2016-10-261-3/+3
| | | | | | | non-inheritable ones. This works like the `modify_style_for_*` functions and will allow us to easily migrate from them to real cascading.
* Emit TransitionEnd events in the layout thread and process it in the script ↵Keith Yeung2016-10-111-9/+14
| | | | thread
* Use parking_lot::RwLock instead of DOMRefCell for PropertyDeclarationBlockSimon Sapin2016-10-041-1/+1
|
* Reorder `use` statementsUK9922016-09-091-2/+1
|
* Rename DeclarationBlock to ApplicableDeclarationBlockSimon Sapin2016-09-061-2/+2
| | | | Make it more different from PropertyDeclarationBlock
* Merge normal and important declarations in style rules.Simon Sapin2016-08-211-2/+3
| | | | Have a single Vec instead of two. Fix #3426
* Import SelectorMap back from the selectors crate.Simon Sapin2016-08-211-1/+1
| | | | Nobody else uses it, and I want to make breaking changes to it.
* style: Introduce a generic way of gathering information from the cascade, ↵Emilio Cobos Álvarez2016-08-161-0/+1
| | | | and use it for viewport units.
* style: Refactor TRestyleDamage and TNode to accept/provide a "style source"Emilio Cobos Álvarez2016-08-031-14/+5
| | | | | | | | | | In the Gecko case, this style source would be the style context. In the servo case, it will be always the computed values. We could optimise this further in the case of stylo (from three FFI calls to one) if we use an API of the form CalcAndStore(node, new_cv). But that would imply borrowing the data twice from Servo (we also have borrow_data_unchecked fwiw, but...).