зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1155880
part 1: Rename nsITableLayoutStrategy::ComputeColumnWidths and associated comments to use "ISize" instead of "Width". r=jfkthame
This commit is contained in:
Родитель
11411ee0a4
Коммит
2f0de265e8
|
@ -523,7 +523,7 @@ BasicTableLayoutStrategy::MarkIntrinsicISizesDirty()
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
BasicTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowState)
|
||||
BasicTableLayoutStrategy::ComputeColumnISizes(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
nscoord width = aReflowState.ComputedWidth();
|
||||
|
||||
|
@ -549,7 +549,7 @@ BasicTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
|
|||
DistributeWidthToColumns(width, 0, colCount, BTLS_FINAL_WIDTH, false);
|
||||
|
||||
#ifdef DEBUG_TABLE_STRATEGY
|
||||
printf("ComputeColumnWidths final\n");
|
||||
printf("ComputeColumnISizes final\n");
|
||||
mTableFrame->Dump(false, true, false);
|
||||
#endif
|
||||
}
|
||||
|
@ -850,7 +850,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
|
|||
}
|
||||
|
||||
#ifdef DEBUG_dbaron_off
|
||||
printf("ComputeColumnWidths: %d columns in width %d,\n"
|
||||
printf("ComputeColumnISizes: %d columns in width %d,\n"
|
||||
" guesses=[%d,%d,%d,%d], totals=[%d,%d,%f],\n"
|
||||
" l2t=%d, space=%d, basis.c=%d\n",
|
||||
aColCount, aWidth,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
* Web-compatible algorithms that determine column and table widths,
|
||||
* Web-compatible algorithms that determine column and table isizes,
|
||||
* used for CSS2's 'table-layout: auto'.
|
||||
*/
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
|||
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
|
||||
bool aComputingSize) override;
|
||||
virtual void MarkIntrinsicISizesDirty() override;
|
||||
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) override;
|
||||
virtual void ComputeColumnISizes(const nsHTMLReflowState& aReflowState) override;
|
||||
|
||||
private:
|
||||
// NOTE: Using prefix "BTLS" to avoid overlapping names with
|
||||
|
|
|
@ -151,7 +151,7 @@ AllocateUnassigned(nscoord aUnassignedSpace, float aShare)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
FixedTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowState)
|
||||
FixedTableLayoutStrategy::ComputeColumnISizes(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
nscoord tableWidth = aReflowState.ComputedWidth();
|
||||
|
||||
|
@ -173,7 +173,7 @@ FixedTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
|
|||
// store the old column widths. We might call multiple times SetFinalWidth
|
||||
// on the columns, due to this we can't compare at the last call that the
|
||||
// width has changed with the respect to the last call to
|
||||
// ComputeColumnWidths. In order to overcome this we store the old values
|
||||
// ComputeColumnISizes. In order to overcome this we store the old values
|
||||
// in this array. A single call to SetFinalWidth would make it possible to
|
||||
// call GetFinalWidth before and to compare when setting the final width.
|
||||
nsTArray<nscoord> oldColWidths;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
* Algorithms that determine column and table widths used for CSS2's
|
||||
* Algorithms that determine column and table isizes used for CSS2's
|
||||
* 'table-layout: fixed'.
|
||||
*/
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
|||
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
|
||||
bool aComputingSize) override;
|
||||
virtual void MarkIntrinsicISizesDirty() override;
|
||||
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) override;
|
||||
virtual void ComputeColumnISizes(const nsHTMLReflowState& aReflowState) override;
|
||||
|
||||
private:
|
||||
nsTableFrame *mTableFrame;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
/*
|
||||
* interface for the set of algorithms that determine column and table
|
||||
* widths
|
||||
* isizes
|
||||
*/
|
||||
|
||||
#ifndef nsITableLayoutStrategy_h_
|
||||
|
@ -34,10 +34,10 @@ public:
|
|||
virtual void MarkIntrinsicISizesDirty() = 0;
|
||||
|
||||
/**
|
||||
* Compute final column widths based on the intrinsic width data and
|
||||
* the available width.
|
||||
* Compute final column isizes based on the intrinsic isize data and
|
||||
* the available isize.
|
||||
*/
|
||||
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) = 0;
|
||||
virtual void ComputeColumnISizes(const nsHTMLReflowState& aReflowState) = 0;
|
||||
|
||||
/**
|
||||
* Return the type of table layout strategy, without the cost of
|
||||
|
|
|
@ -2028,7 +2028,7 @@ nsTableFrame::ReflowTable(nsHTMLReflowMetrics& aDesiredSize,
|
|||
aLastChildReflowed = nullptr;
|
||||
|
||||
if (!GetPrevInFlow()) {
|
||||
mTableLayoutStrategy->ComputeColumnWidths(aReflowState);
|
||||
mTableLayoutStrategy->ComputeColumnISizes(aReflowState);
|
||||
}
|
||||
// Constrain our reflow width to the computed table width (of the 1st in flow).
|
||||
// and our reflow height to our avail height minus border, padding, cellspacing
|
||||
|
|
Загрузка…
Ссылка в новой задаче