servo: Merge #18041 - Stylo's atom generation needs to deal with wrapper anon boxes (from bzbarsky:add-wrapper-anon-boxes); r=heycam

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c811a1aa7745c848870af226e249e14baaa4ccc3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 585bc173dd1a11827f705340f637f528903e46ac
This commit is contained in:
Boris Zbarsky 2017-08-10 23:09:51 -05:00
Родитель c49ae5ce3f
Коммит c80f4cf28f
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -55,7 +55,7 @@ class CSSPseudoElementsAtomSource:
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"
CLASS = "nsCSSAnonBoxes"
TYPE = "nsICSSAnonBoxPseudo"
@ -110,7 +110,8 @@ class Atom:
return self.macro == "CSS_NON_INHERITING_ANON_BOX"
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):
return self.value.startswith(":-moz-tree-")