Auto merge of #16205 - bzbarsky:fix-pseudo-preshints, r=Manishearth

Presentation hints should not get applied to pseudo-elements.

Servo side of https://bugzilla.mozilla.org/show_bug.cgi?id=1352464

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/16205)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-31 11:05:50 -05:00 committed by GitHub
commit bb4ea82b23

View file

@ -622,6 +622,7 @@ impl Stylist {
CascadeLevel::UANormal);
debug!("UA normal: {:?}", relations);
if pseudo_element.is_none() {
// Step 2: Presentational hints.
let length_before_preshints = applicable_declarations.len();
element.synthesize_presentational_hints_for_legacy_attributes(applicable_declarations);
@ -635,6 +636,7 @@ impl Stylist {
relations |= AFFECTED_BY_PRESENTATIONAL_HINTS;
}
debug!("preshints: {:?}", relations);
}
if element.matches_user_and_author_rules() {
// Step 3: User and author normal rules.