Bug 1066911 - Allow eRestyle_Force{,Descendants} in RuleNodeWithReplacement. r=heycam

This is fine since the assertion is just checking that we're not calling
RuleNodeWithReplacement in cases when stronger restyling (i.e.,
restyling that does more work) is needed; the new eRestyle_Force and
eRestyle_ForceDescendants flags control whether we restyle at all.

This probably should have been done in bug 931668 (since bug 996796
landed before bug 931668, although not before the patches were written),
but it doesn't actually show up in our test suite until bug 977991 (or
maybe slightly earlier in bug 1057231 or bug 1058346).
This commit is contained in:
L. David Baron 2014-09-13 06:17:34 -07:00
Родитель c8e9a77bbb
Коммит 4039f06695
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1335,8 +1335,10 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
nsRestyleHint aReplacements) nsRestyleHint aReplacements)
{ {
NS_ABORT_IF_FALSE(!(aReplacements & ~(eRestyle_CSSTransitions | NS_ABORT_IF_FALSE(!(aReplacements & ~(eRestyle_CSSTransitions |
eRestyle_CSSAnimations)), eRestyle_CSSAnimations |
// FIXME: Once bug 931668 lands we'll have a better eRestyle_Force |
eRestyle_ForceDescendants)),
// FIXME: Once bug 979133 lands we'll have a better
// way to print these. // way to print these.
nsPrintfCString("unexpected replacement bits 0x%lX", nsPrintfCString("unexpected replacement bits 0x%lX",
uint32_t(aReplacements)).get()); uint32_t(aReplacements)).get());