зеркало из https://github.com/mozilla/gecko-dev.git
Bug 996796 patch 19 - Avoid reresolution for extra style contexts when the restyle hint is not eRestyle_Self or eRestyle_Subtree. r=heycam
This is part of making reresolution not touch style that it was not asked to touch, so that we can use it for the animation-only restyle.
This commit is contained in:
Родитель
d2fe2e8c79
Коммит
4ff105698b
|
@ -2583,11 +2583,15 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf, nsRestyleHint aRestyleHint)
|
|||
NS_ASSERTION(extraPseudoTag &&
|
||||
extraPseudoTag != nsCSSAnonBoxes::mozNonElement,
|
||||
"extra style context is not pseudo element");
|
||||
if (extraPseudoType == nsCSSPseudoElements::ePseudo_AnonBox) {
|
||||
if (!(aRestyleHint & (eRestyle_Self | eRestyle_Subtree))) {
|
||||
Element* element = extraPseudoType != nsCSSPseudoElements::ePseudo_AnonBox
|
||||
? mContent->AsElement() : nullptr;
|
||||
newExtraContext =
|
||||
styleSet->ReparentStyleContext(oldExtraContext, newContext, element);
|
||||
} else if (extraPseudoType == nsCSSPseudoElements::ePseudo_AnonBox) {
|
||||
newExtraContext = styleSet->ResolveAnonymousBoxStyle(extraPseudoTag,
|
||||
newContext);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Don't expect XUL tree stuff here, since it needs a comparator and
|
||||
// all.
|
||||
NS_ASSERTION(extraPseudoType <
|
||||
|
|
Загрузка…
Ссылка в новой задаче