Backout 38b25d5e6cf9 because assertions

This commit is contained in:
Simon Montagu 2014-05-25 03:15:00 -07:00
parent 036f3f407e
commit 352872b697
4 changed files with 11 additions and 28 deletions

View File

@ -6835,19 +6835,18 @@ nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
WritingMode bulletWM = reflowState.GetWritingMode();
LogicalMargin bulletMargin =
reflowState.ComputedLogicalMargin().ConvertTo(wm, bulletWM);
LogicalSize bulletSize = aMetrics.Size(bulletWM).ConvertTo(wm, bulletWM);
nscoord iStart = logicalFAS.IStart(wm) -
rs.ComputedLogicalBorderPadding().IStart(wm) -
bulletMargin.IEnd(wm) -
bulletSize.ISize(wm);
aMetrics.ISize();
// Approximate the bullets position; vertical alignment will provide
// the final vertical location. We pass our writing-mode here, because
// it may be different from the bullet frame's mode.
nscoord bStart = logicalFAS.BStart(wm);
aBulletFrame->SetRect(wm, LogicalRect(wm, LogicalPoint(wm, iStart, bStart),
LogicalSize(wm, bulletSize.ISize(wm),
bulletSize.BSize(wm))),
LogicalSize(wm, aMetrics.ISize(),
aMetrics.BSize())),
containerWidth);
aBulletFrame->DidReflow(aState.mPresContext, &aState.mReflowState,
nsDidReflowStatus::FINISHED);

View File

@ -218,27 +218,11 @@ public:
// ISize is the size in the writing mode's inline direction (which equates to
// width in horizontal writing modes, height in vertical ones), and BSize is
// the size in the block-progression direction.
nscoord ISize(mozilla::WritingMode aWritingMode) const {
CHECK_WRITING_MODE(aWritingMode);
return mISize;
}
nscoord BSize(mozilla::WritingMode aWritingMode) const {
CHECK_WRITING_MODE(aWritingMode);
return mBSize;
}
mozilla::LogicalSize Size(mozilla::WritingMode aWritingMode) const {
CHECK_WRITING_MODE(aWritingMode);
return mozilla::LogicalSize(aWritingMode, mISize, mBSize);
}
nscoord ISize() const { return mISize; }
nscoord BSize() const { return mBSize; }
nscoord& ISize(mozilla::WritingMode aWritingMode) {
CHECK_WRITING_MODE(aWritingMode);
return mISize;
}
nscoord& BSize(mozilla::WritingMode aWritingMode) {
CHECK_WRITING_MODE(aWritingMode);
return mBSize;
}
nscoord& ISize() { return mISize; }
nscoord& BSize() { return mBSize; }
// Width and Height are physical dimensions, independent of writing mode.
// Accessing these is slightly more expensive than accessing the logical

View File

@ -654,7 +654,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
// line-height calculations. However, continuations of an inline
// that are empty we force to empty so that things like collapsed
// whitespace in an inline element don't affect the line-height.
aMetrics.ISize(wm) = lineLayout->EndSpan(this);
aMetrics.ISize() = lineLayout->EndSpan(this);
// Compute final width.
@ -664,7 +664,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
// and padding since all continuations have them.
if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) ||
boxDecorationBreakClone) {
aMetrics.ISize(wm) += aReflowState.ComputedLogicalBorderPadding().IStart(wm);
aMetrics.ISize() += aReflowState.ComputedLogicalBorderPadding().IStart(wm);
}
/*

View File

@ -950,8 +950,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// added in later by nsLineLayout::ReflowInlineFrames.
pfd->mOverflowAreas = metrics.mOverflowAreas;
pfd->mBounds.ISize(lineWM) = metrics.ISize(lineWM);
pfd->mBounds.BSize(lineWM) = metrics.BSize(lineWM);
pfd->mBounds.ISize(lineWM) = metrics.ISize();
pfd->mBounds.BSize(lineWM) = metrics.BSize();
// Size the frame, but |RelativePositionFrames| will size the view.
aFrame->SetSize(nsSize(metrics.Width(), metrics.Height()));