mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset bad0f7f06864 (bug 1145218) for windows reftest failures CLOSED TREE
This commit is contained in:
parent
0d98aed896
commit
e4dc16fcd8
@ -39,10 +39,7 @@ PSArenaFreeCB(size_t aSize, void* aPtr, void* aClosure)
|
||||
|
||||
nsFloatManager::nsFloatManager(nsIPresShell* aPresShell,
|
||||
mozilla::WritingMode aWM)
|
||||
:
|
||||
#ifdef DEBUG
|
||||
mWritingMode(aWM),
|
||||
#endif
|
||||
: mWritingMode(aWM),
|
||||
mLineLeft(0), mBlockStart(0),
|
||||
mFloatDamage(PSArenaAllocCB, PSArenaFreeCB, aPresShell),
|
||||
mPushedLeftFloatPastBreak(false),
|
||||
@ -114,17 +111,12 @@ void nsFloatManager::Shutdown()
|
||||
sCachedFloatManagerCount = -1;
|
||||
}
|
||||
|
||||
#define CHECK_BLOCK_DIR(aWM) \
|
||||
NS_ASSERTION(aWM.GetBlockDir() == mWritingMode.value.GetBlockDir(), \
|
||||
"incompatible writing modes")
|
||||
|
||||
nsFlowAreaRect
|
||||
nsFloatManager::GetFlowArea(WritingMode aWM, nscoord aBOffset,
|
||||
BandInfoType aInfoType, nscoord aBSize,
|
||||
LogicalRect aContentArea, SavedState* aState,
|
||||
nscoord aContainerWidth) const
|
||||
{
|
||||
CHECK_BLOCK_DIR(aWM);
|
||||
NS_ASSERTION(aBSize >= 0, "unexpected max block size");
|
||||
NS_ASSERTION(aContentArea.ISize(aWM) >= 0,
|
||||
"unexpected content area inline size");
|
||||
@ -254,7 +246,6 @@ nsresult
|
||||
nsFloatManager::AddFloat(nsIFrame* aFloatFrame, const LogicalRect& aMarginRect,
|
||||
WritingMode aWM, nscoord aContainerWidth)
|
||||
{
|
||||
CHECK_BLOCK_DIR(aWM);
|
||||
NS_ASSERTION(aMarginRect.ISize(aWM) >= 0, "negative inline size!");
|
||||
NS_ASSERTION(aMarginRect.BSize(aWM) >= 0, "negative block size!");
|
||||
|
||||
@ -414,6 +405,7 @@ nsFloatManager::PushState(SavedState* aState)
|
||||
// reflow. In the typical case A and C will be the same, but not always.
|
||||
// Allowing mFloatDamage to accumulate the damage incurred during both
|
||||
// reflows ensures that nothing gets missed.
|
||||
aState->mWritingMode = mWritingMode;
|
||||
aState->mLineLeft = mLineLeft;
|
||||
aState->mBlockStart = mBlockStart;
|
||||
aState->mPushedLeftFloatPastBreak = mPushedLeftFloatPastBreak;
|
||||
@ -428,6 +420,7 @@ nsFloatManager::PopState(SavedState* aState)
|
||||
{
|
||||
NS_PRECONDITION(aState, "No state to restore?");
|
||||
|
||||
mWritingMode = aState->mWritingMode;
|
||||
mLineLeft = aState->mLineLeft;
|
||||
mBlockStart = aState->mBlockStart;
|
||||
mPushedLeftFloatPastBreak = aState->mPushedLeftFloatPastBreak;
|
||||
|
@ -88,6 +88,7 @@ public:
|
||||
explicit SavedState() {}
|
||||
private:
|
||||
uint32_t mFloatInfoCount;
|
||||
mozilla::WritingMode mWritingMode;
|
||||
nscoord mLineLeft, mBlockStart;
|
||||
bool mPushedLeftFloatPastBreak;
|
||||
bool mPushedRightFloatPastBreak;
|
||||
@ -286,7 +287,8 @@ public:
|
||||
|
||||
void AssertStateMatches(SavedState *aState) const
|
||||
{
|
||||
NS_ASSERTION(aState->mLineLeft == mLineLeft &&
|
||||
NS_ASSERTION(aState->mWritingMode == mWritingMode &&
|
||||
aState->mLineLeft == mLineLeft &&
|
||||
aState->mBlockStart == mBlockStart &&
|
||||
aState->mPushedLeftFloatPastBreak ==
|
||||
mPushedLeftFloatPastBreak &&
|
||||
@ -341,7 +343,7 @@ private:
|
||||
nsRect mRect;
|
||||
};
|
||||
|
||||
mozilla::DebugOnly<mozilla::WritingMode> mWritingMode;
|
||||
mozilla::WritingMode mWritingMode;
|
||||
|
||||
// Translation from local to global coordinate space.
|
||||
nscoord mLineLeft, mBlockStart;
|
||||
|
Loading…
Reference in New Issue
Block a user