servo/components/style
bors-servo 944d371b8f Auto merge of #12563 - emilio:stylo, r=bholley,jdm,pcwalton
stylo: Improve restyling performance

This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because no geckolib tests yet.

<!-- 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/12563)
<!-- Reviewable:end -->
2016-07-27 17:56:26 -05:00
..
properties Auto merge of #12599 - Manishearth:sync, r=heycam 2016-07-26 10:07:15 -05:00
animation.rs style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
attr.rs style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko. 2016-07-21 14:24:04 -07:00
bezier.rs Move util::bezier to style 2016-02-14 19:45:24 +01:00
build.rs Detect python2.7.exe on windows 2016-07-08 18:50:59 +10:00
cache.rs Move util::cache to style. 2016-07-08 16:44:47 +02:00
Cargo.toml Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) 2016-07-26 19:35:51 +02:00
context.rs style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
custom_properties.rs Some fixes in style 2016-07-12 20:00:24 +05:30
data.rs stylo: Don't traverse the whole dom every restyle, propagate the dirty flag down the DOM. 2016-07-24 12:51:58 -07:00
dom.rs style: Remove a few more unuseful traversals now we can. 2016-07-27 11:14:45 -07:00
element_state.rs Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
error_reporting.rs Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
font_face.rs Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
gecko_conversions.rs Address review comments 2016-07-19 11:29:13 +05:30
gecko_glue.rs Move geckolib/properties.mako.rs to style/properties/gecko.mako.rs 2016-07-20 08:40:22 +02:00
gecko_selector_impl.rs Sync anonymous box list. 2016-07-26 16:32:50 -07:00
gecko_values.rs Make nsStyleUnion sugar use traits 2016-07-21 13:35:47 +05:30
keyframes.rs style: Fix timing-function overriding from the keyframe declaration list. 2016-07-07 16:05:28 -07:00
lib.rs style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
logical_geometry.rs Make the style crate almost build on stable Rust. 2016-06-22 15:44:13 +02:00
matching.rs style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
media_queries.rs Move some unit type definitions to style_traits. 2016-07-11 12:14:27 +02:00
parallel.rs style: Add a comment about pre_process_children_hook. 2016-07-27 11:14:46 -07:00
parser.rs Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
README.md docs: Add style overview. 2016-05-04 00:34:03 +02:00
refcell.rs Add commit hash to be reverted in FIXME comment. 2016-06-23 16:14:33 +02:00
restyle_hints.rs style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko. 2016-07-21 14:24:04 -07:00
selector_impl.rs stylo: Update generated bindings 2016-07-21 14:24:05 -07:00
selector_matching.rs style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko. 2016-07-21 14:24:04 -07:00
sequential.rs stylo: Don't traverse the whole dom every restyle, propagate the dirty flag down the DOM. 2016-07-24 12:51:58 -07:00
servo_selector_impl.rs style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko. 2016-07-21 14:24:04 -07:00
sink.rs Move util::vec::ForgetfulSink to style::sink and simplify it 2016-07-04 16:48:14 +02:00
str.rs Move util::str to style 2016-07-05 10:43:54 +02:00
stylesheets.rs Have a concrete SelectorImpl type everywhere in the style crate. 2016-07-20 08:42:46 +02:00
tid.rs Move util::tid to style 2016-07-05 10:36:38 +02:00
timer.rs style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
traversal.rs style: Remove a few more unuseful traversals now we can. 2016-07-27 11:14:45 -07:00
values.rs Rename ComputedValuesStruct to ComputedValues. 2016-07-20 08:42:45 +02:00
viewport.rs Rename ComputedValuesStruct to ComputedValues. 2016-07-20 08:42:45 +02:00
workqueue.rs Move util::workqueue to style 2016-07-04 21:56:09 +02:00

servo-style

Style system for Servo, using rust-cssparser for parsing.