Auto merge of #18319 - chenpighead:stylo-fixup-display-for-NAC, r=heycam

Do not skip parent display-based style fixups for NAC that is not a NAC root

Stylo is currently skipping parent display-based style fixups for all NAC,
whereas we probably only want to do this for NAC roots.

In this patch, we ensure that we skip it for NAC roots, and pseudo-elements,
but not other NAC.

---
<!-- 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
- [X] These changes fix [Bug 1359303](https://bugzilla.mozilla.org/show_bug.cgi?id=1359303)

<!-- 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/18319)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-31 03:10:23 -05:00 committed by GitHub
commit cb4ce93429

View file

@ -1171,7 +1171,9 @@ impl<'le> TElement for GeckoElement<'le> {
// level native anonymous content subtree roots, since they're not
// really roots from the style fixup perspective. Checking that we
// are NAC handles both cases.
self.is_native_anonymous()
self.is_native_anonymous() &&
(self.is_root_of_native_anonymous_subtree() ||
self.implemented_pseudo_element().is_some())
}
unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {