Auto merge of #9722 - mbrubeck:slow-selector, r=nox

Dirty elements whose selectors are affected by sibling changes

This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc.  Fixes #8191 and other intermittent layout bugs.

This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134

Depends on servo/rust-selectors#71. r? @SimonSapin

There are a couple of TODO items in this commit, but I'd appreciate feedback on the general approach before I finish it up.  (Also, if someone who knows more than I do could give some advice about atomic orderings...)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9722)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-02-24 18:55:39 +05:30
commit 438b3a444b
14 changed files with 145 additions and 47 deletions

View file

@ -39,9 +39,9 @@ macro_rules! sizeof_checker (
// Update the sizes here
sizeof_checker!(size_event_target, EventTarget, 40);
sizeof_checker!(size_node, Node, 160);
sizeof_checker!(size_element, Element, 304);
sizeof_checker!(size_htmlelement, HTMLElement, 320);
sizeof_checker!(size_div, HTMLDivElement, 320);
sizeof_checker!(size_span, HTMLSpanElement, 320);
sizeof_checker!(size_element, Element, 312);
sizeof_checker!(size_htmlelement, HTMLElement, 328);
sizeof_checker!(size_div, HTMLDivElement, 328);
sizeof_checker!(size_span, HTMLSpanElement, 328);
sizeof_checker!(size_text, Text, 192);
sizeof_checker!(size_characterdata, CharacterData, 192);

View file

@ -1,3 +0,0 @@
[transform-stacking-003.htm]
type: reftest
disabled: https://github.com/servo/servo/issues/9303

View file

@ -1,3 +0,0 @@
[transform-stacking-004.htm]
type: reftest
disabled: https://github.com/servo/servo/issues/9448

View file

@ -1,3 +0,0 @@
[last_of_type_pseudo_a.html]
type: reftest
disabled: https://github.com/servo/servo/issues/8191

View file

@ -1,3 +0,0 @@
[nth_last_of_type_pseudo_a.html]
type: reftest
disabled: https://github.com/servo/servo/issues/9063