aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/servo/restyle_damage.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-269/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* Ensure reflow damage is calculated when hypothetical box changes.Josh Matthews2022-03-141-1/+2
|
* style: Speed up custom property diffing.Emilio Cobos Álvarez2021-02-261-1/+1
| | | | | | | | | | | | | | | When entering or leaving fullscreen in youtube, we spend most of the restyle time diffing custom properties, under IndexMap::eq. Turns out that IndexMap equality is not order-aware, and thus you actually need to make a hashmap lookup for each entry in the map, which is unnecessarily inefficient. Instead, just compare the iterators. See https://github.com/bluss/indexmap/issues/153. Differential Revision: https://phabricator.services.mozilla.com/D89434
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-3/+3
|
* Replace http with https in docsJan Andre Ikenmeyer2018-11-061-1/+1
|
* Format style component.chansuke2018-09-091-23/+29
|
* Silence an 'unused' warningSimon Sapin2018-05-041-1/+2
|
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-51/+93
| | | | | | | | | | 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)
* Autogenerate compute_damage (fixes #10622)Manish Goregaokar2018-02-091-107/+20
|
* style: Remove -servo-text-decorations-in-effect.Emilio Cobos Álvarez2018-01-141-1/+1
| | | | | | | | | | | | | | It is bogus, because it depends on the display property as it's cascaded, but the display property can change afterwards, for example, if we get blockified because we're the root element or a flex item. Replace it with a normal field instead. Also, it carries some weight, because it's the last property that uses this concept of "derived" property, and "custom cascade". So we can remove some code after this. Compute it after the cascade process in StyleAdjuster.
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-2/+2
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* style: Remove quite useless StyleChange constructor.Emilio Cobos Álvarez2017-11-271-1/+1
|
* style: Remove redundant deny().Emilio Cobos Álvarez2017-11-271-2/+0
|
* style: Prefer doc comments to #[doc] annotations.Emilio Cobos Álvarez2017-11-271-20/+26
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-39/+49
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-49/+39
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-39/+49
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* style: Avoid being so Arc-happy in the custom properties code.Emilio Cobos Álvarez2017-10-011-1/+1
|
* style: Kill -servo-under-display-none.Emilio Cobos Álvarez2017-09-171-1/+0
| | | | Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Stop the cascade when only reset structs change.Emilio Cobos Álvarez2017-09-061-1/+8
| | | | | | | Bug: 1395227 Reviewed-by: heycam MozReview-Commit-ID: JCZJl2fmtJ9 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* stylo: Remove a lot of the restyle damage related complexity.Emilio Cobos Álvarez2017-08-201-15/+4
| | | | | | | | | | The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
* stylo: Remove some unused FFI functions.Emilio Cobos Álvarez2017-08-151-5/+0
| | | | | | Bug: 1390650 Reviewed-by: bholley MozReview-Commit-ID: K9fXGRmgkr4
* style: Ensure we generate a ReconstructFrame hint when -moz-binding changes ↵Cameron McCormack2017-07-251-0/+11
| | | | on a display:none root.
* Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be ↵Emilio Cobos Álvarez2017-07-201-1/+2
| | | | | | | | backed out." This reverts commit b96d96d448c8ff93f212f225013461999540a5d0. The fix on the Gecko side is trivial, and I can land it after this lands.
* Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. ↵Gecko Backout2017-07-201-2/+1
| | | | | | r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/17796
* style: Pass old ComputedValues and old cached struct bits to ↵Cameron McCormack2017-07-201-1/+2
| | | | Gecko_CalcStyleDifference.
* stylo: Introduce ComputedValuesInnerManish Goregaokar2017-07-171-5/+5
|
* Implemented paint worklet properties.Alan Jeffrey2017-07-111-10/+8
|
* Reconstruct flows if the 'clear' property changes.Matt Brubeck2017-06-301-1/+1
| | | | | This is necessary because the CLEARS_LEFT and CLEARS_RIGHT flags are set during flow construction.
* Untry styleSimon Sapin2017-06-181-3/+3
|
* style: Propagate changes in custom properties' computed values to descendants.Jonathan Chan2017-06-131-1/+10
| | | | | | | | | | | | | | | | If ComputedValues.custom_properties differs between the old and new ComputedValues, indicate that we have to propogate changes to descendants by setting child_cascade_requirement to MustCascadeDescendants in cascade_primary. style::matching::TElement::cascade_primary already calls accumulate_damage, which eventually calls ServoRestyleDamage::compute_style_difference in order to check if other properties' computed values changed. If any of those change, we signal that we need to propogate changes for inherited properties. With Properties & Values, some custom properties will not be inherited, and we will need to revisit this.
* style: Use RestyleDamage to determine whether we must continue cascading ↵Cameron McCormack2017-05-201-6/+9
| | | | style changes to children.
* style: Refactor the cascade function.Emilio Cobos Álvarez2017-05-171-5/+5
| | | | | The `cascade_primary_or_pseudo` function was nice when we shared more code, but right now I think it just makes it harder to understand what's going on.
* Use StyleArc in the style system.Bobby Holley2017-05-021-1/+1
| | | | MozReview-Commit-ID: flF0fv9E9M
* Make font-variant shorthand.Hiroyuki Ikezoe2017-04-141-1/+1
|
* Don't serialize initial text-decoration-style #15790projektir2017-03-091-1/+1
|
* Implement "handled for descendants" tracking for RestyleDamage.Bobby Holley2017-02-171-0/+19
| | | | MozReview-Commit-ID: Bbk99ogILXC
* Convert text-orientation to a Gecko-only propertyMatt Brubeck2017-01-271-1/+0
| | | | | | Remove incomplete and buggy support for text-orientation in Servo. Make the property values align with Gecko and the latest draft of CSS Writing Modes Level 3.
* style: Document the restyle_damage module.Emilio Cobos Álvarez2017-01-021-6/+9
|
* Move transform related properties from effects to box.Nazım Can Altınova2016-12-261-1/+1
|
* Move perspective and perspective-origin properties from effects to box.Nazım Can Altınova2016-12-231-1/+1
|
* Make background-position a shorthand instead of a longhandNazım Can Altınova2016-12-151-4/+4
|
* Make Restyle tracking more granular.Bobby Holley2016-12-091-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The primary idea of this patch is to ditch the rigid enum of Previous/Current styles, and replace it with a series of indicators for the various types of work that needs to be performed (expanding snapshots, rematching, recascading, and damage processing). This loses us a little bit of sanity checking (since the up-to-date-ness of our style is no longer baked into the type system), but gives us a lot more flexibility that we'll need going forward (especially when we separate matching from cascading). We also eliminate get_styling_mode in favor of a method on the traversal. This patch does a few other things as ridealongs: * Temporarily eliminates the handling for transfering ownership of styles to the frame. We'll need this again at some point, but for now it's causing too much complexity for a half-implemented feature. * Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is a constant source of compilation failures from either needing to be imported or being unnecessarily imported (which varies between gecko and servo). * Expands Snapshots for the traversal root, which was missing before. * Fixes up the skip_root stuff to avoid visiting the skipped root. * Unifies parallel traversal and avoids spawning for a single work item. * Adds an explicit pre_traverse step do any pre-processing and determine whether we need to traverse at all. MozReview-Commit-ID: IKhLAkAigXE
* Expand the role of modified_elements to include explicit restyle hints and ↵Bobby Holley2016-11-151-0/+5
| | | | | | damage. This will take the place of setting IS_DIRTY and HAS_CHANGED.
* stylo: support transformManish Goregaokar2016-11-101-1/+1
|
* Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-0/+267
MozReview-Commit-ID: LfaZFCVlIb1