Bug 1375674: Don't use the owner's changes handled for the backdrop frame. r=heycam
MozReview-Commit-ID: GpIQwqge8L
This commit is contained in:
@@ -275,7 +275,9 @@ FindFirstLetterFrameForElement(const Element* aElement)
|
||||
}
|
||||
|
||||
static void
|
||||
UpdateBackdropIfNeeded(nsIFrame* aFrame, ServoRestyleState& aRestyleState)
|
||||
UpdateBackdropIfNeeded(nsIFrame* aFrame,
|
||||
ServoStyleSet& aStyleSet,
|
||||
nsStyleChangeList& aChangeList)
|
||||
{
|
||||
const nsStyleDisplay* display = aFrame->StyleContext()->StyleDisplay();
|
||||
if (display->mTopLayer != NS_STYLE_TOP_LAYER_TOP) {
|
||||
@@ -300,14 +302,16 @@ UpdateBackdropIfNeeded(nsIFrame* aFrame, ServoRestyleState& aRestyleState)
|
||||
CSSPseudoElementType::backdrop);
|
||||
|
||||
RefPtr<nsStyleContext> newContext =
|
||||
aRestyleState.StyleSet().ResolvePseudoElementStyle(
|
||||
aFrame->GetContent()->AsElement(),
|
||||
CSSPseudoElementType::backdrop,
|
||||
aFrame->StyleContext(),
|
||||
/* aPseudoElement = */ nullptr);
|
||||
aStyleSet.ResolvePseudoElementStyle(aFrame->GetContent()->AsElement(),
|
||||
CSSPseudoElementType::backdrop,
|
||||
aFrame->StyleContext(),
|
||||
/* aPseudoElement = */ nullptr);
|
||||
|
||||
aFrame->UpdateStyleOfOwnedChildFrame(
|
||||
backdropFrame, newContext, aRestyleState);
|
||||
// NOTE(emilio): We can't use the changes handled for the owner of the
|
||||
// backdrop frame, since it's out of flow, and parented to the viewport frame.
|
||||
MOZ_ASSERT(backdropFrame->GetParent()->IsViewportFrame());
|
||||
ServoRestyleState state(aStyleSet, aChangeList);
|
||||
aFrame->UpdateStyleOfOwnedChildFrame(backdropFrame, newContext, state);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -318,7 +322,8 @@ UpdateFramePseudoElementStyles(nsIFrame* aFrame,
|
||||
static_cast<nsBlockFrame*>(aFrame)->UpdatePseudoElementStyles(aRestyleState);
|
||||
}
|
||||
|
||||
UpdateBackdropIfNeeded(aFrame, aRestyleState);
|
||||
UpdateBackdropIfNeeded(
|
||||
aFrame, aRestyleState.StyleSet(), aRestyleState.ChangeList());
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user