Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement state-based restyle hints #8274
Conversation
highfive
commented
Oct 30, 2015
|
Looks good overall; just had a few minor nits. |
|
|
534c936
to
f346632
|
r? @pcwalton |
| /// the selector matching logic. This only works for boolean states though, so we still need to | ||
| /// take the ElementWrapper approach for attribute-dependent style. So we do it the same both ways for | ||
| /// now to reduce complexity, but it's worth measuring the performance impact (if any) of the | ||
| /// mStateMask approach. |
This comment has been minimized.
This comment has been minimized.
bholley
Oct 31, 2015
Author
Contributor
@SimonSapin Just FYI here - after discussing with @bzbarsky, we decided to try using the ElementWrapper approach for state restyle hints, which may remove the need to have ElementState in rust-selectors (see the comment above). I think it'd be good to leave it there for the time being though, so that we can try it both ways at some point and measure.
This comment has been minimized.
This comment has been minimized.
SimonSapin
Nov 3, 2015
Member
@bholley I don’t mind having ElementState in rust-selectors. (servo/rust-selectors#56 adressed the concern I had.) Feel free to move it back later if you want.
|
@bors-servo try |
Implement state-based restyle hints <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8274) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Implement state-based restyle hints <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8274) <!-- Reviewable:end -->
|
This looks good to me. r=me when try passes |
|
|
|
|
|
@bors-servo r=pcwalton |
|
|
Implement state-based restyle hints <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8274) <!-- Reviewable:end -->
|
|
|
@bors-servo retry #7791 |
Implement state-based restyle hints <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8274) <!-- Reviewable:end -->
|
|
|
\o/ |
| } | ||
| } | ||
|
|
||
| impl<E> Element for ElementWrapper<E> where E: Element { |
This comment has been minimized.
This comment has been minimized.
SimonSapin
Nov 3, 2015
Member
It’s slightly unfortunate to have a third implementation of this trait where I’d prefer just one (there’s a small risk their behavior will diverge) but oh well.
bholley commentedOct 30, 2015