Bug 1417661: Use the correct parent style for inheriting from first-letter if the container is an anonymous box. r=bz

MozReview-Commit-ID: 1B7DrAVa274
This commit is contained in:
Emilio Cobos Álvarez 2017-11-28 19:27:49 +01:00
parent b1c72a4e79
commit b4af4fd8f9

View File

@ -11586,13 +11586,15 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame,
if (sc) {
if (sc->IsServo() && parentFrame->IsLineFrame()) {
ServoStyleContext* parentStyleIgnoringFirstLine =
aBlockFrame->StyleContext()->AsServo();
nsIFrame* parentIgnoringFirstLine =
nsFrame::CorrectStyleParentFrame(aBlockFrame,
nsCSSPseudoElements::firstLetter);
sc =
mPresShell->StyleSet()->AsServo()->ReparentStyleContext(
sc->AsServo(),
parentStyleContext->AsServo(),
parentStyleIgnoringFirstLine,
parentIgnoringFirstLine->StyleContext()->AsServo(),
parentStyleContext->AsServo(),
blockContent->AsElement());
}