Bug 1490611 - physical to logical name refactor: DISPLAY_*_WIDTH to DISPLAY_*_INLINE_SIZE(as well as the relevant struct in the macro contents) r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D5657

--HG--
extra : rebase_source : af0fc623d0b5d5e575bb03b08576709512bac4f3
This commit is contained in:
Zhang Junzhi 2018-09-12 12:35:47 +00:00
Родитель 5bbdd76eb8
Коммит 7a64d2f663
37 изменённых файлов: 91 добавлений и 89 удалений

Просмотреть файл

@ -25,6 +25,8 @@
// +1 is to avoid clamped huge margin values being processed as auto margins
#define NS_AUTOMARGIN (NS_UNCONSTRAINEDSIZE + 1)
// FIXME The macro should go through a renaming refactoring to reflect the fact
// that it means an inline size, not a width.
#define NS_INTRINSIC_WIDTH_UNKNOWN nscoord_MIN

Просмотреть файл

@ -5799,7 +5799,7 @@ nsLayoutUtils::MinISizeFromInline(nsIFrame* aFrame,
"should not be container for font size inflation");
nsIFrame::InlineMinISizeData data;
DISPLAY_MIN_WIDTH(aFrame, data.mPrevLines);
DISPLAY_MIN_INLINE_SIZE(aFrame, data.mPrevLines);
aFrame->AddInlineMinISize(aRenderingContext, &data);
data.ForceBreak();
return data.mPrevLines;
@ -5813,7 +5813,7 @@ nsLayoutUtils::PrefISizeFromInline(nsIFrame* aFrame,
"should not be container for font size inflation");
nsIFrame::InlinePrefISizeData data;
DISPLAY_PREF_WIDTH(aFrame, data.mPrevLines);
DISPLAY_PREF_INLINE_SIZE(aFrame, data.mPrevLines);
aFrame->AddInlinePrefISize(aRenderingContext, &data);
data.ForceBreak();
return data.mPrevLines;

Просмотреть файл

@ -53,7 +53,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
nsCheckboxRadioFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
result = StyleDisplay()->HasAppearance() ? DefaultSize() : 0;
return result;
}
@ -62,7 +62,7 @@ nsCheckboxRadioFrame::GetMinISize(gfxContext *aRenderingContext)
nsCheckboxRadioFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
result = StyleDisplay()->HasAppearance() ? DefaultSize() : 0;
return result;
}

Просмотреть файл

@ -823,7 +823,7 @@ nscoord
nsComboboxControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord minISize;
DISPLAY_MIN_WIDTH(this, minISize);
DISPLAY_MIN_INLINE_SIZE(this, minISize);
minISize = GetIntrinsicISize(aRenderingContext, nsLayoutUtils::MIN_ISIZE);
return minISize;
}
@ -832,7 +832,7 @@ nscoord
nsComboboxControlFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord prefISize;
DISPLAY_PREF_WIDTH(this, prefISize);
DISPLAY_PREF_INLINE_SIZE(this, prefISize);
prefISize = GetIntrinsicISize(aRenderingContext, nsLayoutUtils::PREF_ISIZE);
return prefISize;
}

Просмотреть файл

@ -152,7 +152,7 @@ nscoord
nsDateTimeControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsIFrame* kid = mFrames.FirstChild();
if (kid) { // display:none?
@ -170,7 +170,7 @@ nscoord
nsDateTimeControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsIFrame* kid = mFrames.FirstChild();
if (kid) { // display:none?

Просмотреть файл

@ -350,7 +350,7 @@ nscoord
nsFieldSetFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
result = GetIntrinsicISize(aRenderingContext, nsLayoutUtils::MIN_ISIZE);
return result;
@ -360,7 +360,7 @@ nscoord
nsFieldSetFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
result = GetIntrinsicISize(aRenderingContext, nsLayoutUtils::PREF_ISIZE);
return result;

Просмотреть файл

@ -419,9 +419,9 @@ nscoord
nsFileControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
// Our min width is our pref width
// Our min inline size is our pref inline size
result = GetPrefISize(aRenderingContext);
return result;
}

Просмотреть файл

@ -145,7 +145,7 @@ nscoord
nsHTMLButtonControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
if (StyleDisplay()->IsContainSize()) {
result = 0;
} else {
@ -161,7 +161,7 @@ nscoord
nsHTMLButtonControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
if (StyleDisplay()->IsContainSize()) {
result = 0;
} else {

Просмотреть файл

@ -329,7 +329,7 @@ nscoord
nsListControlFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
// Always add scrollbar inline sizes to the pref-inline-size of the
// scrolled content. Combobox frames depend on this happening in the
@ -347,7 +347,7 @@ nscoord
nsListControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
// Always add scrollbar inline sizes to the min-inline-size of the
// scrolled content. Combobox frames depend on this happening in the

Просмотреть файл

@ -67,7 +67,7 @@ nscoord
nsNumberControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsIFrame* kid = mFrames.FirstChild();
if (kid) { // display:none?
@ -85,7 +85,7 @@ nscoord
nsNumberControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsIFrame* kid = mFrames.FirstChild();
if (kid) { // display:none?

Просмотреть файл

@ -542,7 +542,7 @@ nscoord
nsTextControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
float inflation = nsLayoutUtils::FontSizeInflationFor(this);
WritingMode wm = GetWritingMode();
result = CalcIntrinsicSize(aRenderingContext, wm, inflation).ISize(wm);
@ -552,9 +552,9 @@ nsTextControlFrame::GetPrefISize(gfxContext* aRenderingContext)
nscoord
nsTextControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
// Our min width is just our preferred width if we have auto width.
// Our min inline size is just our preferred width if we have auto inline size
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
result = GetPrefISize(aRenderingContext);
return result;
}

Просмотреть файл

@ -199,7 +199,7 @@ BRFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
BRFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
return result;
}
@ -207,7 +207,7 @@ BRFrame::GetMinISize(gfxContext *aRenderingContext)
BRFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
return result;
}

Просмотреть файл

@ -226,7 +226,7 @@ ViewportFrame::RemoveFrame(ChildListID aListID,
ViewportFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
if (mFrames.IsEmpty())
result = 0;
else
@ -239,7 +239,7 @@ ViewportFrame::GetMinISize(gfxContext *aRenderingContext)
ViewportFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
if (mFrames.IsEmpty())
result = 0;
else

Просмотреть файл

@ -752,7 +752,7 @@ nsBlockFrame::GetMinISize(gfxContext *aRenderingContext)
if (firstInFlow != this)
return firstInFlow->GetMinISize(aRenderingContext);
DISPLAY_MIN_WIDTH(this, mMinWidth);
DISPLAY_MIN_INLINE_SIZE(this, mMinWidth);
CheckIntrinsicCacheAgainstShrinkWrapState();
@ -845,7 +845,7 @@ nsBlockFrame::GetPrefISize(gfxContext *aRenderingContext)
if (firstInFlow != this)
return firstInFlow->GetPrefISize(aRenderingContext);
DISPLAY_PREF_WIDTH(this, mPrefWidth);
DISPLAY_PREF_INLINE_SIZE(this, mPrefWidth);
CheckIntrinsicCacheAgainstShrinkWrapState();

Просмотреть файл

@ -951,6 +951,8 @@ protected:
int32_t GetDepth() const;
#endif
// FIXME The two variables should go through a renaming refactoring to reflect
// the fact that they mean an inline size, not a width.
nscoord mMinWidth, mPrefWidth;
nsLineList mLines;

Просмотреть файл

@ -1080,7 +1080,7 @@ nsBulletFrame::GetMinISize(gfxContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
ReflowOutput reflowOutput(wm);
DISPLAY_MIN_WIDTH(this, reflowOutput.ISize(wm));
DISPLAY_MIN_INLINE_SIZE(this, reflowOutput.ISize(wm));
LogicalMargin padding(wm);
GetDesiredSize(PresContext(), aRenderingContext, reflowOutput, 1.0f, &padding);
reflowOutput.ISize(wm) += padding.IStartEnd(wm);
@ -1092,7 +1092,7 @@ nsBulletFrame::GetPrefISize(gfxContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
ReflowOutput metrics(wm);
DISPLAY_PREF_WIDTH(this, metrics.ISize(wm));
DISPLAY_PREF_INLINE_SIZE(this, metrics.ISize(wm));
LogicalMargin padding(wm);
GetDesiredSize(PresContext(), aRenderingContext, metrics, 1.0f, &padding);
metrics.ISize(wm) += padding.IStartEnd(wm);

Просмотреть файл

@ -711,7 +711,7 @@ nsCanvasFrame::PaintFocus(DrawTarget* aDrawTarget, nsPoint aPt)
nsCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
if (mFrames.IsEmpty())
result = 0;
else
@ -723,7 +723,7 @@ nsCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
nsCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
if (mFrames.IsEmpty())
result = 0;
else

Просмотреть файл

@ -503,7 +503,7 @@ nscoord
nsColumnSetFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord iSize = 0;
DISPLAY_MIN_WIDTH(this, iSize);
DISPLAY_MIN_INLINE_SIZE(this, iSize);
if (mFrames.FirstChild() && !StyleDisplay()->IsContainSize()) {
// We want to ignore this in the case that we're size contained
@ -546,7 +546,7 @@ nsColumnSetFrame::GetPrefISize(gfxContext *aRenderingContext)
// of any required column gaps
// XXX what about forced column breaks here?
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
const nsStyleColumn* colStyle = StyleColumn();
nscoord colGap = GetColumnGap(this, NS_UNCONSTRAINEDSIZE);

Просмотреть файл

@ -5355,7 +5355,7 @@ nsFlexContainerFrame::IntrinsicISize(gfxContext* aRenderingContext,
/* virtual */ nscoord
nsFlexContainerFrame::GetMinISize(gfxContext* aRenderingContext)
{
DISPLAY_MIN_WIDTH(this, mCachedMinISize);
DISPLAY_MIN_INLINE_SIZE(this, mCachedMinISize);
if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
mCachedMinISize = StyleDisplay()->IsContainSize()
? 0
@ -5368,7 +5368,7 @@ nsFlexContainerFrame::GetMinISize(gfxContext* aRenderingContext)
/* virtual */ nscoord
nsFlexContainerFrame::GetPrefISize(gfxContext* aRenderingContext)
{
DISPLAY_PREF_WIDTH(this, mCachedPrefISize);
DISPLAY_PREF_INLINE_SIZE(this, mCachedPrefISize);
if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
mCachedPrefISize = StyleDisplay()->IsContainSize()
? 0

Просмотреть файл

@ -5259,7 +5259,7 @@ nsFrame::MarkIntrinsicISizesDirty()
nsFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
return result;
}
@ -5267,7 +5267,7 @@ nsFrame::GetMinISize(gfxContext *aRenderingContext)
nsFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
return result;
}
@ -11574,7 +11574,7 @@ DR_layout_cookie::~DR_layout_cookie()
nsFrame::DisplayLayoutExit(mFrame, mValue);
}
DR_intrinsic_width_cookie::DR_intrinsic_width_cookie(
DR_intrinsic_inline_size_cookie::DR_intrinsic_inline_size_cookie(
nsIFrame* aFrame,
const char* aType,
nscoord& aResult)
@ -11582,13 +11582,13 @@ DR_intrinsic_width_cookie::DR_intrinsic_width_cookie(
, mType(aType)
, mResult(aResult)
{
MOZ_COUNT_CTOR(DR_intrinsic_width_cookie);
MOZ_COUNT_CTOR(DR_intrinsic_inline_size_cookie);
mValue = nsFrame::DisplayIntrinsicISizeEnter(mFrame, mType);
}
DR_intrinsic_width_cookie::~DR_intrinsic_width_cookie()
DR_intrinsic_inline_size_cookie::~DR_intrinsic_inline_size_cookie()
{
MOZ_COUNT_DTOR(DR_intrinsic_width_cookie);
MOZ_COUNT_DTOR(DR_intrinsic_inline_size_cookie);
nsFrame::DisplayIntrinsicISizeExit(mFrame, mType, mResult, mValue);
}
@ -12384,7 +12384,7 @@ void* nsFrame::DisplayIntrinsicISizeEnter(nsIFrame* aFrame,
DR_FrameTreeNode* treeNode = DR_state->CreateTreeNode(aFrame, nullptr);
if (treeNode && treeNode->mDisplay) {
DR_state->DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
printf("Get%sWidth\n", aType);
printf("Get%sISize\n", aType);
}
return treeNode;
}
@ -12498,9 +12498,9 @@ void nsFrame::DisplayIntrinsicISizeExit(nsIFrame* aFrame,
DR_FrameTreeNode* treeNode = (DR_FrameTreeNode*)aFrameTreeNode;
if (treeNode->mDisplay) {
DR_state->DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
char width[16];
DR_state->PrettyUC(aResult, width, 16);
printf("Get%sWidth=%s\n", aType, width);
char iSize[16];
DR_state->PrettyUC(aResult, iSize, 16);
printf("Get%sISize=%s\n", aType, iSize);
}
DR_state->DeleteTreeNode(*treeNode);
}

Просмотреть файл

@ -792,10 +792,10 @@ public:
void* mValue;
};
struct DR_intrinsic_width_cookie {
DR_intrinsic_width_cookie(nsIFrame* aFrame, const char* aType,
struct DR_intrinsic_inline_size_cookie {
DR_intrinsic_inline_size_cookie(nsIFrame* aFrame, const char* aType,
nscoord& aResult);
~DR_intrinsic_width_cookie();
~DR_intrinsic_inline_size_cookie();
nsIFrame* mFrame;
const char* mType;
@ -854,12 +854,10 @@ public:
dr_cookie.Change();
#define DISPLAY_LAYOUT(dr_frame) \
DR_layout_cookie dr_cookie(dr_frame);
// FIXME DISPLAY_*_WIDTH should go through a renaming refactoring to reflect the
// fact that it's displaying a minimum inline size, not a minimum width.
#define DISPLAY_MIN_WIDTH(dr_frame, dr_result) \
DR_intrinsic_width_cookie dr_cookie(dr_frame, "Min", dr_result)
#define DISPLAY_PREF_WIDTH(dr_frame, dr_result) \
DR_intrinsic_width_cookie dr_cookie(dr_frame, "Pref", dr_result)
#define DISPLAY_MIN_INLINE_SIZE(dr_frame, dr_result) \
DR_intrinsic_inline_size_cookie dr_cookie(dr_frame, "Min", dr_result)
#define DISPLAY_PREF_INLINE_SIZE(dr_frame, dr_result) \
DR_intrinsic_inline_size_cookie dr_cookie(dr_frame, "Pref", dr_result)
#define DISPLAY_PREF_SIZE(dr_frame, dr_result) \
DR_intrinsic_size_cookie dr_cookie(dr_frame, "Pref", dr_result)
#define DISPLAY_MIN_SIZE(dr_frame, dr_result) \
@ -882,8 +880,8 @@ public:
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
#define DISPLAY_REFLOW_CHANGE()
#define DISPLAY_LAYOUT(dr_frame) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_MIN_WIDTH(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_PREF_WIDTH(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_MIN_INLINE_SIZE(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_PREF_INLINE_SIZE(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_PREF_SIZE(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_MIN_SIZE(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO
#define DISPLAY_MAX_SIZE(dr_frame, dr_result) PR_BEGIN_MACRO PR_END_MACRO

Просмотреть файл

@ -866,7 +866,7 @@ nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext)
nsHTMLScrollFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetMinISize(aRenderingContext);
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
return result + GetIntrinsicVScrollbarWidth(aRenderingContext);
}
@ -874,7 +874,7 @@ nsHTMLScrollFrame::GetMinISize(gfxContext *aRenderingContext)
nsHTMLScrollFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetPrefISize(aRenderingContext);
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
return NSCoordSaturatingAdd(result, GetIntrinsicVScrollbarWidth(aRenderingContext));
}

Просмотреть файл

@ -6517,7 +6517,7 @@ nsGridContainerFrame::IntrinsicISize(gfxContext* aRenderingContext,
nscoord
nsGridContainerFrame::GetMinISize(gfxContext* aRC)
{
DISPLAY_MIN_WIDTH(this, mCachedMinISize);
DISPLAY_MIN_INLINE_SIZE(this, mCachedMinISize);
if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
mCachedMinISize = StyleDisplay()->IsContainSize()
? 0
@ -6529,7 +6529,7 @@ nsGridContainerFrame::GetMinISize(gfxContext* aRC)
nscoord
nsGridContainerFrame::GetPrefISize(gfxContext* aRC)
{
DISPLAY_PREF_WIDTH(this, mCachedPrefISize);
DISPLAY_PREF_INLINE_SIZE(this, mCachedPrefISize);
if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
mCachedPrefISize = StyleDisplay()->IsContainSize()
? 0

Просмотреть файл

@ -279,7 +279,7 @@ nsHTMLCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
bool vertical = GetWritingMode().IsVertical();
nscoord result = nsPresContext::CSSPixelsToAppUnits(
vertical ? GetCanvasSize().height : GetCanvasSize().width);
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
return result;
}
@ -291,7 +291,7 @@ nsHTMLCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
bool vertical = GetWritingMode().IsVertical();
nscoord result = nsPresContext::CSSPixelsToAppUnits(
vertical ? GetCanvasSize().height : GetCanvasSize().width);
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
return result;
}

Просмотреть файл

@ -1037,7 +1037,7 @@ nsImageFrame::GetMinISize(gfxContext *aRenderingContext)
// XXX The caller doesn't account for constraints of the block-size,
// min-block-size, and max-block-size properties.
DebugOnly<nscoord> result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
EnsureIntrinsicSizeAndRatio();
const nsStyleCoord& iSize = GetWritingMode().IsVertical() ?
mIntrinsicSize.height : mIntrinsicSize.width;
@ -1050,7 +1050,7 @@ nsImageFrame::GetPrefISize(gfxContext *aRenderingContext)
// XXX The caller doesn't account for constraints of the block-size,
// min-block-size, and max-block-size properties.
DebugOnly<nscoord> result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
EnsureIntrinsicSizeAndRatio();
const nsStyleCoord& iSize = GetWritingMode().IsVertical() ?
mIntrinsicSize.height : mIntrinsicSize.width;

Просмотреть файл

@ -19,7 +19,7 @@ nsLeafFrame::~nsLeafFrame()
nsLeafFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
result = GetIntrinsicISize();
return result;
}
@ -28,7 +28,7 @@ nsLeafFrame::GetMinISize(gfxContext *aRenderingContext)
nsLeafFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
result = GetIntrinsicISize();
return result;
}

Просмотреть файл

@ -381,7 +381,7 @@ nsPluginFrame::GetMinISize(gfxContext *aRenderingContext)
}
}
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
return result;
}

Просмотреть файл

@ -690,7 +690,7 @@ nsresult nsSubDocumentFrame::GetFrameName(nsAString& aResult) const
nsSubDocumentFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
@ -706,7 +706,7 @@ nsSubDocumentFrame::GetMinISize(gfxContext *aRenderingContext)
nsSubDocumentFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {

Просмотреть файл

@ -687,7 +687,7 @@ nsVideoFrame::ComputeSize(gfxContext *aRenderingContext,
nscoord nsVideoFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
if (HasVideoElement()) {
nsSize size = GetVideoIntrinsicSize(aRenderingContext);
@ -711,7 +711,7 @@ nscoord nsVideoFrame::GetMinISize(gfxContext *aRenderingContext)
nscoord nsVideoFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
if (HasVideoElement()) {
nsSize size = GetVideoIntrinsicSize(aRenderingContext);

Просмотреть файл

@ -977,7 +977,7 @@ nsMathMLContainerFrame::UpdateIntrinsicWidth(gfxContext* aRenderingContext)
nsMathMLContainerFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
UpdateIntrinsicWidth(aRenderingContext);
result = mIntrinsicWidth;
return result;
@ -987,7 +987,7 @@ nsMathMLContainerFrame::GetMinISize(gfxContext* aRenderingContext)
nsMathMLContainerFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
UpdateIntrinsicWidth(aRenderingContext);
result = mIntrinsicWidth;
return result;

Просмотреть файл

@ -156,7 +156,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsSVGDisplayContainerFrame)
nsSVGOuterSVGFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
result = nscoord(0);
@ -167,7 +167,7 @@ nsSVGOuterSVGFrame::GetMinISize(gfxContext *aRenderingContext)
nsSVGOuterSVGFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
SVGSVGElement *svg = static_cast<SVGSVGElement*>(GetContent());
WritingMode wm = GetWritingMode();

Просмотреть файл

@ -43,7 +43,7 @@ BasicTableLayoutStrategy::~BasicTableLayoutStrategy()
/* virtual */ nscoord
BasicTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext)
{
DISPLAY_MIN_WIDTH(mTableFrame, mMinISize);
DISPLAY_MIN_INLINE_SIZE(mTableFrame, mMinISize);
if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
ComputeIntrinsicISizes(aRenderingContext);
}
@ -54,7 +54,7 @@ BasicTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext)
BasicTableLayoutStrategy::GetPrefISize(gfxContext* aRenderingContext,
bool aComputingSize)
{
DISPLAY_PREF_WIDTH(mTableFrame, mPrefISize);
DISPLAY_PREF_INLINE_SIZE(mTableFrame, mPrefISize);
NS_ASSERTION((mPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
(mPrefISizePctExpand == NS_INTRINSIC_WIDTH_UNKNOWN),
"dirtyness out of sync");

Просмотреть файл

@ -30,7 +30,7 @@ FixedTableLayoutStrategy::~FixedTableLayoutStrategy()
/* virtual */ nscoord
FixedTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext)
{
DISPLAY_MIN_WIDTH(mTableFrame, mMinISize);
DISPLAY_MIN_INLINE_SIZE(mTableFrame, mMinISize);
if (mMinISize != NS_INTRINSIC_WIDTH_UNKNOWN) {
return mMinISize;
}
@ -47,8 +47,8 @@ FixedTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext)
// 'width' property for the table element and the sum of the column
// widths (plus cell spacing or borders).
// XXX Should we really ignore 'min-width' and 'max-width'?
// XXX Should we really ignore widths on column groups?
// XXX Should we really ignore 'min-inline-size' and 'max-inline-size'?
// XXX Should we really ignore inline sizes on column groups?
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
int32_t colCount = cellMap->GetColCount();
@ -128,7 +128,7 @@ FixedTableLayoutStrategy::GetPrefISize(gfxContext* aRenderingContext,
// those intrinsic inline sizes), but it wouldn't be compatible with
// other browsers.
nscoord result = nscoord_MAX;
DISPLAY_PREF_WIDTH(mTableFrame, result);
DISPLAY_PREF_INLINE_SIZE(mTableFrame, result);
return result;
}

Просмотреть файл

@ -756,7 +756,7 @@ nsTableCellFrame::GetColSpan()
nsTableCellFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsIFrame *inner = mFrames.FirstChild();
result = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, inner,
@ -768,7 +768,7 @@ nsTableCellFrame::GetMinISize(gfxContext *aRenderingContext)
nsTableCellFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsIFrame *inner = mFrames.FirstChild();
result = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, inner,

Просмотреть файл

@ -321,7 +321,7 @@ nsTableWrapperFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord iSize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
InnerTableFrame(), nsLayoutUtils::MIN_ISIZE);
DISPLAY_MIN_WIDTH(this, iSize);
DISPLAY_MIN_INLINE_SIZE(this, iSize);
if (mCaptionFrames.NotEmpty()) {
nscoord capISize =
nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
@ -342,7 +342,7 @@ nsTableWrapperFrame::GetMinISize(gfxContext *aRenderingContext)
nsTableWrapperFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord maxISize;
DISPLAY_PREF_WIDTH(this, maxISize);
DISPLAY_PREF_INLINE_SIZE(this, maxISize);
maxISize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
InnerTableFrame(), nsLayoutUtils::PREF_ISIZE);

Просмотреть файл

@ -545,7 +545,7 @@ static void printSize(char * aDesc, nscoord aSize)
nsBoxFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsBoxLayoutState state(PresContext(), aRenderingContext);
nsSize minSize = GetXULMinSize(state);
@ -567,7 +567,7 @@ nsBoxFrame::GetMinISize(gfxContext *aRenderingContext)
nsBoxFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsBoxLayoutState state(PresContext(), aRenderingContext);
nsSize prefSize = GetXULPrefSize(state);

Просмотреть файл

@ -111,7 +111,7 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsLeafBoxFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
DISPLAY_MIN_INLINE_SIZE(this, result);
nsBoxLayoutState state(PresContext(), aRenderingContext);
WritingMode wm = GetWritingMode();
@ -133,7 +133,7 @@ nsLeafBoxFrame::GetMinISize(gfxContext *aRenderingContext)
nsLeafBoxFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
DISPLAY_PREF_INLINE_SIZE(this, result);
nsBoxLayoutState state(PresContext(), aRenderingContext);
WritingMode wm = GetWritingMode();