mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 717546 - Partial support for negative mspace@width. r=karlt
This commit is contained in:
parent
509287067c
commit
73d60bbe9f
@ -1286,7 +1286,7 @@ nsMathMLContainerFrame::Place(nsRenderingContext& aRenderingContext,
|
||||
// another math frame
|
||||
mBoundingMetrics.width = child.X();
|
||||
|
||||
aDesiredSize.width = mBoundingMetrics.width;
|
||||
aDesiredSize.width = std::max(0, mBoundingMetrics.width);
|
||||
aDesiredSize.height = ascent + descent;
|
||||
aDesiredSize.ascent = ascent;
|
||||
aDesiredSize.mBoundingMetrics = mBoundingMetrics;
|
||||
|
@ -106,18 +106,16 @@ nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
ProcessAttributes(aPresContext);
|
||||
// nsLineLayout doesn't expect negative widths.
|
||||
// XXXfredw Negative spaces are not implemented. See bug 717546
|
||||
|
||||
mBoundingMetrics = nsBoundingMetrics();
|
||||
mBoundingMetrics.width = std::max(0, mWidth);
|
||||
mBoundingMetrics.width = mWidth;
|
||||
mBoundingMetrics.ascent = mHeight;
|
||||
mBoundingMetrics.descent = mDepth;
|
||||
mBoundingMetrics.leftBearing = 0;
|
||||
mBoundingMetrics.rightBearing = mBoundingMetrics.width;
|
||||
|
||||
aDesiredSize.ascent = mHeight;
|
||||
aDesiredSize.width = mBoundingMetrics.width;
|
||||
aDesiredSize.width = std::max(0, mBoundingMetrics.width);
|
||||
aDesiredSize.height = aDesiredSize.ascent + mDepth;
|
||||
// Also return our bounding metrics
|
||||
aDesiredSize.mBoundingMetrics = mBoundingMetrics;
|
||||
@ -133,8 +131,8 @@ nsMathMLmspaceFrame::MeasureForWidth(nsRenderingContext& aRenderingContext,
|
||||
{
|
||||
ProcessAttributes(PresContext());
|
||||
mBoundingMetrics = nsBoundingMetrics();
|
||||
mBoundingMetrics.width = std::max(0, mWidth);
|
||||
aDesiredSize.width = mBoundingMetrics.width;
|
||||
mBoundingMetrics.width = mWidth;
|
||||
aDesiredSize.width = std::max(0, mBoundingMetrics.width);
|
||||
aDesiredSize.mBoundingMetrics = mBoundingMetrics;
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user