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
|
static void
|
||||||
UpdateBackdropIfNeeded(nsIFrame* aFrame, ServoRestyleState& aRestyleState)
|
UpdateBackdropIfNeeded(nsIFrame* aFrame,
|
||||||
|
ServoStyleSet& aStyleSet,
|
||||||
|
nsStyleChangeList& aChangeList)
|
||||||
{
|
{
|
||||||
const nsStyleDisplay* display = aFrame->StyleContext()->StyleDisplay();
|
const nsStyleDisplay* display = aFrame->StyleContext()->StyleDisplay();
|
||||||
if (display->mTopLayer != NS_STYLE_TOP_LAYER_TOP) {
|
if (display->mTopLayer != NS_STYLE_TOP_LAYER_TOP) {
|
||||||
@@ -300,14 +302,16 @@ UpdateBackdropIfNeeded(nsIFrame* aFrame, ServoRestyleState& aRestyleState)
|
|||||||
CSSPseudoElementType::backdrop);
|
CSSPseudoElementType::backdrop);
|
||||||
|
|
||||||
RefPtr<nsStyleContext> newContext =
|
RefPtr<nsStyleContext> newContext =
|
||||||
aRestyleState.StyleSet().ResolvePseudoElementStyle(
|
aStyleSet.ResolvePseudoElementStyle(aFrame->GetContent()->AsElement(),
|
||||||
aFrame->GetContent()->AsElement(),
|
CSSPseudoElementType::backdrop,
|
||||||
CSSPseudoElementType::backdrop,
|
aFrame->StyleContext(),
|
||||||
aFrame->StyleContext(),
|
/* aPseudoElement = */ nullptr);
|
||||||
/* aPseudoElement = */ nullptr);
|
|
||||||
|
|
||||||
aFrame->UpdateStyleOfOwnedChildFrame(
|
// NOTE(emilio): We can't use the changes handled for the owner of the
|
||||||
backdropFrame, newContext, aRestyleState);
|
// 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
|
static void
|
||||||
@@ -318,7 +322,8 @@ UpdateFramePseudoElementStyles(nsIFrame* aFrame,
|
|||||||
static_cast<nsBlockFrame*>(aFrame)->UpdatePseudoElementStyles(aRestyleState);
|
static_cast<nsBlockFrame*>(aFrame)->UpdatePseudoElementStyles(aRestyleState);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateBackdropIfNeeded(aFrame, aRestyleState);
|
UpdateBackdropIfNeeded(
|
||||||
|
aFrame, aRestyleState.StyleSet(), aRestyleState.ChangeList());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
Reference in New Issue
Block a user