mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 717546 - Partial support for negative mspace@width. r=karlt
This commit is contained in:
parent
e23794f0ad
commit
7c79da9ab8
@ -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