servo/components/style
bors-servo 6c08c570bf Auto merge of #11399 - heycam:parent-style, r=pcwalton
Look past restyle root for parent node when restyling.

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because existing tests should be sufficient

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

----

Currently when traversing a the tree to restyle, we look at whether a
given element to restyle is the root.  This seems to always be the root
of the entire document, since we start our processing from the top.  If
the current element being restyled is the root of the restyle, then we
use None as the parent node for restyling purposes.

In stylo we want to invoke restyling starting from an arbitrary node in
the document, not just the root of the document, so this change looks
for the parent element regardless of whether we're at the root of the
restyle.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11399)
<!-- Reviewable:end -->
2016-05-25 15:36:51 -05:00
..
properties Auto merge of #11401 - heycam:moz-box, r=mbrubeck 2016-05-25 13:49:23 -05:00
animation.rs Move width and height from Box to Position. 2016-05-04 11:06:42 +10:00
attr.rs Parse HTMLInputElement attributes 2016-05-24 10:12:18 -04:00
bezier.rs Move util::bezier to style 2016-02-14 19:45:24 +01:00
build.rs Explicitly list inputs to the style crate's build script 2016-05-11 10:46:33 -07:00
Cargo.toml Bump string-cache to 0.2.18 2016-05-25 14:35:36 +05:30
context.rs style: Allow inheritance when computing anonymous box styles 2016-04-29 22:54:46 +02:00
custom_properties.rs Report memory usage from LayoutThreadData Stylist [#7038] 2016-03-19 11:53:13 -07:00
data.rs layout: Stop storing PrecomputedStyleData in LayoutNode 2016-04-29 22:54:48 +02:00
dom.rs style: layout: Allow a lazy pseudo-element implementation in Servo. 2016-05-04 00:33:58 +02:00
element_state.rs Upgrade to bitflags 0.6.0 and selectors 0.5.6 2016-04-30 10:14:03 -07:00
error_reporting.rs Hoist ParseErrorReporter into style and remove the dependency on msg. 2016-01-11 18:01:48 -08:00
font_face.rs Removed unused imports 2016-05-15 22:24:26 +03:00
lib.rs Pass Gecko sheet base/referrer/principal from Servo_StylesheetFromUTF8Bytes through ParserContext. 2016-05-24 12:12:17 +10:00
logical_geometry.rs Upgrade to bitflags 0.6.0 and selectors 0.5.6 2016-04-30 10:14:03 -07:00
matching.rs Add string_cache override for geckolib based on gecko atoms. 2016-05-18 11:33:38 -07:00
media_queries.rs Removed unused imports 2016-05-15 22:24:26 +03:00
parallel.rs Remove lifetimes from T{Node,Element,Document}. 2016-03-14 14:31:57 -07:00
parser.rs Pass Gecko sheet base/referrer/principal from Servo_StylesheetFromUTF8Bytes through ParserContext. 2016-05-24 12:12:17 +10:00
README.md docs: Add style overview. 2016-05-04 00:34:03 +02:00
restyle_hints.rs Add string_cache override for geckolib based on gecko atoms. 2016-05-18 11:33:38 -07:00
selector_impl.rs style: Minor documentation tweaks about lazy pseudo-elements 2016-05-04 00:34:00 +02:00
selector_matching.rs Add an extra data field to ParserContext. 2016-05-24 12:12:10 +10:00
sequential.rs Remove lifetimes from T{Node,Element,Document}. 2016-03-14 14:31:57 -07:00
servo.rs layout: Stop storing PrecomputedStyleData in LayoutNode 2016-04-29 22:54:48 +02:00
stylesheets.rs Add an extra data field to ParserContext. 2016-05-24 12:12:10 +10:00
traversal.rs Look past restyle root for parent node when restyling. 2016-05-25 11:52:42 +10:00
values.rs Re-use Url serialization in values::specified::Image. 2016-05-24 12:12:39 +10:00
viewport.rs Removed unused imports 2016-05-15 22:24:26 +03:00

servo-style

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