mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1042489 - Call DrainOverflowColumns() to pick up any overflow frames from our prev-in-flow. r=roc
This commit is contained in:
parent
f1967825c4
commit
aefa35c4e1
6
layout/generic/crashtests/1042489.html
Normal file
6
layout/generic/crashtests/1042489.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="-moz-column-width: 1px;">
|
||||
<body style="-moz-column-width: 1px; box-decoration-break: clone;">
|
||||
<div>A B</div>
|
||||
</body>
|
||||
</html>
|
@ -546,3 +546,4 @@ load outline-on-frameset.xhtml
|
||||
pref(font.size.inflation.minTwips,200) load 1032450.html
|
||||
load 1037903.html
|
||||
load 1039454-1.html
|
||||
load 1042489.html
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "nsBlockReflowContext.h"
|
||||
#include "nsBlockReflowState.h"
|
||||
#include "nsFloatManager.h"
|
||||
#include "nsColumnSetFrame.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsLineBox.h"
|
||||
@ -38,8 +39,13 @@ nsBlockReflowContext::nsBlockReflowContext(nsPresContext* aPresContext,
|
||||
static nsIFrame* DescendIntoBlockLevelFrame(nsIFrame* aFrame)
|
||||
{
|
||||
nsIAtom* type = aFrame->GetType();
|
||||
if (type == nsGkAtoms::columnSetFrame)
|
||||
return DescendIntoBlockLevelFrame(aFrame->GetFirstPrincipalChild());
|
||||
if (type == nsGkAtoms::columnSetFrame) {
|
||||
static_cast<nsColumnSetFrame*>(aFrame)->DrainOverflowColumns();
|
||||
nsIFrame* child = aFrame->GetFirstPrincipalChild();
|
||||
if (child) {
|
||||
return DescendIntoBlockLevelFrame(child);
|
||||
}
|
||||
}
|
||||
return aFrame;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsColumnSetFrame_h___
|
||||
#define nsColumnSetFrame_h___
|
||||
|
||||
/* rendering object for css3 multi-column layout */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
@ -75,6 +78,13 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsPoint& aPt);
|
||||
|
||||
/**
|
||||
* Similar to nsBlockFrame::DrainOverflowLines. Locate any columns not
|
||||
* handled by our prev-in-flow, and any columns sitting on our own
|
||||
* overflow list, and put them in our primary child list for reflowing.
|
||||
*/
|
||||
void DrainOverflowColumns();
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("ColumnSet"), aResult);
|
||||
@ -153,13 +163,6 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Similar to nsBlockFrame::DrainOverflowLines. Locate any columns not
|
||||
* handled by our prev-in-flow, and any columns sitting on our own
|
||||
* overflow list, and put them in our primary child list for reflowing.
|
||||
*/
|
||||
void DrainOverflowColumns();
|
||||
|
||||
bool ReflowColumns(nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aReflowStatus,
|
||||
@ -224,3 +227,5 @@ protected:
|
||||
nsCollapsingMargin* aCarriedOutBottomMargin,
|
||||
ColumnBalanceData& aColData);
|
||||
};
|
||||
|
||||
#endif // nsColumnSetFrame_h___
|
||||
|
Loading…
Reference in New Issue
Block a user