Bug 1277131 : Part 2 - rename nsMathMLmtableOuterFrame to nsMathMLmtableWrapperFrame. r=heycam

MozReview-Commit-ID: EylH72aitOj
This commit is contained in:
Astley Chen
2016-06-16 13:14:50 +01:00
parent ca13d10ee9
commit cfbe3fb84d
3 changed files with 80 additions and 67 deletions

View File

@@ -65,7 +65,8 @@ ParseStyleValue(nsIAtom* aAttribute, const nsAString& aAttributeValue)
}
static nsTArray<int8_t>*
ExtractStyleValues(const nsAString& aString, nsIAtom* aAttribute,
ExtractStyleValues(const nsAString& aString,
nsIAtom* aAttribute,
bool aAllowMultiValues)
{
nsTArray<int8_t>* styleArray = nullptr;
@@ -112,8 +113,10 @@ ExtractStyleValues(const nsAString& aString, nsIAtom* aAttribute,
return styleArray;
}
static nsresult ReportParseError(nsIFrame* aFrame, const char16_t* aAttribute,
const char16_t* aValue)
static nsresult
ReportParseError(nsIFrame* aFrame,
const char16_t* aAttribute,
const char16_t* aValue)
{
nsIContent* content = aFrame->GetContent();
@@ -152,7 +155,7 @@ AttributeToProperty(nsIAtom* aAttribute)
/* This method looks for a property that applies to a cell, but it looks
* recursively because some cell properties can come from the cell, a row,
* a table, etc. This function searches through the heirarchy for a property
* a table, etc. This function searches through the hierarchy for a property
* and returns its value. The function stops searching after checking a <mtable>
* frame.
*/
@@ -227,7 +230,8 @@ ApplyBorderToStyle(const nsMathMLmtdFrame* aFrame,
}
static nsMargin
ComputeBorderOverflow(nsMathMLmtdFrame* aFrame, const nsStyleBorder& aStyleBorder)
ComputeBorderOverflow(nsMathMLmtdFrame* aFrame,
const nsStyleBorder& aStyleBorder)
{
nsMargin overflow;
int32_t rowIndex;
@@ -262,7 +266,8 @@ ComputeBorderOverflow(nsMathMLmtdFrame* aFrame, const nsStyleBorder& aStyleBorde
* around a nsMathMLmtdFrame based on the rowline and columnline properties
* set on the cell frame.
*/
class nsDisplaymtdBorder : public nsDisplayBorder {
class nsDisplaymtdBorder : public nsDisplayBorder
{
public:
nsDisplaymtdBorder(nsDisplayListBuilder* aBuilder, nsMathMLmtdFrame* aFrame)
: nsDisplayBorder(aBuilder, aFrame)
@@ -337,7 +342,8 @@ public:
#endif
static void
ParseFrameAttribute(nsIFrame* aFrame, nsIAtom* aAttribute,
ParseFrameAttribute(nsIFrame* aFrame,
nsIAtom* aAttribute,
bool aAllowMultiValues)
{
nsAutoString attrValue;
@@ -560,7 +566,7 @@ static void ParseSpacingAttributes(nsMathMLmtableFrame* aTableFrame)
aTableFrame->SetUseCSSSpacing();
}
// map all attribues within a table -- requires the indices of rows and cells.
// map all attributes within a table -- requires the indices of rows and cells.
// so it can only happen after they are made ready by the table base class.
static void
MapAllAttributesIntoCSS(nsMathMLmtableFrame* aTableFrame)
@@ -681,28 +687,28 @@ ListMathMLTree(nsIFrame* atLeast)
#endif
// --------
// implementation of nsMathMLmtableOuterFrame
// implementation of nsMathMLmtableWrapperFrame
NS_QUERYFRAME_HEAD(nsMathMLmtableOuterFrame)
NS_QUERYFRAME_HEAD(nsMathMLmtableWrapperFrame)
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsTableWrapperFrame)
nsContainerFrame*
NS_NewMathMLmtableOuterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmtableOuterFrame(aContext);
return new (aPresShell) nsMathMLmtableWrapperFrame(aContext);
}
NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtableOuterFrame)
NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtableWrapperFrame)
nsMathMLmtableOuterFrame::~nsMathMLmtableOuterFrame()
nsMathMLmtableWrapperFrame::~nsMathMLmtableWrapperFrame()
{
}
nsresult
nsMathMLmtableOuterFrame::AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType)
nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType)
{
// Attributes specific to <mtable>:
// frame : in mathml.css
@@ -779,7 +785,7 @@ nsMathMLmtableOuterFrame::AttributeChanged(int32_t aNameSpaceID,
}
nsIFrame*
nsMathMLmtableOuterFrame::GetRowFrameAt(int32_t aRowIndex)
nsMathMLmtableWrapperFrame::GetRowFrameAt(int32_t aRowIndex)
{
int32_t rowCount = GetRowCount();
@@ -814,10 +820,10 @@ nsMathMLmtableOuterFrame::GetRowFrameAt(int32_t aRowIndex)
}
void
nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsMathMLmtableWrapperFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsAutoString value;
// we want to return a table that is anchored according to the align attribute
@@ -971,7 +977,7 @@ nsMathMLmtableFrame::GetColSpacing(int32_t aColIndex)
nscoord
nsMathMLmtableFrame::GetColSpacing(int32_t aStartColIndex,
int32_t aEndColIndex)
int32_t aEndColIndex)
{
if (mUseCSSSpacing) {
return nsTableFrame::GetColSpacing(aStartColIndex, aEndColIndex);
@@ -1031,7 +1037,7 @@ nsMathMLmtableFrame::GetRowSpacing(int32_t aRowIndex)
nscoord
nsMathMLmtableFrame::GetRowSpacing(int32_t aStartRowIndex,
int32_t aEndRowIndex)
int32_t aEndRowIndex)
{
if (mUseCSSSpacing) {
return nsTableFrame::GetRowSpacing(aStartRowIndex, aEndRowIndex);
@@ -1131,8 +1137,9 @@ nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
// implementation of nsMathMLmtdFrame
nsContainerFrame*
NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
nsTableFrame* aTableFrame)
NS_NewMathMLmtdFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,
nsTableFrame* aTableFrame)
{
return new (aPresShell) nsMathMLmtdFrame(aContext, aTableFrame);
}
@@ -1298,7 +1305,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtdInnerFrame)
nsMathMLmtdInnerFrame::nsMathMLmtdInnerFrame(nsStyleContext* aContext)
: nsBlockFrame(aContext)
{
// Make a copy of the parent nsStyleText for later modificaiton.
// Make a copy of the parent nsStyleText for later modification.
mUniqueStyleText = new (PresContext()) nsStyleText(*StyleText());
}
@@ -1308,7 +1315,7 @@ nsMathMLmtdInnerFrame::~nsMathMLmtdInnerFrame()
}
void
nsMathMLmtdInnerFrame::Reflow(nsPresContext* aPresContext,
nsMathMLmtdInnerFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)