Auto merge of #18041 - bzbarsky:add-wrapper-anon-boxes, r=heycam

Stylo's atom generation needs to deal with wrapper anon boxes.

<!-- 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: -->
- [] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1388625

<!-- 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. -->
This commit is contained in:
bors-servo 2017-08-10 23:09:51 -05:00 committed by GitHub
commit c811a1aa77

View file

@ -55,7 +55,7 @@ class CSSPseudoElementsAtomSource:
class CSSAnonBoxesAtomSource: class CSSAnonBoxesAtomSource:
PATTERN = re.compile('^(CSS_ANON_BOX|CSS_NON_INHERITING_ANON_BOX)\((.+),\s*"(.*)"\)') PATTERN = re.compile('^(CSS_ANON_BOX|CSS_NON_INHERITING_ANON_BOX|CSS_WRAPPER_ANON_BOX)\((.+),\s*"(.*)"\)')
FILE = "include/nsCSSAnonBoxList.h" FILE = "include/nsCSSAnonBoxList.h"
CLASS = "nsCSSAnonBoxes" CLASS = "nsCSSAnonBoxes"
TYPE = "nsICSSAnonBoxPseudo" TYPE = "nsICSSAnonBoxPseudo"
@ -110,7 +110,8 @@ class Atom:
return self.macro == "CSS_NON_INHERITING_ANON_BOX" return self.macro == "CSS_NON_INHERITING_ANON_BOX"
def is_inheriting_anon_box(self): def is_inheriting_anon_box(self):
return self.macro == "CSS_ANON_BOX" return (self.macro == "CSS_ANON_BOX" or
self.macro == "CSS_WRAPPER_ANON_BOX")
def is_tree_pseudo_element(self): def is_tree_pseudo_element(self):
return self.value.startswith(":-moz-tree-") return self.value.startswith(":-moz-tree-")