servo/components/layout
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
..
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
block.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
Cargo.toml Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) 2016-07-26 19:35:51 +02:00
construct.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
context.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
data.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
display_list_builder.rs Auto merge of #12388 - kilobtye:textarea2, r=pcwalton 2016-07-26 08:31:49 -05:00
flex.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
floats.rs layout: Take margins in the inline direction into account when 2016-05-10 17:11:28 -07:00
flow.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
flow_list.rs Added DoubleEndedIterator for MutFlowListIterator 2016-06-17 14:57:41 +01:00
flow_ref.rs Correct the signature of flow_ref::deref_mut. 2016-06-06 15:14:23 +02:00
fragment.rs Auto merge of #12388 - kilobtye:textarea2, r=pcwalton 2016-07-26 08:31:49 -05:00
generated_content.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
incremental.rs Introduce a script_layout_interface crate and move RestyleDamage to it. 2016-06-20 19:02:36 +02:00
inline.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
layout_debug.rs Fragment debug_id u16 only exists in debug, prod will format mem address 2016-06-04 19:19:42 +02: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
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
model.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
multicol.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Move util::workqueue to style 2016-07-04 21:56:09 +02:00
persistent_list.rs Move util::persistent_list to layout 2016-02-20 19:20:38 +01:00
query.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
sequential.rs Store SharedStyleContext in AssignISizes. 2016-06-22 15:02:06 +02:00
table.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
table_caption.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
table_cell.rs Fix table vertical alignment (middle, bottom, not yet baseline) with differing height cells 2016-07-26 13:05:10 +01:00
table_colgroup.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
table_row.rs Fix table vertical alignment (middle, bottom, not yet baseline) with differing height cells 2016-07-26 13:05:10 +01:00
table_rowgroup.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
table_wrapper.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
text.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
traversal.rs style: Avoid propagating the restyle flag all through the dom when a node gets dirty. 2016-07-25 10:50:04 -07:00
webrender_helpers.rs script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
wrapper.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00