mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1204535 - Flatten conditional structure one level. r=tn
This commit is contained in:
parent
a9f65b9841
commit
87fd2c59f6
@ -2877,22 +2877,20 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
if (aBuilder->IsPaintingToWindow()) {
|
||||
bool wasUsingDisplayPort = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), nullptr);
|
||||
|
||||
if (mIsRoot) {
|
||||
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||
// For a root frame in a container, just get the value of the existing
|
||||
// display port if any.
|
||||
usingDisplayport = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &displayPort);
|
||||
} else {
|
||||
// Override the value of the display port base rect, and possibly create a
|
||||
// display port if there isn't one already.
|
||||
nsRect displayportBase = dirtyRect;
|
||||
if (mIsRoot && mOuter->PresContext()->IsRootContentDocument()) {
|
||||
displayportBase =
|
||||
nsRect(nsPoint(0, 0), nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
|
||||
}
|
||||
usingDisplayport = nsLayoutUtils::GetOrMaybeCreateDisplayPort(
|
||||
*aBuilder, mOuter, displayportBase, &displayPort);
|
||||
if (mIsRoot && gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||
// For a root frame in a container, just get the value of the existing
|
||||
// display port if any.
|
||||
usingDisplayport = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &displayPort);
|
||||
} else if (mIsRoot) {
|
||||
// Override the value of the display port base rect, and possibly create a
|
||||
// display port if there isn't one already.
|
||||
nsRect displayportBase = dirtyRect;
|
||||
if (mIsRoot && mOuter->PresContext()->IsRootContentDocument()) {
|
||||
displayportBase =
|
||||
nsRect(nsPoint(0, 0), nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
|
||||
}
|
||||
usingDisplayport = nsLayoutUtils::GetOrMaybeCreateDisplayPort(
|
||||
*aBuilder, mOuter, displayportBase, &displayPort);
|
||||
} else {
|
||||
// For a non-root scroll frame, override the value of the display port
|
||||
// base rect, and possibly create a display port if there isn't one
|
||||
|
Loading…
Reference in New Issue
Block a user