Bug 1574101 - Use the right parent frame for block ruby if it's out of flow. r=mats

I should've caught this when reviewing, in fairness.

Differential Revision: https://phabricator.services.mozilla.com/D42163
This commit is contained in:
Emilio Cobos Álvarez
2019-08-15 22:21:35 +00:00
parent 172b42d984
commit 23c61825eb
4 changed files with 31 additions and 3 deletions

View File

@@ -3175,16 +3175,16 @@ nsIFrame* nsCSSFrameConstructor::ConstructBlockRubyFrame(
nsBlockFrame* blockFrame = NS_NewBlockFrame(mPresShell, computedStyle);
nsContainerFrame* newFrame = blockFrame;
nsContainerFrame* geometricParent =
aState.GetGeometricParent(*aStyleDisplay, aParentFrame);
if ((aItem.mFCData->mBits & FCDATA_MAY_NEED_SCROLLFRAME) &&
aStyleDisplay->IsScrollableOverflow()) {
nsContainerFrame* geometricParent =
aState.GetGeometricParent(*aStyleDisplay, aParentFrame);
nsContainerFrame* scrollframe = nullptr;
BuildScrollFrame(aState, content, computedStyle, blockFrame,
geometricParent, scrollframe);
newFrame = scrollframe;
} else {
InitAndRestoreFrame(aState, content, aParentFrame, blockFrame);
InitAndRestoreFrame(aState, content, geometricParent, blockFrame);
}
RefPtr<ComputedStyle> rubyStyle =