Bug 1357869 - Don't assert when we restyle a child provider frame when an ancestor already handled nsChangeHint_ReconstructFrame. r?dbaron
MozReview-Commit-ID: D6mQeyo9zNl
--- a/layout/base/GeckoRestyleManager.cpp
+++ b/layout/base/GeckoRestyleManager.cpp
@@ -1169,19 +1169,26 @@ ElementRestyler::ElementRestyler(ParentC
, mOurA11yNotification(eDontNotify)
, mVisibleKidsOfHiddenElement(aParentRestyler.mVisibleKidsOfHiddenElement)
#endif
#ifdef RESTYLE_LOGGING
, mLoggingDepth(aParentRestyler.mLoggingDepth + 1)
#endif
{
MOZ_ASSERT_IF(mContent, !mContent->IsStyledByServo());
- MOZ_ASSERT(!(mHintsHandledByAncestors & nsChangeHint_ReconstructFrame),
- "why restyle descendants if we are reconstructing the frame for "
- "an ancestor?");
+
+ // We would assert here that we're not restyling a child provider frame if
+ // mHintsHandledByAncestors includes nsChangeHint_ReconstructFrame, but
+ // we do actually do this if the ReconstructFrame hint came from the
+ // RestyleTracker, rather than generated from CalcDifference. (We could
+ // even try to avoid restyling the child provider frame, by returning
+ // early in ElementRestyler::Restyle if we grab out a ReconstructFrame
+ // hint from the RestyleTracker, but it's trickier to verify its correctness
+ // with all of the tree patching that happens currently, so for now we just
+ // skip the assertion.)
}
ElementRestyler::ElementRestyler(nsPresContext* aPresContext,
nsIContent* aContent,
nsStyleChangeList* aChangeList,
nsChangeHint aHintsHandledByAncestors,
RestyleTracker& aRestyleTracker,
nsTArray<nsCSSSelector*>& aSelectorsForDescendants,