Auto merge of #12757 - emilio:stylo, r=bholley,pcwalton

stylo: Stop restyling display: none elements, remove the has_changed hack that made us use ReconstructFrame unconditionally.

<!-- 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

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

r? @bholley

<!-- 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/12757)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-10 21:02:30 -05:00 committed by GitHub
commit 1b2450339c
19 changed files with 543 additions and 180 deletions

View file

@ -47,7 +47,11 @@ impl TRestyleDamage for RestyleDamage {
/// For Servo the style source is always the computed values.
type PreExistingComputedValues = Arc<ServoComputedValues>;
fn compute(old: Option<&Arc<ServoComputedValues>>,
fn empty() -> Self {
RestyleDamage::empty()
}
fn compute(old: &Arc<ServoComputedValues>,
new: &Arc<ServoComputedValues>) -> RestyleDamage {
compute_damage(old, new)
}
@ -150,13 +154,7 @@ macro_rules! add_if_not_equal(
})
);
fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &Arc<ServoComputedValues>) -> RestyleDamage {
let new = &**new;
let old: &ServoComputedValues = match old {
None => return RestyleDamage::rebuild_and_reflow(),
Some(cv) => &**cv,
};
fn compute_damage(old: &ServoComputedValues, new: &ServoComputedValues) -> RestyleDamage {
let mut damage = RestyleDamage::empty();
// This should check every CSS property, as enumerated in the fields of