diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-09-01 02:44:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-01 02:44:36 -0500 |
commit | 57b372ba3bfc8c1c99c541be8d68fac93deb41ca (patch) | |
tree | ff592f6087faf58823ea240ebe26de96cf00babe /components/style/restyle_hints.rs | |
parent | 78baf21c54c954e5ebdea23aff5aa62198709027 (diff) | |
parent | ccb4e958e591bd415e8517d26a6c42672000cbc7 (diff) | |
download | servo-57b372ba3bfc8c1c99c541be8d68fac93deb41ca.tar.gz servo-57b372ba3bfc8c1c99c541be8d68fac93deb41ca.zip |
Auto merge of #13110 - emilio:element-flags, r=SimonSapin
Fix incremental restyling under some circumstances due to our bogus use of ElementFlags.
<!-- 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] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Depends on https://github.com/servo/rust-selectors/pull/98
<!-- 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/13110)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/restyle_hints.rs')
-rw-r--r-- | components/style/restyle_hints.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs index c150f1802dc..2801b17e368 100644 --- a/components/style/restyle_hints.rs +++ b/components/style/restyle_hints.rs @@ -8,8 +8,8 @@ use element_state::*; #[cfg(feature = "servo")] use heapsize::HeapSizeOf; use selector_impl::{ElementExt, TheSelectorImpl, NonTSPseudoClass, AttrValue}; -use selectors::matching::StyleRelations; use selectors::matching::matches_complex_selector; +use selectors::matching::{MatchingReason, StyleRelations}; use selectors::parser::{AttrSelector, Combinator, ComplexSelector, SimpleSelector, SelectorImpl}; use selectors::{Element, MatchAttr}; use std::clone::Clone; @@ -476,10 +476,12 @@ impl DependencySet { if (attrs_changed || state_changes.intersects(dep.sensitivities.states)) && !hint.intersects(dep.hint) { let matched_then = matches_complex_selector(&dep.selector, snapshot, None, - &mut StyleRelations::empty()); + &mut StyleRelations::empty(), + MatchingReason::Other); let matches_now = matches_complex_selector(&dep.selector, element, None, - &mut StyleRelations::empty()); + &mut StyleRelations::empty(), + MatchingReason::Other); if matched_then != matches_now { hint.insert(dep.hint); } |