bug 1031241 pt 1 - Rename Get{Min,Pref}Width to Get{Min,Pref}ISize throughout layout. r=dbaron,smontagu

This commit is contained in:
Jonathan Kew 2014-07-24 18:03:25 +01:00
parent 9103c3e947
commit 324f2b8312
77 changed files with 225 additions and 226 deletions

View File

@ -3336,7 +3336,7 @@ nsDocumentViewer::GetContentSize(int32_t* aWidth, int32_t* aHeight)
{
nsRefPtr<nsRenderingContext> rcx =
presShell->CreateReferenceRenderingContext();
prefWidth = root->GetPrefWidth(rcx);
prefWidth = root->GetPrefISize(rcx);
}
nsresult rv = presShell->ResizeReflow(prefWidth, NS_UNCONSTRAINEDSIZE);

View File

@ -3738,9 +3738,9 @@ GetIntrinsicCoord(const nsStyleCoord& aStyle,
AutoMaybeDisableFontInflation an(aFrame);
if (val == NS_STYLE_WIDTH_MAX_CONTENT)
aResult = aFrame->GetPrefWidth(aRenderingContext);
aResult = aFrame->GetPrefISize(aRenderingContext);
else
aResult = aFrame->GetMinWidth(aRenderingContext);
aResult = aFrame->GetMinISize(aRenderingContext);
return true;
}
@ -3829,9 +3829,9 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
++gNoiseIndent;
#endif
if (aType == MIN_WIDTH)
result = aFrame->GetMinWidth(aRenderingContext);
result = aFrame->GetMinISize(aRenderingContext);
else
result = aFrame->GetPrefWidth(aRenderingContext);
result = aFrame->GetPrefISize(aRenderingContext);
#ifdef DEBUG_INTRINSIC_WIDTH
--gNoiseIndent;
nsFrame::IndentBy(stderr, gNoiseIndent);
@ -3916,7 +3916,7 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
if (aFrame->GetType() == nsGkAtoms::tableFrame) {
// Tables can't shrink smaller than their intrinsic minimum width,
// no matter what.
min = aFrame->GetMinWidth(aRenderingContext);
min = aFrame->GetMinISize(aRenderingContext);
}
// We also need to track what has been added on outside of the box
@ -4088,17 +4088,17 @@ nsLayoutUtils::ComputeWidthValue(
int32_t val = aCoord.GetIntValue();
switch (val) {
case NS_STYLE_WIDTH_MAX_CONTENT:
result = aFrame->GetPrefWidth(aRenderingContext);
result = aFrame->GetPrefISize(aRenderingContext);
NS_ASSERTION(result >= 0, "width less than zero");
break;
case NS_STYLE_WIDTH_MIN_CONTENT:
result = aFrame->GetMinWidth(aRenderingContext);
result = aFrame->GetMinISize(aRenderingContext);
NS_ASSERTION(result >= 0, "width less than zero");
break;
case NS_STYLE_WIDTH_FIT_CONTENT:
{
nscoord pref = aFrame->GetPrefWidth(aRenderingContext),
min = aFrame->GetMinWidth(aRenderingContext),
nscoord pref = aFrame->GetPrefISize(aRenderingContext),
min = aFrame->GetMinISize(aRenderingContext),
fill = aContainingBlockWidth -
(aBoxSizingToMarginEdge + aContentEdgeToBoxSizing);
result = std::max(min, std::min(pref, fill));

View File

@ -1292,11 +1292,11 @@ public:
nscoord maxWidth, nscoord maxHeight,
nscoord tentWidth, nscoord tentHeight);
// Implement nsIFrame::GetPrefWidth in terms of nsIFrame::AddInlinePrefWidth
// Implement nsIFrame::GetPrefISize in terms of nsIFrame::AddInlinePrefWidth
static nscoord PrefWidthFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext);
// Implement nsIFrame::GetMinWidth in terms of nsIFrame::AddInlineMinWidth
// Implement nsIFrame::GetMinISize in terms of nsIFrame::AddInlineMinWidth
static nscoord MinWidthFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext);

View File

@ -718,13 +718,13 @@ nsComboboxControlFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
bool isUsingOverlayScrollbars =
LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) != 0;
if (aType == nsLayoutUtils::MIN_WIDTH) {
dropdownContentWidth = mDropdownFrame->GetMinWidth(aRenderingContext);
dropdownContentWidth = mDropdownFrame->GetMinISize(aRenderingContext);
if (isUsingOverlayScrollbars) {
dropdownContentWidth += scrollbarWidth;
}
} else {
NS_ASSERTION(aType == nsLayoutUtils::PREF_WIDTH, "Unexpected type");
dropdownContentWidth = mDropdownFrame->GetPrefWidth(aRenderingContext);
dropdownContentWidth = mDropdownFrame->GetPrefISize(aRenderingContext);
if (isUsingOverlayScrollbars) {
dropdownContentWidth += scrollbarWidth;
}
@ -745,7 +745,7 @@ nsComboboxControlFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
}
nscoord
nsComboboxControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsComboboxControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord minWidth;
DISPLAY_MIN_WIDTH(this, minWidth);
@ -754,7 +754,7 @@ nsComboboxControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
nscoord
nsComboboxControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsComboboxControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord prefWidth;
DISPLAY_PREF_WIDTH(this, prefWidth);

View File

@ -67,9 +67,9 @@ public:
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
#endif
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
@ -216,7 +216,7 @@ protected:
};
DropDownPositionState AbsolutelyPositionDropDown();
// Helper for GetMinWidth/GetPrefWidth
// Helper for GetMinISize/GetPrefISize
nscoord GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
nsLayoutUtils::IntrinsicWidthType aType);

View File

@ -286,7 +286,7 @@ nsFieldSetFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
nscoord
nsFieldSetFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
nsFieldSetFrame::GetMinISize(nsRenderingContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -296,7 +296,7 @@ nsFieldSetFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
}
nscoord
nsFieldSetFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
nsFieldSetFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
@ -321,7 +321,7 @@ nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext,
// wrapping inside of us should not apply font size inflation.
AutoMaybeDisableFontInflation an(this);
nscoord minWidth = GetMinWidth(aRenderingContext);
nscoord minWidth = GetMinISize(aRenderingContext);
if (minWidth > result.width)
result.width = minWidth;

View File

@ -19,8 +19,8 @@ public:
nscoord
GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
nsLayoutUtils::IntrinsicWidthType);
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nsSize ComputeSize(nsRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,

View File

@ -233,13 +233,13 @@ nsFileControlFrame::DnDListener::IsValidDropData(nsIDOMDragEvent* aEvent)
}
nscoord
nsFileControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsFileControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
// Our min width is our pref width
result = GetPrefWidth(aRenderingContext);
result = GetPrefISize(aRenderingContext);
return result;
}

View File

@ -38,7 +38,7 @@ public:
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) MOZ_OVERRIDE;
virtual void SetFocus(bool aOn, bool aRepaint) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;

View File

@ -132,7 +132,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
nscoord
nsHTMLButtonControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
nsHTMLButtonControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -148,7 +148,7 @@ nsHTMLButtonControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
}
nscoord
nsHTMLButtonControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
nsHTMLButtonControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
@ -258,7 +258,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// offset to allow the kid to spill left into our padding.
nscoord xoffset = focusPadding.left +
aButtonReflowState.ComputedPhysicalBorderPadding().left;
nscoord extrawidth = GetMinWidth(aButtonReflowState.rendContext) -
nscoord extrawidth = GetMinISize(aButtonReflowState.rendContext) -
aButtonReflowState.ComputedWidth();
if (extrawidth > 0) {
nscoord extraleft = extrawidth / 2;

View File

@ -30,9 +30,9 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -301,7 +301,7 @@ nsListControlFrame::CalcHeightOfARow()
}
nscoord
nsListControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsListControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
@ -309,7 +309,7 @@ nsListControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
// Always add scrollbar widths to the pref-width of the scrolled
// content. Combobox frames depend on this happening in the dropdown,
// and standalone listboxes are overflow:scroll so they need it too.
result = GetScrolledFrame()->GetPrefWidth(aRenderingContext);
result = GetScrolledFrame()->GetPrefISize(aRenderingContext);
result = NSCoordSaturatingAdd(result,
GetDesiredScrollbarSizes(PresContext(), aRenderingContext).LeftRight());
@ -317,7 +317,7 @@ nsListControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
}
nscoord
nsListControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsListControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -325,7 +325,7 @@ nsListControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
// Always add scrollbar widths to the min-width of the scrolled
// content. Combobox frames depend on this happening in the dropdown,
// and standalone listboxes are overflow:scroll so they need it too.
result = GetScrolledFrame()->GetMinWidth(aRenderingContext);
result = GetScrolledFrame()->GetMinISize(aRenderingContext);
result += GetDesiredScrollbarSizes(PresContext(), aRenderingContext).LeftRight();
return result;

View File

@ -66,8 +66,8 @@ public:
virtual void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -232,7 +232,7 @@ nsMeterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
}
nscoord
nsMeterFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsMeterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nsRefPtr<nsFontMetrics> fontMet;
NS_ENSURE_SUCCESS(
@ -250,9 +250,9 @@ nsMeterFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
nscoord
nsMeterFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsMeterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
return GetMinWidth(aRenderingContext);
return GetMinISize(aRenderingContext);
}
bool

View File

@ -54,8 +54,8 @@ public:
nsSize aMargin, nsSize aBorder,
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
{

View File

@ -63,7 +63,7 @@ nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
}
nscoord
nsNumberControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
nsNumberControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -81,7 +81,7 @@ nsNumberControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
}
nscoord
nsNumberControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
nsNumberControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -53,9 +53,9 @@ public:
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
#endif
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -238,7 +238,7 @@ nsProgressFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
}
nscoord
nsProgressFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsProgressFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nsRefPtr<nsFontMetrics> fontMet;
NS_ENSURE_SUCCESS(
@ -256,9 +256,9 @@ nsProgressFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
nscoord
nsProgressFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsProgressFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
return GetMinWidth(aRenderingContext);
return GetMinISize(aRenderingContext);
}
bool

View File

@ -59,8 +59,8 @@ public:
nsSize aMargin, nsSize aBorder,
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
{

View File

@ -754,7 +754,7 @@ nsRangeFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
}
nscoord
nsRangeFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsRangeFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
// nsFrame::ComputeSize calls GetMinimumWidgetSize to prevent us from being
// given too small a size when we're natively themed. If we aren't native
@ -763,7 +763,7 @@ nsRangeFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
nscoord
nsRangeFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsRangeFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
// frameSizeOverride values just gets us to fall back to being horizontal:
nsSize frameSizeOverride(10,1);

View File

@ -76,8 +76,8 @@ public:
nsSize aMargin, nsSize aBorder,
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;

View File

@ -407,7 +407,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsBaseContentList& aElements,
}
nscoord
nsTextControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
nsTextControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
{
DebugOnly<nscoord> result = 0;
DISPLAY_PREF_WIDTH(this, result);
@ -420,13 +420,13 @@ nsTextControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
}
nscoord
nsTextControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
nsTextControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
{
// Our min width is just our preferred width if we have auto width.
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
result = GetPrefWidth(aRenderingContext);
result = GetPrefISize(aRenderingContext);
return result;
}

View File

@ -42,8 +42,8 @@ public:
return do_QueryFrame(GetFirstPrincipalChild());
}
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,

View File

@ -43,8 +43,8 @@ public:
InlineMinWidthData *aData) MOZ_OVERRIDE;
virtual void AddInlinePrefWidth(nsRenderingContext *aRenderingContext,
InlinePrefWidthData *aData) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const MOZ_OVERRIDE;
@ -174,7 +174,7 @@ BRFrame::AddInlinePrefWidth(nsRenderingContext *aRenderingContext,
}
/* virtual */ nscoord
BRFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
BRFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -182,7 +182,7 @@ BRFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
BRFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
BRFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -664,11 +664,11 @@ nsBlockFrame::CheckIntrinsicCacheAgainstShrinkWrapState()
}
/* virtual */ nscoord
nsBlockFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
return firstInFlow->GetMinWidth(aRenderingContext);
return firstInFlow->GetMinISize(aRenderingContext);
DISPLAY_MIN_WIDTH(this, mMinWidth);
@ -681,7 +681,7 @@ nsBlockFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
if (gNoisyIntrinsic) {
IndentBy(stdout, gNoiseIndent);
ListTag(stdout);
printf(": GetMinWidth\n");
printf(": GetMinISize\n");
}
AutoNoisyIndenter indenter(gNoisyIntrinsic);
#endif
@ -749,11 +749,11 @@ nsBlockFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsBlockFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
return firstInFlow->GetPrefWidth(aRenderingContext);
return firstInFlow->GetPrefISize(aRenderingContext);
DISPLAY_PREF_WIDTH(this, mPrefWidth);
@ -766,7 +766,7 @@ nsBlockFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
if (gNoisyIntrinsic) {
IndentBy(stdout, gNoiseIndent);
ListTag(stdout);
printf(": GetPrefWidth\n");
printf(": GetPrefISize\n");
}
AutoNoisyIndenter indenter(gNoisyIntrinsic);
#endif

View File

@ -228,8 +228,8 @@ public:
private:
void CheckIntrinsicCacheAgainstShrinkWrapState();
public:
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsRect ComputeTightBounds(gfxContext* aContext) const MOZ_OVERRIDE;

View File

@ -628,7 +628,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
}
/* virtual */ nscoord
nsBulletFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsBulletFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
nsHTMLReflowMetrics metrics(wm);
@ -638,7 +638,7 @@ nsBulletFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsBulletFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsBulletFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
nsHTMLReflowMetrics metrics(wm);

View File

@ -72,8 +72,8 @@ public:
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
// nsBulletFrame
int32_t SetListItemOrdinal(int32_t aNextOrdinal, bool* aChanged,

View File

@ -467,26 +467,26 @@ nsCanvasFrame::PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt)
}
/* virtual */ nscoord
nsCanvasFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
if (mFrames.IsEmpty())
result = 0;
else
result = mFrames.FirstChild()->GetMinWidth(aRenderingContext);
result = mFrames.FirstChild()->GetMinISize(aRenderingContext);
return result;
}
/* virtual */ nscoord
nsCanvasFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
if (mFrames.IsEmpty())
result = 0;
else
result = mFrames.FirstChild()->GetPrefWidth(aRenderingContext);
result = mFrames.FirstChild()->GetPrefISize(aRenderingContext);
return result;
}

View File

@ -54,8 +54,8 @@ public:
nsIFrame* aOldFrame) MOZ_OVERRIDE;
#endif
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,

View File

@ -341,11 +341,11 @@ static void MoveChildTo(nsIFrame* aParent, nsIFrame* aChild, nsPoint aOrigin) {
}
nscoord
nsColumnSetFrame::GetMinWidth(nsRenderingContext *aRenderingContext) {
nsColumnSetFrame::GetMinISize(nsRenderingContext *aRenderingContext) {
nscoord width = 0;
DISPLAY_MIN_WIDTH(this, width);
if (mFrames.FirstChild()) {
width = mFrames.FirstChild()->GetMinWidth(aRenderingContext);
width = mFrames.FirstChild()->GetMinISize(aRenderingContext);
}
const nsStyleColumn* colStyle = StyleColumn();
nscoord colWidth;
@ -372,7 +372,7 @@ nsColumnSetFrame::GetMinWidth(nsRenderingContext *aRenderingContext) {
}
nscoord
nsColumnSetFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) {
nsColumnSetFrame::GetPrefISize(nsRenderingContext *aRenderingContext) {
// Our preferred width is our desired column width, if specified, otherwise
// the child's preferred width, times the number of columns, plus the width
// of any required column gaps
@ -386,7 +386,7 @@ nsColumnSetFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) {
if (colStyle->mColumnWidth.GetUnit() == eStyleUnit_Coord) {
colWidth = colStyle->mColumnWidth.GetCoordValue();
} else if (mFrames.FirstChild()) {
colWidth = mFrames.FirstChild()->GetPrefWidth(aRenderingContext);
colWidth = mFrames.FirstChild()->GetPrefISize(aRenderingContext);
} else {
colWidth = 0;
}

View File

@ -32,8 +32,8 @@ public:
nsIFrame* aOldFrame) MOZ_OVERRIDE;
#endif
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
/**
* Retrieve the available height for content of this frame. The available content

View File

@ -126,14 +126,14 @@ nsFirstLetterFrame::AddInlinePrefWidth(nsRenderingContext *aRenderingContext,
// Needed for floating first-letter frames.
/* virtual */ nscoord
nsFirstLetterFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsFirstLetterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
return nsLayoutUtils::MinWidthFromInline(this, aRenderingContext);
}
// Needed for floating first-letter frames.
/* virtual */ nscoord
nsFirstLetterFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsFirstLetterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
return nsLayoutUtils::PrefWidthFromInline(this, aRenderingContext);
}

View File

@ -43,8 +43,8 @@ public:
~(nsIFrame::eBidiInlineContainer));
}
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
InlineMinWidthData *aData) MOZ_OVERRIDE;
virtual void AddInlinePrefWidth(nsRenderingContext *aRenderingContext,

View File

@ -1332,7 +1332,7 @@ nsFlexContainerFrame::
nsRefPtr<nsRenderingContext> rctx =
aPresContext->PresShell()->CreateReferenceRenderingContext();
if (minSizeNeedsToMeasureContent) {
resolvedMinSize = std::min(resolvedMinSize, aFlexItem.Frame()->GetMinWidth(rctx));
resolvedMinSize = std::min(resolvedMinSize, aFlexItem.Frame()->GetMinISize(rctx));
}
NS_ASSERTION(!flexBasisNeedsToMeasureContent,
"flex-basis:auto should have been resolved in the "
@ -3781,7 +3781,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
}
/* virtual */ nscoord
nsFlexContainerFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
nsFlexContainerFrame::GetMinISize(nsRenderingContext* aRenderingContext)
{
nscoord minWidth = 0;
DISPLAY_MIN_WIDTH(this, minWidth);
@ -3807,7 +3807,7 @@ nsFlexContainerFrame::GetMinWidth(nsRenderingContext* aRenderingContext)
}
/* virtual */ nscoord
nsFlexContainerFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
nsFlexContainerFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
{
nscoord prefWidth = 0;
DISPLAY_PREF_WIDTH(this, prefWidth);

View File

@ -48,9 +48,9 @@ public:
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nscoord
GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord
GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
GetPrefISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP

View File

@ -3798,7 +3798,7 @@ nsFrame::MarkIntrinsicWidthsDirty()
}
/* virtual */ nscoord
nsFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -3806,7 +3806,7 @@ nsFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
@ -4248,11 +4248,11 @@ nsFrame::ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
AutoMaybeDisableFontInflation an(this);
nscoord result;
nscoord minWidth = GetMinWidth(aRenderingContext);
nscoord minWidth = GetMinISize(aRenderingContext);
if (minWidth > aWidthInCB) {
result = minWidth;
} else {
nscoord prefWidth = GetPrefWidth(aRenderingContext);
nscoord prefWidth = GetPrefISize(aRenderingContext);
if (prefWidth > aWidthInCB) {
result = aWidthInCB;
} else {
@ -7899,9 +7899,9 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
AutoMaybeDisableFontInflation an(this);
metrics->mBlockPrefSize.width =
GetPrefWidth(rendContext) + bp.LeftRight();
GetPrefISize(rendContext) + bp.LeftRight();
metrics->mBlockMinSize.width =
GetMinWidth(rendContext) + bp.LeftRight();
GetMinISize(rendContext) + bp.LeftRight();
}
// do the nasty.

View File

@ -238,8 +238,8 @@ public:
virtual bool IsSelfEmpty() MOZ_OVERRIDE;
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
InlineMinWidthData *aData) MOZ_OVERRIDE;
virtual void AddInlinePrefWidth(nsRenderingContext *aRenderingContext,
@ -280,7 +280,7 @@ public:
/**
* Utility function for ComputeAutoSize implementations. Return
* max(GetMinWidth(), min(aWidthInCB, GetPrefWidth()))
* max(GetMinISize(), min(aWidthInCB, GetPrefISize()))
*/
nscoord ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
nscoord aWidthInCB);

View File

@ -686,17 +686,17 @@ nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingCon
}
/* virtual */ nscoord
nsHTMLScrollFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsHTMLScrollFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetMinWidth(aRenderingContext);
nscoord result = mHelper.mScrolledFrame->GetMinISize(aRenderingContext);
DISPLAY_MIN_WIDTH(this, result);
return result + GetIntrinsicVScrollbarWidth(aRenderingContext);
}
/* virtual */ nscoord
nsHTMLScrollFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsHTMLScrollFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetPrefWidth(aRenderingContext);
nscoord result = mHelper.mScrolledFrame->GetPrefISize(aRenderingContext);
DISPLAY_PREF_WIDTH(this, result);
return NSCoordSaturatingAdd(result, GetIntrinsicVScrollbarWidth(aRenderingContext));
}

View File

@ -485,8 +485,8 @@ public:
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
}
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
virtual bool IsCollapsed() MOZ_OVERRIDE;
@ -776,7 +776,7 @@ public:
// XXXldb Is this actually used?
#if 0
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
#endif
virtual bool UpdateOverflow() MOZ_OVERRIDE {

View File

@ -124,7 +124,7 @@ nsHTMLCanvasFrame::GetCanvasSize()
}
/* virtual */ nscoord
nsHTMLCanvasFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsHTMLCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -134,7 +134,7 @@ nsHTMLCanvasFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsHTMLCanvasFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsHTMLCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.

View File

@ -56,8 +56,8 @@ public:
/* get the size of the canvas's image */
nsIntSize GetCanvasSize();
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;
virtual nsSize ComputeSize(nsRenderingContext *aRenderingContext,

View File

@ -1445,8 +1445,8 @@ public:
virtual void MarkIntrinsicWidthsDirty() = 0;
/**
* Get the intrinsic minimum width of the frame. This must be less
* than or equal to the intrinsic width.
* Get the min-content intrinsic inline size of the frame. This must be
* less than or equal to the max-content intrinsic inline size.
*
* This is *not* affected by the CSS 'min-width', 'width', and
* 'max-width' properties on this frame, but it is affected by the
@ -1465,15 +1465,15 @@ public:
*
* This method must not return a negative value.
*/
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) = 0;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) = 0;
/**
* Get the intrinsic width of the frame. This must be greater than or
* equal to the intrinsic minimum width.
* Get the max-content intrinsic inline size of the frame. This must be
* greater than or equal to the min-content intrinsic inline size.
*
* Otherwise, all the comments for |GetMinWidth| above apply.
* Otherwise, all the comments for |GetMinISize| above apply.
*/
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) = 0;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) = 0;
/**
* |InlineIntrinsicWidth| represents the intrinsic width information
@ -1576,13 +1576,13 @@ public:
* |aData->trailingWhitespace| will always be zero (unlike for
* AddInlinePrefWidth).
*
* All the comments for |GetMinWidth| apply, except that this function
* All the comments for |GetMinISize| apply, except that this function
* is responsible for adding padding, border, and margin and for
* considering the effects of 'width', 'min-width', and 'max-width'.
*
* This may be called on any frame. Frames that do not participate in
* line breaking can inherit the default implementation on nsFrame,
* which calls |GetMinWidth|.
* which calls |GetMinISize|.
*/
virtual void
AddInlineMinWidth(nsRenderingContext *aRenderingContext,
@ -1594,7 +1594,7 @@ public:
* represents the intrinsic width information of all the previous
* frames in the inline layout region.
*
* All the comments for |AddInlineMinWidth| and |GetPrefWidth| apply,
* All the comments for |AddInlineMinWidth| and |GetPrefISize| apply,
* except that this fills in an |InlineIntrinsicWidthData| structure
* based on using all *mandatory* breakpoints within the frame.
*/
@ -1702,7 +1702,7 @@ public:
virtual nsRect ComputeTightBounds(gfxContext* aContext) const;
/**
* This function is similar to GetPrefWidth and ComputeTightBounds: it
* This function is similar to GetPrefISize and ComputeTightBounds: it
* computes the left and right coordinates of a preferred tight bounding
* rectangle for the frame. This is a rectangle that would enclose the pixels
* that are drawn if we lay out the element without taking any optional line

View File

@ -817,7 +817,7 @@ nsImageFrame::GetContinuationOffset() const
}
/* virtual */ nscoord
nsImageFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsImageFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -830,7 +830,7 @@ nsImageFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsImageFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsImageFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.

View File

@ -81,8 +81,8 @@ public:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual mozilla::IntrinsicSize GetIntrinsicSize() MOZ_OVERRIDE;
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,

View File

@ -17,7 +17,7 @@ nsLeafFrame::~nsLeafFrame()
NS_IMPL_FRAMEARENA_HELPERS(nsLeafFrame)
/* virtual */ nscoord
nsLeafFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsLeafFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -27,7 +27,7 @@ nsLeafFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsLeafFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsLeafFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -31,11 +31,11 @@ public:
}
/**
* Both GetMinWidth and GetPrefWidth will return whatever GetIntrinsicWidth
* Both GetMinISize and GetPrefISize will return whatever GetIntrinsicWidth
* returns.
*/
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
/**
* Our auto size is just intrinsic width and intrinsic height.

View File

@ -410,7 +410,7 @@ nsObjectFrame::PrepForDrawing(nsIWidget *aWidget)
#define EMBED_DEF_HEIGHT 200
/* virtual */ nscoord
nsObjectFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsObjectFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
@ -426,9 +426,9 @@ nsObjectFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsObjectFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsObjectFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
return nsObjectFrame::GetMinWidth(aRenderingContext);
return nsObjectFrame::GetMinISize(aRenderingContext);
}
void

View File

@ -62,8 +62,8 @@ public:
virtual void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,

View File

@ -624,14 +624,14 @@ nsSubDocumentFrame::GetType() const
}
/* virtual */ nscoord
nsSubDocumentFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsSubDocumentFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
result = subDocRoot->GetMinWidth(aRenderingContext);
result = subDocRoot->GetMinISize(aRenderingContext);
} else {
result = GetIntrinsicWidth();
}
@ -640,14 +640,14 @@ nsSubDocumentFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsSubDocumentFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsSubDocumentFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
result = subDocRoot->GetPrefWidth(aRenderingContext);
result = subDocRoot->GetPrefISize(aRenderingContext);
} else {
result = GetIntrinsicWidth();
}

View File

@ -45,8 +45,8 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual mozilla::IntrinsicSize GetIntrinsicSize() MOZ_OVERRIDE;
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;

View File

@ -4101,14 +4101,14 @@ nsContinuingTextFrame::FirstContinuation() const
// Needed for text frames in XUL.
/* virtual */ nscoord
nsTextFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsTextFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
return nsLayoutUtils::MinWidthFromInline(this, aRenderingContext);
}
// Needed for text frames in XUL.
/* virtual */ nscoord
nsTextFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTextFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
return nsLayoutUtils::PrefWidthFromInline(this, aRenderingContext);
}

View File

@ -201,8 +201,8 @@ public:
void SetFontSizeInflation(float aInflation);
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
InlineMinWidthData *aData) MOZ_OVERRIDE;
virtual void AddInlinePrefWidth(nsRenderingContext *aRenderingContext,

View File

@ -501,14 +501,14 @@ nsSize nsVideoFrame::ComputeSize(nsRenderingContext *aRenderingContext,
aPadding);
}
nscoord nsVideoFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nscoord nsVideoFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = GetVideoIntrinsicSize(aRenderingContext).width;
DISPLAY_MIN_WIDTH(this, result);
return result;
}
nscoord nsVideoFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nscoord nsVideoFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result = GetVideoIntrinsicSize(aRenderingContext).width;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -54,8 +54,8 @@ public:
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
virtual bool IsLeaf() const MOZ_OVERRIDE;

View File

@ -99,27 +99,27 @@ ViewportFrame::RemoveFrame(ChildListID aListID,
#endif
/* virtual */ nscoord
ViewportFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
ViewportFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
if (mFrames.IsEmpty())
result = 0;
else
result = mFrames.FirstChild()->GetMinWidth(aRenderingContext);
result = mFrames.FirstChild()->GetMinISize(aRenderingContext);
return result;
}
/* virtual */ nscoord
ViewportFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
ViewportFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
if (mFrames.IsEmpty())
result = 0;
else
result = mFrames.FirstChild()->GetPrefWidth(aRenderingContext);
result = mFrames.FirstChild()->GetPrefISize(aRenderingContext);
return result;
}

View File

@ -54,8 +54,8 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,

View File

@ -959,7 +959,7 @@ static nscoord AddInterFrameSpacingToSize(nsHTMLReflowMetrics& aDesiredSize,
nsMathMLContainerFrame* aFrame);
/* virtual */ nscoord
nsMathMLContainerFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsMathMLContainerFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -974,7 +974,7 @@ nsMathMLContainerFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsMathMLContainerFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsMathMLContainerFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -93,11 +93,11 @@ public:
nsIFrame* aOldFrame) MOZ_OVERRIDE;
/**
* Both GetMinWidth and GetPrefWidth use the intrinsic width metrics
* Both GetMinISize and GetPrefISize use the intrinsic width metrics
* returned by GetIntrinsicMetrics, including ink overflow.
*/
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
/**
* Return the intrinsic horizontal metrics of the frame's content area.
@ -312,7 +312,7 @@ protected:
// spacing.
// IMPORTANT: This function is only meant to be called in Place() methods as
// the information is available only when set up with the above method
// during Reflow/Stretch() and GetPrefWidth().
// during Reflow/Stretch() and GetPrefISize().
static void
GetReflowAndBoundingMetricsFor(nsIFrame* aFrame,
nsHTMLReflowMetrics& aReflowMetrics,

View File

@ -5206,8 +5206,7 @@ SVGTextFrame::DoReflow()
mState |= NS_STATE_SVG_TEXT_IN_REFLOW;
//XXX GetPrefWidth will become GetInlineSize
nscoord inlineSize = kid->GetPrefWidth(renderingContext);
nscoord inlineSize = kid->GetPrefISize(renderingContext);
WritingMode wm = kid->GetWritingMode();
nsHTMLReflowState reflowState(presContext, kid,
renderingContext,

View File

@ -123,7 +123,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsSVGOuterSVGFrameBase)
// reflowing
/* virtual */ nscoord
nsSVGOuterSVGFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsSVGOuterSVGFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -134,7 +134,7 @@ nsSVGOuterSVGFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsSVGOuterSVGFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsSVGOuterSVGFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -38,8 +38,8 @@ public:
#endif
// nsIFrame:
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual mozilla::IntrinsicSize GetIntrinsicSize() MOZ_OVERRIDE;
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;

View File

@ -37,7 +37,7 @@ BasicTableLayoutStrategy::~BasicTableLayoutStrategy()
}
/* virtual */ nscoord
BasicTableLayoutStrategy::GetMinWidth(nsRenderingContext* aRenderingContext)
BasicTableLayoutStrategy::GetMinISize(nsRenderingContext* aRenderingContext)
{
DISPLAY_MIN_WIDTH(mTableFrame, mMinWidth);
if (mMinWidth == NS_INTRINSIC_WIDTH_UNKNOWN)
@ -46,7 +46,7 @@ BasicTableLayoutStrategy::GetMinWidth(nsRenderingContext* aRenderingContext)
}
/* virtual */ nscoord
BasicTableLayoutStrategy::GetPrefWidth(nsRenderingContext* aRenderingContext,
BasicTableLayoutStrategy::GetPrefISize(nsRenderingContext* aRenderingContext,
bool aComputingSize)
{
DISPLAY_PREF_WIDTH(mTableFrame, mPrefWidth);
@ -90,8 +90,8 @@ GetWidthInfo(nsRenderingContext *aRenderingContext,
// wrapping inside of it should not apply font size inflation.
AutoMaybeDisableFontInflation an(aFrame);
minCoord = aFrame->GetMinWidth(aRenderingContext);
prefCoord = aFrame->GetPrefWidth(aRenderingContext);
minCoord = aFrame->GetMinISize(aRenderingContext);
prefCoord = aFrame->GetPrefISize(aRenderingContext);
// Until almost the end of this function, minCoord and prefCoord
// represent the box-sizing based width values (which mean they
// should include horizontal padding and border width when

View File

@ -24,8 +24,8 @@ public:
virtual ~BasicTableLayoutStrategy();
// nsITableLayoutStrategy implementation
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
bool aComputingSize) MOZ_OVERRIDE;
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;

View File

@ -28,7 +28,7 @@ FixedTableLayoutStrategy::~FixedTableLayoutStrategy()
}
/* virtual */ nscoord
FixedTableLayoutStrategy::GetMinWidth(nsRenderingContext* aRenderingContext)
FixedTableLayoutStrategy::GetMinISize(nsRenderingContext* aRenderingContext)
{
DISPLAY_MIN_WIDTH(mTableFrame, mMinWidth);
if (mMinWidth != NS_INTRINSIC_WIDTH_UNKNOWN)
@ -39,7 +39,7 @@ FixedTableLayoutStrategy::GetMinWidth(nsRenderingContext* aRenderingContext)
// intrinsic widths inside the first row and then reverse the
// algorithm to find the narrowest width that would hold all of
// those intrinsic widths), but it wouldn't be compatible with other
// browsers, or with the use of GetMinWidth by
// browsers, or with the use of GetMinISize by
// nsTableFrame::ComputeSize to determine the width of a fixed
// layout table, since CSS2.1 says:
// The width of the table is then the greater of the value of the
@ -117,7 +117,7 @@ FixedTableLayoutStrategy::GetMinWidth(nsRenderingContext* aRenderingContext)
}
/* virtual */ nscoord
FixedTableLayoutStrategy::GetPrefWidth(nsRenderingContext* aRenderingContext,
FixedTableLayoutStrategy::GetPrefISize(nsRenderingContext* aRenderingContext,
bool aComputingSize)
{
// It's theoretically possible to do something much better here that
@ -240,7 +240,7 @@ FixedTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
// Note that the difference between MIN_WIDTH and
// PREF_WIDTH shouldn't matter for any of these
// values of styleWidth; use MIN_WIDTH for symmetry
// with GetMinWidth above, just in case there is a
// with GetMinISize above, just in case there is a
// difference.
colWidth = nsLayoutUtils::IntrinsicForContainer(
aReflowState.rendContext,

View File

@ -24,8 +24,8 @@ public:
virtual ~FixedTableLayoutStrategy();
// nsITableLayoutStrategy implementation
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
bool aComputingSize) MOZ_OVERRIDE;
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;

View File

@ -23,11 +23,11 @@ class nsITableLayoutStrategy
public:
virtual ~nsITableLayoutStrategy() {}
/** Implement nsIFrame::GetMinWidth for the table */
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) = 0;
/** Implement nsIFrame::GetMinISize for the table */
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) = 0;
/** Implement nsIFrame::GetPrefWidth for the table */
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
/** Implement nsIFrame::GetPrefISize for the table */
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
bool aComputingSize) = 0;
/** Implement nsIFrame::MarkIntrinsicWidthsDirty for the table */

View File

@ -755,7 +755,7 @@ int32_t nsTableCellFrame::GetColSpan()
}
/* virtual */ nscoord
nsTableCellFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsTableCellFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -767,7 +767,7 @@ nsTableCellFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsTableCellFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTableCellFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -102,8 +102,8 @@ public:
nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual IntrinsicWidthOffsetData
IntrinsicWidthOffsets(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;

View File

@ -1504,25 +1504,25 @@ nsTableFrame::MarkIntrinsicWidthsDirty()
}
/* virtual */ nscoord
nsTableFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsTableFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
if (NeedToCalcBCBorders())
CalcBCBorders();
ReflowColGroups(aRenderingContext);
return LayoutStrategy()->GetMinWidth(aRenderingContext);
return LayoutStrategy()->GetMinISize(aRenderingContext);
}
/* virtual */ nscoord
nsTableFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTableFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
if (NeedToCalcBCBorders())
CalcBCBorders();
ReflowColGroups(aRenderingContext);
return LayoutStrategy()->GetPrefWidth(aRenderingContext, false);
return LayoutStrategy()->GetPrefISize(aRenderingContext, false);
}
/* virtual */ nsIFrame::IntrinsicWidthOffsetData
@ -1560,7 +1560,7 @@ nsTableFrame::ComputeSize(nsRenderingContext *aRenderingContext,
AutoMaybeDisableFontInflation an(this);
// Tables never shrink below their min width.
nscoord minWidth = GetMinWidth(aRenderingContext);
nscoord minWidth = GetMinISize(aRenderingContext);
if (minWidth > result.width)
result.width = minWidth;
@ -1576,7 +1576,7 @@ nsTableFrame::TableShrinkWidthToFit(nsRenderingContext *aRenderingContext,
AutoMaybeDisableFontInflation an(this);
nscoord result;
nscoord minWidth = GetMinWidth(aRenderingContext);
nscoord minWidth = GetMinISize(aRenderingContext);
if (minWidth > aWidthInCB) {
result = minWidth;
} else {
@ -1585,10 +1585,10 @@ nsTableFrame::TableShrinkWidthToFit(nsRenderingContext *aRenderingContext,
// relates to handling of percentage widths on columns). So this
// function differs from nsFrame::ShrinkWidthToFit by only the
// following line.
// Since we've already called GetMinWidth, we don't need to do any
// of the other stuff GetPrefWidth does.
// Since we've already called GetMinISize, we don't need to do any
// of the other stuff GetPrefISize does.
nscoord prefWidth =
LayoutStrategy()->GetPrefWidth(aRenderingContext, true);
LayoutStrategy()->GetPrefISize(aRenderingContext, true);
if (prefWidth > aWidthInCB) {
result = aWidthInCB;
} else {
@ -1683,8 +1683,8 @@ nsTableFrame::RequestSpecialHeightReflow(const nsHTMLReflowState& aReflowState)
}
/******************************************************************************************
* Before reflow, intrinsic width calculation is done using GetMinWidth
* and GetPrefWidth. This used to be known as pass 1 reflow.
* Before reflow, intrinsic width calculation is done using GetMinISize
* and GetPrefISize. This used to be known as pass 1 reflow.
*
* After the intrinsic width calculation, the table determines the
* column widths using BalanceColumnWidths() and
@ -3672,7 +3672,7 @@ nsTableFrame::IsAutoLayout()
return true;
// a fixed-layout inline-table must have a width
// and tables with 'width: -moz-max-content' must be auto-layout
// (at least as long as FixedTableLayoutStrategy::GetPrefWidth returns
// (at least as long as FixedTableLayoutStrategy::GetPrefISize returns
// nscoord_MAX)
const nsStyleCoord &width = StylePosition()->mWidth;
return (width.GetUnit() == eStyleUnit_Auto) ||

View File

@ -298,8 +298,8 @@ public:
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
// For border-collapse tables, the caller must not add padding and
// border to the results of these functions.
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual IntrinsicWidthOffsetData
IntrinsicWidthOffsets(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
@ -313,7 +313,7 @@ public:
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
/**
* A copy of nsFrame::ShrinkWidthToFit that calls a different
* GetPrefWidth, since tables have two different ones.
* GetPrefISize, since tables have two different ones.
*/
nscoord TableShrinkWidthToFit(nsRenderingContext *aRenderingContext,
nscoord aWidthInCB);

View File

@ -75,7 +75,7 @@ nsTableCaptionFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
uint8_t captionSide = StyleTableBorder()->mCaptionSide;
if (captionSide == NS_STYLE_CAPTION_SIDE_LEFT ||
captionSide == NS_STYLE_CAPTION_SIDE_RIGHT) {
result.width = GetMinWidth(aRenderingContext);
result.width = GetMinISize(aRenderingContext);
} else if (captionSide == NS_STYLE_CAPTION_SIDE_TOP ||
captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) {
// The outer frame constrains our available width to the width of
@ -83,7 +83,7 @@ nsTableCaptionFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
// larger than the containing block width. (It would really be nice
// to transmit that information another way, so we could grow up to
// the table's available width, but that's harder.)
nscoord min = GetMinWidth(aRenderingContext);
nscoord min = GetMinISize(aRenderingContext);
if (min > aCBSize.width)
min = aCBSize.width;
if (min > result.width)
@ -394,7 +394,7 @@ GetContainingBlockSize(const nsHTMLReflowState& aOuterRS)
}
/* virtual */ nscoord
nsTableOuterFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsTableOuterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord width = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
InnerTableFrame(), nsLayoutUtils::MIN_WIDTH);
@ -416,7 +416,7 @@ nsTableOuterFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsTableOuterFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsTableOuterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord maxWidth;
DISPLAY_PREF_WIDTH(this, maxWidth);
@ -504,8 +504,8 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
// When we're shrink-wrapping, our auto size needs to wrap around the
// actual size of the table, which (if it is specified as a percent)
// could be something that is not reflected in our GetMinWidth and
// GetPrefWidth. See bug 349457 for an example.
// could be something that is not reflected in our GetMinISize and
// GetPrefISize. See bug 349457 for an example.
// Match the availableWidth logic in Reflow.
uint8_t captionSide = GetCaptionSide();

View File

@ -99,8 +99,8 @@ public:
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder,

View File

@ -576,7 +576,7 @@ static void printSize(char * aDesc, nscoord aSize)
#endif
/* virtual */ nscoord
nsBoxFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsBoxFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -598,7 +598,7 @@ nsBoxFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsBoxFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsBoxFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -81,8 +81,8 @@ public:
int32_t aModType) MOZ_OVERRIDE;
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -122,7 +122,7 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
/* virtual */ nscoord
nsLeafBoxFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
nsLeafBoxFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -142,7 +142,7 @@ nsLeafBoxFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsLeafBoxFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
nsLeafBoxFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -40,8 +40,8 @@ public:
// nsIHTMLReflow overrides
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
// Our auto size is that provided by nsFrame, not nsLeafFrame
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,