mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 459363 - Fix computation of intrinsic width for <mspace> and <mpadded> elements. r=karlt
This commit is contained in:
parent
2e5034912c
commit
e05de18a4f
@ -444,3 +444,11 @@ nsMathMLmpaddedFrame::Place(nsRenderingContext& aRenderingContext,
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
nsMathMLmpaddedFrame::MeasureForWidth(nsRenderingContext& aRenderingContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize)
|
||||
{
|
||||
ProcessAttributes();
|
||||
return Place(aRenderingContext, false, aDesiredSize);
|
||||
}
|
||||
|
@ -45,6 +45,10 @@ protected:
|
||||
|
||||
virtual int GetSkipSides() const { return 0; }
|
||||
|
||||
virtual nsresult
|
||||
MeasureForWidth(nsRenderingContext& aRenderingContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
nsCSSValue mWidth;
|
||||
nsCSSValue mHeight;
|
||||
|
@ -125,3 +125,15 @@ nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
nsMathMLmspaceFrame::MeasureForWidth(nsRenderingContext& aRenderingContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize)
|
||||
{
|
||||
ProcessAttributes(PresContext());
|
||||
mBoundingMetrics = nsBoundingMetrics();
|
||||
mBoundingMetrics.width = NS_MAX(0, mWidth);
|
||||
aDesiredSize.width = mBoundingMetrics.width;
|
||||
aDesiredSize.mBoundingMetrics = mBoundingMetrics;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -42,6 +42,10 @@ protected:
|
||||
|
||||
virtual int GetSkipSides() const { return 0; }
|
||||
|
||||
virtual nsresult
|
||||
MeasureForWidth(nsRenderingContext& aRenderingContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
nscoord mWidth;
|
||||
nscoord mHeight;
|
||||
|
@ -73,7 +73,7 @@
|
||||
<mspace width="20px" height="20px" mathbackground="yellow"/>
|
||||
<mspace width="20px" height="20px" mathbackground="grey"/>
|
||||
</munderover>
|
||||
</math>
|
||||
</math><br/>
|
||||
<!-- mfrac (bevelled=true) -->
|
||||
<math dir="rtl">
|
||||
<mstyle mathcolor="white">
|
||||
@ -91,7 +91,7 @@
|
||||
<mspace width="20px" height="20px"/>
|
||||
</mroot>
|
||||
</mstyle>
|
||||
</math>
|
||||
</math><br/>
|
||||
<!-- msqrt -->
|
||||
<math dir="rtl">
|
||||
<mstyle mathcolor="white">
|
||||
|
@ -9,35 +9,35 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"></td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
<mo><</mo>
|
||||
<mi>Under<mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
<mo>></mo>
|
||||
<mi>Under</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
</mrow></td>
|
||||
</mrow></math></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
@ -9,35 +9,35 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"></td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
<mo><</mo>
|
||||
<mi>Under<mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
<mo>></mo>
|
||||
<mi>Under</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
</mrow></td>
|
||||
</mrow></math></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@ -49,7 +49,7 @@
|
||||
<mspace height="15px" width="50px" mathbackground="blue"/>
|
||||
<mspace height="15px" width="75px" mathbackground="red"/>
|
||||
<mspace height="15px" width="25px" mathbackground="red"/>
|
||||
</mover>
|
||||
</moverover>
|
||||
</math>
|
||||
</td>
|
||||
<td align="center">
|
||||
|
@ -9,35 +9,35 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"></td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
<mo><</mo>
|
||||
<mi>Under<mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
<mo>></mo>
|
||||
<mi>Under</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
</mrow></td>
|
||||
</mrow></math></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
@ -9,35 +9,35 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"></td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
<mo><</mo>
|
||||
<mi>Under<mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
<mo>></mo>
|
||||
<mi>Under</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center">
|
||||
<mrow>
|
||||
<math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo><</mo>
|
||||
<mi>Base</mi>
|
||||
</mrow>
|
||||
</mrow></math>
|
||||
</td>
|
||||
<td align="center"><mrow>
|
||||
<td align="center"><math><mrow>
|
||||
<mi>Over = Under</mi>
|
||||
<mo>></mo>
|
||||
<mi>Base</mi>
|
||||
</mrow></td>
|
||||
</mrow></math></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@ -49,7 +49,7 @@
|
||||
<mspace height="15px" width="50px" mathbackground="blue"/>
|
||||
<mspace height="15px" width="75px" mathbackground="red"/>
|
||||
<mspace height="15px" width="25px" mathbackground="red"/>
|
||||
</mover>
|
||||
</munderover>
|
||||
</math>
|
||||
</td>
|
||||
<td align="center">
|
||||
|
@ -37,6 +37,7 @@ fails-if(winWidget) == mfenced-10.html mfenced-10-ref.html
|
||||
== quotes-1.xhtml quotes-1-ref.xhtml
|
||||
!= stretchy-underbar-1.xhtml stretchy-underbar-1-ref.xhtml
|
||||
== table-width-1.xhtml table-width-1-ref.xhtml
|
||||
== table-width-2.html table-width-2-ref.html
|
||||
== underbar-width-1.xhtml underbar-width-1-ref.xhtml
|
||||
== mathml-type-supported.xhtml mathml-type-supported-ref.xml
|
||||
== mtable-align-negative-rownumber.html mtable-align-negative-rownumber-ref.html
|
||||
|
36
layout/reftests/mathml/table-width-2-ref.html
Normal file
36
layout/reftests/mathml/table-width-2-ref.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!doctype>
|
||||
<html>
|
||||
<head>
|
||||
<title>table-width-2</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- See bug 459363 -->
|
||||
|
||||
<p>
|
||||
<math>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
<mtd><mrow style="width: 5em;"></mrow></mtd>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<math>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
<mtd><mrow style="width: 5em;"></mrow></mtd>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
36
layout/reftests/mathml/table-width-2.html
Normal file
36
layout/reftests/mathml/table-width-2.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!doctype>
|
||||
<html>
|
||||
<head>
|
||||
<title>table-width-2</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- See bug 459363 -->
|
||||
|
||||
<p>
|
||||
<math>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
<mtd><mspace width="5em"></mspace></mtd>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<math>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
<mtd><mpadded width="5em"></mpadded></mtd>
|
||||
<mtd><mtext>|</mtext></mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user