зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277131 : Part 1 - rename nsTableOuterFrame to nsTableWrapperFrame. r=heycam
MozReview-Commit-ID: KrSHLbmovTM --HG-- rename : layout/tables/nsTableOuterFrame.cpp => layout/tables/nsTableWrapperFrame.cpp rename : layout/tables/nsTableOuterFrame.h => layout/tables/nsTableWrapperFrame.h extra : rebase_source : 730a73b8439f1f5c5ccdb32b241deda5224c321c
This commit is contained in:
Родитель
f35f218928
Коммит
1fcb0ee95d
|
@ -34,7 +34,7 @@
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
#include "nsNameSpaceManager.h"
|
#include "nsNameSpaceManager.h"
|
||||||
#include "nsTableCellFrame.h"
|
#include "nsTableCellFrame.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
@ -495,21 +495,21 @@ HTMLTableAccessible::Summary(nsString& aSummary)
|
||||||
uint32_t
|
uint32_t
|
||||||
HTMLTableAccessible::ColCount()
|
HTMLTableAccessible::ColCount()
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
return tableFrame ? tableFrame->GetColCount() : 0;
|
return tableFrame ? tableFrame->GetColCount() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
HTMLTableAccessible::RowCount()
|
HTMLTableAccessible::RowCount()
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
return tableFrame ? tableFrame->GetRowCount() : 0;
|
return tableFrame ? tableFrame->GetRowCount() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
HTMLTableAccessible::SelectedCellCount()
|
HTMLTableAccessible::SelectedCellCount()
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ HTMLTableAccessible::SelectedRowCount()
|
||||||
void
|
void
|
||||||
HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
|
HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
|
||||||
void
|
void
|
||||||
HTMLTableAccessible::SelectedCellIndices(nsTArray<uint32_t>* aCells)
|
HTMLTableAccessible::SelectedCellIndices(nsTArray<uint32_t>* aCells)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -628,7 +628,7 @@ HTMLTableAccessible::SelectedRowIndices(nsTArray<uint32_t>* aRows)
|
||||||
Accessible*
|
Accessible*
|
||||||
HTMLTableAccessible::CellAt(uint32_t aRowIdx, uint32_t aColIdx)
|
HTMLTableAccessible::CellAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ HTMLTableAccessible::CellAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
int32_t
|
int32_t
|
||||||
HTMLTableAccessible::CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx)
|
HTMLTableAccessible::CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -653,7 +653,7 @@ HTMLTableAccessible::CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
int32_t
|
int32_t
|
||||||
HTMLTableAccessible::ColIndexAt(uint32_t aCellIdx)
|
HTMLTableAccessible::ColIndexAt(uint32_t aCellIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ HTMLTableAccessible::ColIndexAt(uint32_t aCellIdx)
|
||||||
int32_t
|
int32_t
|
||||||
HTMLTableAccessible::RowIndexAt(uint32_t aCellIdx)
|
HTMLTableAccessible::RowIndexAt(uint32_t aCellIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ void
|
||||||
HTMLTableAccessible::RowAndColIndicesAt(uint32_t aCellIdx, int32_t* aRowIdx,
|
HTMLTableAccessible::RowAndColIndicesAt(uint32_t aCellIdx, int32_t* aRowIdx,
|
||||||
int32_t* aColIdx)
|
int32_t* aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (tableFrame)
|
if (tableFrame)
|
||||||
tableFrame->GetRowAndColumnByIndex(aCellIdx, aRowIdx, aColIdx);
|
tableFrame->GetRowAndColumnByIndex(aCellIdx, aRowIdx, aColIdx);
|
||||||
}
|
}
|
||||||
|
@ -686,7 +686,7 @@ HTMLTableAccessible::RowAndColIndicesAt(uint32_t aCellIdx, int32_t* aRowIdx,
|
||||||
uint32_t
|
uint32_t
|
||||||
HTMLTableAccessible::ColExtentAt(uint32_t aRowIdx, uint32_t aColIdx)
|
HTMLTableAccessible::ColExtentAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ HTMLTableAccessible::ColExtentAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
uint32_t
|
uint32_t
|
||||||
HTMLTableAccessible::RowExtentAt(uint32_t aRowIdx, uint32_t aColIdx)
|
HTMLTableAccessible::RowExtentAt(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ HTMLTableAccessible::IsRowSelected(uint32_t aRowIdx)
|
||||||
bool
|
bool
|
||||||
HTMLTableAccessible::IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx)
|
HTMLTableAccessible::IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ HTMLTableAccessible::AddRowOrColumnToSelection(int32_t aIndex, uint32_t aTarget)
|
||||||
{
|
{
|
||||||
bool doSelectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
bool doSelectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
@ -823,7 +823,7 @@ HTMLTableAccessible::RemoveRowsOrColumnsFromSelection(int32_t aIndex,
|
||||||
uint32_t aTarget,
|
uint32_t aTarget,
|
||||||
bool aIsOuter)
|
bool aIsOuter)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
@ -1047,7 +1047,7 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
||||||
// Now we know there are 2-4 columns and 2 or more rows
|
// Now we know there are 2-4 columns and 2 or more rows
|
||||||
// Check to see if there are visible borders on the cells
|
// Check to see if there are visible borders on the cells
|
||||||
// XXX currently, we just check the first cell -- do we really need to do more?
|
// XXX currently, we just check the first cell -- do we really need to do more?
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(mContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
RETURN_LAYOUT_ANSWER(false, "table with no frame!");
|
RETURN_LAYOUT_ANSWER(false, "table with no frame!");
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class nsIClipboard;
|
||||||
class TypeInState;
|
class TypeInState;
|
||||||
class nsIContentFilter;
|
class nsIContentFilter;
|
||||||
class nsILinkHandler;
|
class nsILinkHandler;
|
||||||
class nsTableOuterFrame;
|
class nsTableWrapperFrame;
|
||||||
class nsIDOMRange;
|
class nsIDOMRange;
|
||||||
class nsRange;
|
class nsRange;
|
||||||
struct PropItem;
|
struct PropItem;
|
||||||
|
@ -454,8 +454,8 @@ protected:
|
||||||
NS_IMETHOD SetColSpan(nsIDOMElement *aCell, int32_t aColSpan);
|
NS_IMETHOD SetColSpan(nsIDOMElement *aCell, int32_t aColSpan);
|
||||||
NS_IMETHOD SetRowSpan(nsIDOMElement *aCell, int32_t aRowSpan);
|
NS_IMETHOD SetRowSpan(nsIDOMElement *aCell, int32_t aRowSpan);
|
||||||
|
|
||||||
// Helper used to get nsTableOuterFrame for a table.
|
// Helper used to get nsTableWrapperFrame for a table.
|
||||||
nsTableOuterFrame* GetTableFrame(nsIDOMElement* aTable);
|
nsTableWrapperFrame* GetTableFrame(nsIDOMElement* aTable);
|
||||||
// Needed to do appropriate deleting when last cell or row is about to be deleted
|
// Needed to do appropriate deleting when last cell or row is about to be deleted
|
||||||
// This doesn't count cells that don't start in the given row (are spanning from row above)
|
// This doesn't count cells that don't start in the given row (are spanning from row above)
|
||||||
int32_t GetNumberOfCellsInRow(nsIDOMElement* aTable, int32_t rowIndex);
|
int32_t GetNumberOfCellsInRow(nsIDOMElement* aTable, int32_t rowIndex);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsTableCellFrame.h"
|
#include "nsTableCellFrame.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@ -2578,7 +2578,7 @@ nsHTMLEditor::GetCellIndexes(nsIDOMElement *aCell,
|
||||||
return cellLayoutObject->GetCellIndexes(*aRowIndex, *aColIndex);
|
return cellLayoutObject->GetCellIndexes(*aRowIndex, *aColIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableOuterFrame*
|
nsTableWrapperFrame*
|
||||||
nsHTMLEditor::GetTableFrame(nsIDOMElement* aTable)
|
nsHTMLEditor::GetTableFrame(nsIDOMElement* aTable)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE(aTable, nullptr);
|
NS_ENSURE_TRUE(aTable, nullptr);
|
||||||
|
@ -2637,7 +2637,7 @@ nsHTMLEditor::GetTableSize(nsIDOMElement *aTable,
|
||||||
NS_ENSURE_SUCCESS(res, res);
|
NS_ENSURE_SUCCESS(res, res);
|
||||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = GetTableFrame(table.get());
|
nsTableWrapperFrame* tableFrame = GetTableFrame(table.get());
|
||||||
NS_ENSURE_TRUE(tableFrame, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(tableFrame, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
*aRowCount = tableFrame->GetRowCount();
|
*aRowCount = tableFrame->GetRowCount();
|
||||||
|
@ -2686,7 +2686,7 @@ nsHTMLEditor::GetCellDataAt(nsIDOMElement* aTable, int32_t aRowIndex,
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = GetTableFrame(aTable);
|
nsTableWrapperFrame* tableFrame = GetTableFrame(aTable);
|
||||||
NS_ENSURE_TRUE(tableFrame, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(tableFrame, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsTableCellFrame* cellFrame =
|
nsTableCellFrame* cellFrame =
|
||||||
|
@ -2724,7 +2724,7 @@ nsHTMLEditor::GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIn
|
||||||
aTable = table;
|
aTable = table;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = GetTableFrame(aTable);
|
nsTableWrapperFrame* tableFrame = GetTableFrame(aTable);
|
||||||
if (!tableFrame) {
|
if (!tableFrame) {
|
||||||
*aCell = nullptr;
|
*aCell = nullptr;
|
||||||
return NS_EDITOR_ELEMENT_NOT_FOUND;
|
return NS_EDITOR_ELEMENT_NOT_FOUND;
|
||||||
|
@ -2742,7 +2742,7 @@ NS_IMETHODIMP
|
||||||
nsHTMLEditor::GetCellSpansAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex,
|
nsHTMLEditor::GetCellSpansAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex,
|
||||||
int32_t& aActualRowSpan, int32_t& aActualColSpan)
|
int32_t& aActualRowSpan, int32_t& aActualColSpan)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* tableFrame = GetTableFrame(aTable);
|
nsTableWrapperFrame* tableFrame = GetTableFrame(aTable);
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ public:
|
||||||
nsIFrame* f = aFrame;
|
nsIFrame* f = aFrame;
|
||||||
if (mBoxType == CSSBoxType::Margin &&
|
if (mBoxType == CSSBoxType::Margin &&
|
||||||
f->GetType() == nsGkAtoms::tableFrame) {
|
f->GetType() == nsGkAtoms::tableFrame) {
|
||||||
// Margin boxes for table frames should be taken from the outer table
|
// Margin boxes for table frames should be taken from the table wrapper
|
||||||
// frame, since that has the margin.
|
// frame, since that has the margin.
|
||||||
f = f->GetParent();
|
f = f->GetParent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,8 +399,9 @@ bool
|
||||||
RestyleManager::RecomputePosition(nsIFrame* aFrame)
|
RestyleManager::RecomputePosition(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
// Don't process position changes on table frames, since we already handle
|
// Don't process position changes on table frames, since we already handle
|
||||||
// the dynamic position change on the outer table frame, and the reflow-based
|
// the dynamic position change on the table wrapper frame, and the
|
||||||
// fallback code path also ignores positions on inner table frames.
|
// reflow-based fallback code path also ignores positions on inner table
|
||||||
|
// frames.
|
||||||
if (aFrame->GetType() == nsGkAtoms::tableFrame) {
|
if (aFrame->GetType() == nsGkAtoms::tableFrame) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,9 +617,9 @@ public:
|
||||||
// Construct for a frame whose parent is being restyled, but whose
|
// Construct for a frame whose parent is being restyled, but whose
|
||||||
// style context is the parent style context for its parent frame.
|
// style context is the parent style context for its parent frame.
|
||||||
// (This is only used for table frames, whose style contexts are used
|
// (This is only used for table frames, whose style contexts are used
|
||||||
// as the parent style context for their outer table frame (table
|
// as the parent style context for their table wrapper frame. We should
|
||||||
// wrapper frame). We should probably try to get rid of this
|
// probably try to get rid of this exception and have the inheritance go
|
||||||
// exception and have the inheritance go the other way.)
|
// the other way.)
|
||||||
enum ParentContextFromChildFrame { PARENT_CONTEXT_FROM_CHILD_FRAME };
|
enum ParentContextFromChildFrame { PARENT_CONTEXT_FROM_CHILD_FRAME };
|
||||||
ElementRestyler(ParentContextFromChildFrame,
|
ElementRestyler(ParentContextFromChildFrame,
|
||||||
const ElementRestyler& aParentFrameRestyler,
|
const ElementRestyler& aParentFrameRestyler,
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
#include "nsGfxScrollFrame.h"
|
#include "nsGfxScrollFrame.h"
|
||||||
#include "nsPageFrame.h"
|
#include "nsPageFrame.h"
|
||||||
#include "nsSimplePageSequenceFrame.h"
|
#include "nsSimplePageSequenceFrame.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nsIScrollableFrame.h"
|
#include "nsIScrollableFrame.h"
|
||||||
#include "nsBackdropFrame.h"
|
#include "nsBackdropFrame.h"
|
||||||
#include "nsTransitionManager.h"
|
#include "nsTransitionManager.h"
|
||||||
|
@ -1114,7 +1114,7 @@ nsFrameConstructorState::GetGeometricParent(const nsStyleDisplay* aStyleDisplay,
|
||||||
// table and the canvas or (2) teaching the canvas how to reflow positioned
|
// table and the canvas or (2) teaching the canvas how to reflow positioned
|
||||||
// elements. (1) has the usual problems when multiple frames share the same
|
// elements. (1) has the usual problems when multiple frames share the same
|
||||||
// content (notice all the special cases in this file dealing with inner
|
// content (notice all the special cases in this file dealing with inner
|
||||||
// tables and outer tables which share the same content). (2) requires some
|
// tables and table wrappers which share the same content). (2) requires some
|
||||||
// work and possible factoring.
|
// work and possible factoring.
|
||||||
//
|
//
|
||||||
// XXXbz couldn't we just force position to "static" on roots and
|
// XXXbz couldn't we just force position to "static" on roots and
|
||||||
|
@ -1923,9 +1923,9 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
|
||||||
// cell-content and table-outer frames have pseudo-types, but are always
|
// cell-content and table-outer frames have pseudo-types, but are always
|
||||||
// created, even for non-anonymous cells and tables respectively. So for those
|
// created, even for non-anonymous cells and tables respectively. So for those
|
||||||
// we have to examine the cell or table frame to see whether it's a pseudo
|
// we have to examine the cell or table frame to see whether it's a pseudo
|
||||||
// frame. In particular, a lone table caption will have an outer table as its
|
// frame. In particular, a lone table caption will have a table wrapper as its
|
||||||
// parent, but will also trigger construction of an empty inner table, which
|
// parent, but will also trigger construction of an empty inner table, which
|
||||||
// will be the one we can examine to see whether the outer was a pseudo-frame.
|
// will be the one we can examine to see whether the wrapper was a pseudo-frame.
|
||||||
static bool
|
static bool
|
||||||
IsTablePseudo(nsIFrame* aFrame)
|
IsTablePseudo(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
|
@ -2069,23 +2069,23 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
||||||
nsStyleContext* const styleContext = aItem.mStyleContext;
|
nsStyleContext* const styleContext = aItem.mStyleContext;
|
||||||
const uint32_t nameSpaceID = aItem.mNameSpaceID;
|
const uint32_t nameSpaceID = aItem.mNameSpaceID;
|
||||||
|
|
||||||
// create the pseudo SC for the outer table as a child of the inner SC
|
// create the pseudo SC for the table wrapper as a child of the inner SC
|
||||||
RefPtr<nsStyleContext> outerStyleContext;
|
RefPtr<nsStyleContext> outerStyleContext;
|
||||||
outerStyleContext = mPresShell->StyleSet()->
|
outerStyleContext = mPresShell->StyleSet()->
|
||||||
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableOuter, styleContext);
|
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableOuter, styleContext);
|
||||||
|
|
||||||
// Create the outer table frame which holds the caption and inner table frame
|
// Create the table wrapper frame which holds the caption and inner table frame
|
||||||
nsContainerFrame* newFrame;
|
nsContainerFrame* newFrame;
|
||||||
if (kNameSpaceID_MathML == nameSpaceID)
|
if (kNameSpaceID_MathML == nameSpaceID)
|
||||||
newFrame = NS_NewMathMLmtableOuterFrame(mPresShell, outerStyleContext);
|
newFrame = NS_NewMathMLmtableOuterFrame(mPresShell, outerStyleContext);
|
||||||
else
|
else
|
||||||
newFrame = NS_NewTableOuterFrame(mPresShell, outerStyleContext);
|
newFrame = NS_NewTableWrapperFrame(mPresShell, outerStyleContext);
|
||||||
|
|
||||||
nsContainerFrame* geometricParent =
|
nsContainerFrame* geometricParent =
|
||||||
aState.GetGeometricParent(outerStyleContext->StyleDisplay(),
|
aState.GetGeometricParent(outerStyleContext->StyleDisplay(),
|
||||||
aParentFrame);
|
aParentFrame);
|
||||||
|
|
||||||
// Init the table outer frame
|
// Init the table wrapper frame
|
||||||
InitAndRestoreFrame(aState, content, geometricParent, newFrame);
|
InitAndRestoreFrame(aState, content, geometricParent, newFrame);
|
||||||
|
|
||||||
// Create the inner table frame
|
// Create the inner table frame
|
||||||
|
@ -2137,7 +2137,7 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
||||||
// Set the inner table frame's initial primary list
|
// Set the inner table frame's initial primary list
|
||||||
innerFrame->SetInitialChildList(kPrincipalList, childItems);
|
innerFrame->SetInitialChildList(kPrincipalList, childItems);
|
||||||
|
|
||||||
// Set the outer table frame's secondary childlist lists
|
// Set the table wrapper frame's secondary childlist lists
|
||||||
if (captionItems.NotEmpty()) {
|
if (captionItems.NotEmpty()) {
|
||||||
newFrame->SetInitialChildList(nsIFrame::kCaptionList, captionItems);
|
newFrame->SetInitialChildList(nsIFrame::kCaptionList, captionItems);
|
||||||
}
|
}
|
||||||
|
@ -2723,7 +2723,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
|
||||||
nsHTMLScrollFrame
|
nsHTMLScrollFrame
|
||||||
nsCanvasFrame [abs-cb]
|
nsCanvasFrame [abs-cb]
|
||||||
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
||||||
nsTableOuterFrame, nsPlaceholderFrame)
|
nsTableWrapperFrame, nsPlaceholderFrame)
|
||||||
|
|
||||||
Galley presentation, XUL
|
Galley presentation, XUL
|
||||||
|
|
||||||
|
@ -2739,7 +2739,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
|
||||||
nsPageContentFrame [fixed-cb]
|
nsPageContentFrame [fixed-cb]
|
||||||
nsCanvasFrame [abs-cb]
|
nsCanvasFrame [abs-cb]
|
||||||
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
||||||
nsTableOuterFrame, nsPlaceholderFrame)
|
nsTableWrapperFrame, nsPlaceholderFrame)
|
||||||
|
|
||||||
Print-preview presentation, non-XUL
|
Print-preview presentation, non-XUL
|
||||||
|
|
||||||
|
@ -2750,7 +2750,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
|
||||||
nsPageContentFrame [fixed-cb]
|
nsPageContentFrame [fixed-cb]
|
||||||
nsCanvasFrame [abs-cb]
|
nsCanvasFrame [abs-cb]
|
||||||
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
|
||||||
nsTableOuterFrame, nsPlaceholderFrame)
|
nsTableWrapperFrame, nsPlaceholderFrame)
|
||||||
|
|
||||||
Print/print preview of XUL is not supported.
|
Print/print preview of XUL is not supported.
|
||||||
[fixed-cb]: the default containing block for fixed-pos content
|
[fixed-cb]: the default containing block for fixed-pos content
|
||||||
|
@ -6166,11 +6166,11 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For tables, skip the inner frame and consider the outer table frame.
|
// For tables, skip the inner frame and consider the table wrapper frame.
|
||||||
if (type == nsGkAtoms::tableFrame) {
|
if (type == nsGkAtoms::tableFrame) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// For outer table frames, we can just return absPosCBCandidate.
|
// For table wrapper frames, we can just return absPosCBCandidate.
|
||||||
MOZ_ASSERT((nsContainerFrame*)do_QueryFrame(absPosCBCandidate),
|
MOZ_ASSERT((nsContainerFrame*)do_QueryFrame(absPosCBCandidate),
|
||||||
"abs.pos. containing block must be nsContainerFrame sub-class");
|
"abs.pos. containing block must be nsContainerFrame sub-class");
|
||||||
return static_cast<nsContainerFrame*>(absPosCBCandidate);
|
return static_cast<nsContainerFrame*>(absPosCBCandidate);
|
||||||
|
@ -7416,8 +7416,8 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||||
InvalidateCanvasIfNeeded(mPresShell, child);
|
InvalidateCanvasIfNeeded(mPresShell, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the container is a table and a caption was appended, it needs to be put
|
// If the container is a table and a caption was appended, it needs to be put
|
||||||
// in the outer table frame's additional child list.
|
// in the table wrapper frame's additional child list.
|
||||||
nsFrameItems captionItems;
|
nsFrameItems captionItems;
|
||||||
if (nsGkAtoms::tableFrame == frameType) {
|
if (nsGkAtoms::tableFrame == frameType) {
|
||||||
// Pull out the captions. Note that we don't want to do that as we go,
|
// Pull out the captions. Note that we don't want to do that as we go,
|
||||||
|
@ -7439,7 +7439,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||||
// Notify the parent frame passing it the list of new frames
|
// Notify the parent frame passing it the list of new frames
|
||||||
// Append the flowed frames to the principal child list; captions
|
// Append the flowed frames to the principal child list; captions
|
||||||
// need special treatment
|
// need special treatment
|
||||||
if (captionItems.NotEmpty()) { // append the caption to the outer table
|
if (captionItems.NotEmpty()) { // append the caption to the table wrapper
|
||||||
NS_ASSERTION(nsGkAtoms::tableFrame == frameType, "how did that happen?");
|
NS_ASSERTION(nsGkAtoms::tableFrame == frameType, "how did that happen?");
|
||||||
nsContainerFrame* outerTable = parentFrame->GetParent();
|
nsContainerFrame* outerTable = parentFrame->GetParent();
|
||||||
AppendFrames(outerTable, nsIFrame::kCaptionList, captionItems);
|
AppendFrames(outerTable, nsIFrame::kCaptionList, captionItems);
|
||||||
|
@ -7941,7 +7941,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||||
LAYOUT_PHASE_TEMP_REENTER();
|
LAYOUT_PHASE_TEMP_REENTER();
|
||||||
|
|
||||||
// If the container is a table and a caption will be appended, it needs to be
|
// If the container is a table and a caption will be appended, it needs to be
|
||||||
// put in the outer table frame's additional child list.
|
// put in the table wrapper frame's additional child list.
|
||||||
// We make no attempt here to set flags to indicate whether the list
|
// We make no attempt here to set flags to indicate whether the list
|
||||||
// will be at the start or end of a block. It doesn't seem worthwhile.
|
// will be at the start or end of a block. It doesn't seem worthwhile.
|
||||||
nsFrameItems frameItems, captionItems;
|
nsFrameItems frameItems, captionItems;
|
||||||
|
@ -7968,7 +7968,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||||
// effect on the WipeContainingBlock above, since this should only happen
|
// effect on the WipeContainingBlock above, since this should only happen
|
||||||
// when neither parent is a ib-split frame and should not affect whitespace
|
// when neither parent is a ib-split frame and should not affect whitespace
|
||||||
// handling inside table-related frames (and in fact, can only happen when
|
// handling inside table-related frames (and in fact, can only happen when
|
||||||
// one of the parents is an outer table and one is an inner table or when the
|
// one of the parents is a table wrapper and one is an inner table or when the
|
||||||
// parent is a fieldset or fieldset content frame). So it won't affect the
|
// parent is a fieldset or fieldset content frame). So it won't affect the
|
||||||
// {ib} or XUL box cases in WipeContainingBlock(), and the table pseudo
|
// {ib} or XUL box cases in WipeContainingBlock(), and the table pseudo
|
||||||
// handling will only be affected by us maybe thinking we're not inserting
|
// handling will only be affected by us maybe thinking we're not inserting
|
||||||
|
@ -8022,7 +8022,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||||
}
|
}
|
||||||
|
|
||||||
// We might have captions; put them into the caption list of the
|
// We might have captions; put them into the caption list of the
|
||||||
// outer table frame.
|
// table wrapper frame.
|
||||||
if (captionItems.NotEmpty()) {
|
if (captionItems.NotEmpty()) {
|
||||||
NS_ASSERTION(nsGkAtoms::tableFrame == frameType ||
|
NS_ASSERTION(nsGkAtoms::tableFrame == frameType ||
|
||||||
nsGkAtoms::tableOuterFrame == frameType,
|
nsGkAtoms::tableOuterFrame == frameType,
|
||||||
|
@ -8055,12 +8055,12 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||||
if (GetCaptionAdjustedParent(captionInsertion.mParentFrame,
|
if (GetCaptionAdjustedParent(captionInsertion.mParentFrame,
|
||||||
captionItems.FirstChild(),
|
captionItems.FirstChild(),
|
||||||
&outerTable)) {
|
&outerTable)) {
|
||||||
// If the parent is not an outer table frame we will try to add frames
|
// If the parent is not a table wrapper frame we will try to add frames
|
||||||
// to a named child list that the parent does not honour and the frames
|
// to a named child list that the parent does not honor and the frames
|
||||||
// will get lost
|
// will get lost.
|
||||||
NS_ASSERTION(nsGkAtoms::tableOuterFrame == outerTable->GetType(),
|
NS_ASSERTION(nsGkAtoms::tableOuterFrame == outerTable->GetType(),
|
||||||
"Pseudo frame construction failure; "
|
"Pseudo frame construction failure; "
|
||||||
"a caption can be only a child of an outer table frame");
|
"a caption can be only a child of a table wrapper frame");
|
||||||
|
|
||||||
// If the parent of our current prevSibling is different from the frame
|
// If the parent of our current prevSibling is different from the frame
|
||||||
// we'll actually use as the parent, then the calculated insertion
|
// we'll actually use as the parent, then the calculated insertion
|
||||||
|
@ -8689,7 +8689,7 @@ nsCSSFrameConstructor::CreateContinuingOuterTableFrame(nsIPresShell* aPresSh
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
nsStyleContext* aStyleContext)
|
nsStyleContext* aStyleContext)
|
||||||
{
|
{
|
||||||
nsTableOuterFrame* newFrame = NS_NewTableOuterFrame(aPresShell, aStyleContext);
|
nsTableWrapperFrame* newFrame = NS_NewTableWrapperFrame(aPresShell, aStyleContext);
|
||||||
|
|
||||||
newFrame->Init(aContent, aParentFrame, aFrame);
|
newFrame->Init(aContent, aParentFrame, aFrame);
|
||||||
|
|
||||||
|
@ -8706,7 +8706,7 @@ nsCSSFrameConstructor::CreateContinuingOuterTableFrame(nsIPresShell* aPresSh
|
||||||
NS_ASSERTION(!childFrame->GetNextSibling(),"there can be only one inner table frame");
|
NS_ASSERTION(!childFrame->GetNextSibling(),"there can be only one inner table frame");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the outer table's initial child list
|
// Set the table wrapper's initial child list
|
||||||
newFrame->SetInitialChildList(kPrincipalList, newChildFrames);
|
newFrame->SetInitialChildList(kPrincipalList, newChildFrames);
|
||||||
|
|
||||||
return newFrame;
|
return newFrame;
|
||||||
|
|
|
@ -467,7 +467,7 @@ private:
|
||||||
|
|
||||||
// BEGIN TABLE SECTION
|
// BEGIN TABLE SECTION
|
||||||
/**
|
/**
|
||||||
* Construct an outer table frame. This is the FrameConstructionData
|
* Construct a table wrapper frame. This is the FrameConstructionData
|
||||||
* callback used for the job.
|
* callback used for the job.
|
||||||
*/
|
*/
|
||||||
nsIFrame* ConstructTable(nsFrameConstructorState& aState,
|
nsIFrame* ConstructTable(nsFrameConstructorState& aState,
|
||||||
|
|
|
@ -346,19 +346,19 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a frame which is the primary frame for an element,
|
* Given a frame which is the primary frame for an element,
|
||||||
* return the frame that has the non-psuedoelement style context for
|
* return the frame that has the non-pseudoelement style context for
|
||||||
* the content.
|
* the content.
|
||||||
* This is aPrimaryFrame itself except for tableOuter frames.
|
* This is aPrimaryFrame itself except for tableOuter frames.
|
||||||
*
|
*
|
||||||
* Given a non-null input, this will return null if and only if its
|
* Given a non-null input, this will return null if and only if its
|
||||||
* argument is a table outer frame that is mid-destruction (and its
|
* argument is a table wrapper frame that is mid-destruction (and its
|
||||||
* table frame has been destroyed).
|
* table frame has been destroyed).
|
||||||
*/
|
*/
|
||||||
static nsIFrame* GetStyleFrame(nsIFrame* aPrimaryFrame);
|
static nsIFrame* GetStyleFrame(nsIFrame* aPrimaryFrame);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a content node,
|
* Given a content node,
|
||||||
* return the frame that has the non-psuedoelement style context for
|
* return the frame that has the non-pseudoelement style context for
|
||||||
* the content. May return null.
|
* the content. May return null.
|
||||||
* This is aContent->GetPrimaryFrame() except for tableOuter frames.
|
* This is aContent->GetPrimaryFrame() except for tableOuter frames.
|
||||||
*/
|
*/
|
||||||
|
@ -377,7 +377,7 @@ public:
|
||||||
* IsGeneratedContentFor returns true if aFrame is the outermost
|
* IsGeneratedContentFor returns true if aFrame is the outermost
|
||||||
* frame for generated content of type aPseudoElement for aContent.
|
* frame for generated content of type aPseudoElement for aContent.
|
||||||
* aFrame *might not* have the aPseudoElement pseudo-style! For example
|
* aFrame *might not* have the aPseudoElement pseudo-style! For example
|
||||||
* it might be a table outer frame and the inner table frame might
|
* it might be a table wrapper frame and the inner table frame might
|
||||||
* have the pseudo-style.
|
* have the pseudo-style.
|
||||||
*
|
*
|
||||||
* @param aContent the content node we're looking at. If this is
|
* @param aContent the content node we're looking at. If this is
|
||||||
|
@ -1133,7 +1133,7 @@ public:
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Collect all CSS boxes associated with aFrame and its
|
* Collect all CSS boxes associated with aFrame and its
|
||||||
* continuations, "drilling down" through outer table frames and
|
* continuations, "drilling down" through table wrapper frames and
|
||||||
* some anonymous blocks since they're not real CSS boxes.
|
* some anonymous blocks since they're not real CSS boxes.
|
||||||
* If aFrame is null, no boxes are returned.
|
* If aFrame is null, no boxes are returned.
|
||||||
* SVG frames return a single box, themselves.
|
* SVG frames return a single box, themselves.
|
||||||
|
@ -1181,7 +1181,7 @@ public:
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Collect all CSS boxes (content, padding, border, or margin) associated
|
* Collect all CSS boxes (content, padding, border, or margin) associated
|
||||||
* with aFrame and its continuations, "drilling down" through outer table
|
* with aFrame and its continuations, "drilling down" through table wrapper
|
||||||
* frames and some anonymous blocks since they're not real CSS boxes.
|
* frames and some anonymous blocks since they're not real CSS boxes.
|
||||||
* The boxes are positioned relative to aRelativeTo (taking scrolling
|
* The boxes are positioned relative to aRelativeTo (taking scrolling
|
||||||
* into account) and passed to the callback in frame-tree order.
|
* into account) and passed to the callback in frame-tree order.
|
||||||
|
|
|
@ -141,7 +141,7 @@ The first line shows the reflow of the viewport (<code class="log">VP</code>). T
|
||||||
|
|
||||||
<p>The available width is 9180 twips. The available height is 4470 twips (<code class="log">a=9180,4470</code>). The computed width is 9180 twips. The computed height is 4470 twips (<code class="log">c=9180,4470</code>). The line count is 856 (<code class="log">cnt=856</code>).
|
<p>The available width is 9180 twips. The available height is 4470 twips (<code class="log">a=9180,4470</code>). The computed width is 9180 twips. The computed height is 4470 twips (<code class="log">c=9180,4470</code>). The line count is 856 (<code class="log">cnt=856</code>).
|
||||||
<p>
|
<p>
|
||||||
Below this is a line that reads:<p><code class="log">tblO 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870</code></p><p> Here the <code class="log">UC</code> shows that on initial reflow the available height for the outer table frame is unconstrained.
|
Below this is a line that reads:<p><code class="log">tblO 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870</code></p><p> Here the <code class="log">UC</code> shows that on initial reflow the available height for the table wrapper frame is unconstrained.
|
||||||
<p>
|
<p>
|
||||||
The table cell requires its children to compute the MES. It is reported back from the block as:
|
The table cell requires its children to compute the MES. It is reported back from the block as:
|
||||||
<p><code class="log">block 02D7BCF8 d=300,300 me=300</code></p>
|
<p><code class="log">block 02D7BCF8 d=300,300 me=300</code></p>
|
||||||
|
|
|
@ -375,7 +375,7 @@
|
||||||
</div>
|
</div>
|
||||||
<h1>Table Reflow</h1>
|
<h1>Table Reflow</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Outer table reflows table and caption (if present)</li>
|
<li>table wrapper reflows table and caption (if present)</li>
|
||||||
<li>Table reflows row groups in multiple passes</li>
|
<li>Table reflows row groups in multiple passes</li>
|
||||||
<ul class=nested>
|
<ul class=nested>
|
||||||
<li>Pass 1 - unconstrained width, height and requests max elem width.</li>
|
<li>Pass 1 - unconstrained width, height and requests max elem width.</li>
|
||||||
|
@ -488,7 +488,7 @@ Key:
|
||||||
column widths. The pass 2 will get skipped if the table doesn't need to rebalance. <!--<span class="comment">please clarify when can this happen</span>--></li>
|
column widths. The pass 2 will get skipped if the table doesn't need to rebalance. <!--<span class="comment">please clarify when can this happen</span>--></li>
|
||||||
<li>Nested table reflowed with an unconstrained width (i.e. an ancestor is doing a pass 1 reflow)
|
<li>Nested table reflowed with an unconstrained width (i.e. an ancestor is doing a pass 1 reflow)
|
||||||
will only do a pass 1 reflow on its children</li>
|
will only do a pass 1 reflow on its children</li>
|
||||||
<li>Outer table caches last avail width and avoids reflowing children if resize reflow is the same as previous</li>
|
<li>table wrapper caches last avail width and avoids reflowing children if resize reflow is the same as previous</li>
|
||||||
<li>Table caches max element, preferred widths in case they are requested and it isn't rebalanced</li>
|
<li>Table caches max element, preferred widths in case they are requested and it isn't rebalanced</li>
|
||||||
<li>Cell caches prior avail width. if this doesn't change, the row may not have to reflow the cell</li>
|
<li>Cell caches prior avail width. if this doesn't change, the row may not have to reflow the cell</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -502,7 +502,7 @@ Key:
|
||||||
</div>
|
</div>
|
||||||
<h1>Table incremental reflow</h1>
|
<h1>Table incremental reflow</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Outer table is a target when a caption is added or removed (dirty) or the table or caption margin
|
<li>table wrapper is a target when a caption is added or removed (dirty) or the table or caption margin
|
||||||
changes (style changed).</li>
|
changes (style changed).</li>
|
||||||
<li>Caption is a target when it changes stylistically (style changed).</li>
|
<li>Caption is a target when it changes stylistically (style changed).</li>
|
||||||
<li>Table, row group, row, col group, col is a target when a child is added or removed (dirty) or it changes
|
<li>Table, row group, row, col group, col is a target when a child is added or removed (dirty) or it changes
|
||||||
|
@ -680,7 +680,7 @@ Key:
|
||||||
<tr>
|
<tr>
|
||||||
<td class=box>
|
<td class=box>
|
||||||
<table class=box style="height:100%; border-bottom:hidden">
|
<table class=box style="height:100%; border-bottom:hidden">
|
||||||
<tr><td class=title>nsTableOuterFrame</td></tr>
|
<tr><td class=title>nsTableWrapperFrame</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class=box></td>
|
<td class=box></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -713,7 +713,7 @@ Key:
|
||||||
<tr>
|
<tr>
|
||||||
<td class=box></td>
|
<td class=box></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td class=title2>nsTableOuterFrame</td></tr>
|
<tr><td class=title2>nsTableWrapperFrame</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -800,13 +800,13 @@ Key:
|
||||||
</div>
|
</div>
|
||||||
<h1>Table paginated reflow</h1>
|
<h1>Table paginated reflow</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The block containing the outer table reflows it. If it is incomplete, the block will
|
<li>The block containing the table wrapper reflows it. If it is incomplete, the block will
|
||||||
<ul>
|
<ul>
|
||||||
<li>create a continuation for the outer table (which also creates a continuation for the table).</li>
|
<li>create a continuation for the table wrapper (which also creates a continuation for the table).</li>
|
||||||
<li>put the continuation on a new line and place that line on its overflow lines property.</li>
|
<li>put the continuation on a new line and place that line on its overflow lines property.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>The outer table reflows the table and just returns the status of the table.</li>
|
<li>The table wrapper reflows the table and just returns the status of the table.</li>
|
||||||
<li>The table does a pass 1 reflow and balances. If it is incomplete,</li>
|
<li>The table does a pass 1 reflow and balances. If it is incomplete,</li>
|
||||||
<ul>
|
<ul>
|
||||||
<li>it will become the first-in-flow</li>
|
<li>it will become the first-in-flow</li>
|
||||||
|
@ -874,10 +874,10 @@ Key:
|
||||||
</li>
|
</li>
|
||||||
<li>There are two splitting scenarios for a table
|
<li>There are two splitting scenarios for a table
|
||||||
<ul>
|
<ul>
|
||||||
<li>An incomplete cells block causes the cell, row, row group, table, outer table to
|
<li>An incomplete cells block causes the cell, row, row group, table, table wrapper to
|
||||||
be incomplete</li>
|
be incomplete</li>
|
||||||
<li>A truncated row or a row that started too far down the page causes the row group,
|
<li>A truncated row or a row that started too far down the page causes the row group,
|
||||||
table, outer table to be incomplete.</li>
|
table, table wrapper to be incomplete.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsStyleContext.h"
|
#include "nsStyleContext.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nsView.h"
|
#include "nsView.h"
|
||||||
#include "nsViewManager.h"
|
#include "nsViewManager.h"
|
||||||
#include "nsIScrollableFrame.h"
|
#include "nsIScrollableFrame.h"
|
||||||
|
@ -3067,7 +3067,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
|
||||||
// If not a cell, check for table
|
// If not a cell, check for table
|
||||||
// This will happen when starting frame is the table or child of a table,
|
// This will happen when starting frame is the table or child of a table,
|
||||||
// such as a row (we were inbetween cells or in table border)
|
// such as a row (we were inbetween cells or in table border)
|
||||||
nsTableOuterFrame *tableFrame = do_QueryFrame(frame);
|
nsTableWrapperFrame *tableFrame = do_QueryFrame(frame);
|
||||||
if (tableFrame)
|
if (tableFrame)
|
||||||
{
|
{
|
||||||
foundTable = true;
|
foundTable = true;
|
||||||
|
@ -7275,7 +7275,7 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
|
||||||
{
|
{
|
||||||
/* SPECIAL CHECK FOR TABLE NAVIGATION
|
/* SPECIAL CHECK FOR TABLE NAVIGATION
|
||||||
tables need to navigate also and the frame that supports it is nsTableRowGroupFrame which is INSIDE
|
tables need to navigate also and the frame that supports it is nsTableRowGroupFrame which is INSIDE
|
||||||
nsTableOuterFrame. if we have stumbled onto an nsTableOuter we need to drill into nsTableRowGroup
|
nsTableWrapperFrame. if we have stumbled onto an nsTableOuter we need to drill into nsTableRowGroup
|
||||||
if we hit a header or footer that's ok just go into them,
|
if we hit a header or footer that's ok just go into them,
|
||||||
*/
|
*/
|
||||||
bool searchTableBool = false;
|
bool searchTableBool = false;
|
||||||
|
@ -7437,8 +7437,11 @@ nsFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame::FrameSearchResult
|
nsIFrame::FrameSearchResult
|
||||||
nsFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect,
|
nsFrame::PeekOffsetWord(bool aForward,
|
||||||
int32_t* aOffset, PeekWordState* aState)
|
bool aWordSelectEatSpace,
|
||||||
|
bool aIsKeyboardSelect,
|
||||||
|
int32_t* aOffset,
|
||||||
|
PeekWordState* aState)
|
||||||
{
|
{
|
||||||
NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range");
|
NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range");
|
||||||
int32_t startOffset = *aOffset;
|
int32_t startOffset = *aOffset;
|
||||||
|
@ -8350,7 +8353,7 @@ GetCorrectedParent(const nsIFrame* aFrame)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Outer tables are always anon boxes; if we're in here for an outer
|
// Table wrappers are always anon boxes; if we're in here for an outer
|
||||||
// table, that actually means its the _inner_ table that wants to
|
// table, that actually means its the _inner_ table that wants to
|
||||||
// know its parent. So get the pseudo of the inner in that case.
|
// know its parent. So get the pseudo of the inner in that case.
|
||||||
nsIAtom* pseudo = aFrame->StyleContext()->GetPseudo();
|
nsIAtom* pseudo = aFrame->StyleContext()->GetPseudo();
|
||||||
|
|
|
@ -164,7 +164,7 @@ FRAME_ID(nsTableCellFrame)
|
||||||
FRAME_ID(nsTableColFrame)
|
FRAME_ID(nsTableColFrame)
|
||||||
FRAME_ID(nsTableColGroupFrame)
|
FRAME_ID(nsTableColGroupFrame)
|
||||||
FRAME_ID(nsTableFrame)
|
FRAME_ID(nsTableFrame)
|
||||||
FRAME_ID(nsTableOuterFrame)
|
FRAME_ID(nsTableWrapperFrame)
|
||||||
FRAME_ID(nsTableRowFrame)
|
FRAME_ID(nsTableRowFrame)
|
||||||
FRAME_ID(nsTableRowGroupFrame)
|
FRAME_ID(nsTableRowGroupFrame)
|
||||||
FRAME_ID(nsTextBoxFrame)
|
FRAME_ID(nsTextBoxFrame)
|
||||||
|
|
|
@ -180,9 +180,9 @@ DetailsFrame*
|
||||||
NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||||
|
|
||||||
// Table frame factories
|
// Table frame factories
|
||||||
class nsTableOuterFrame;
|
class nsTableWrapperFrame;
|
||||||
nsTableOuterFrame*
|
nsTableWrapperFrame*
|
||||||
NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
NS_NewTableWrapperFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||||
class nsTableFrame;
|
class nsTableFrame;
|
||||||
nsTableFrame*
|
nsTableFrame*
|
||||||
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||||
|
|
|
@ -2557,7 +2557,7 @@ nsCSSOffsetState::InitOffsets(WritingMode aWM,
|
||||||
tableFrame->GetIncludedOuterBCBorder(mWritingMode));
|
tableFrame->GetIncludedOuterBCBorder(mWritingMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The margin is inherited to the outer table frame via
|
// The margin is inherited to the table wrapper frame via
|
||||||
// the ::-moz-table-outer rule in ua.css.
|
// the ::-moz-table-outer rule in ua.css.
|
||||||
ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
|
ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
|
||||||
} else if (aFrameType == nsGkAtoms::scrollbarFrame) {
|
} else if (aFrameType == nsGkAtoms::scrollbarFrame) {
|
||||||
|
@ -2647,9 +2647,9 @@ nsHTMLReflowState::CalculateBlockSideMargins(nsIAtom* aFrameType)
|
||||||
const nsHTMLReflowState* prs = mParentReflowState;
|
const nsHTMLReflowState* prs = mParentReflowState;
|
||||||
if (aFrameType == nsGkAtoms::tableFrame) {
|
if (aFrameType == nsGkAtoms::tableFrame) {
|
||||||
NS_ASSERTION(prs->frame->GetType() == nsGkAtoms::tableOuterFrame,
|
NS_ASSERTION(prs->frame->GetType() == nsGkAtoms::tableOuterFrame,
|
||||||
"table not inside outer table");
|
"table not inside table wrapper");
|
||||||
// Center the table within the outer table based on the alignment
|
// Center the table within the table wrapper based on the alignment
|
||||||
// of the outer table's parent.
|
// of the table wrapper's parent.
|
||||||
prs = prs->mParentReflowState;
|
prs = prs->mParentReflowState;
|
||||||
}
|
}
|
||||||
if (prs &&
|
if (prs &&
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsITableCellLayout.h"
|
#include "nsITableCellLayout.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nsTableCellFrame.h"
|
#include "nsTableCellFrame.h"
|
||||||
#include "nsIScrollableFrame.h"
|
#include "nsIScrollableFrame.h"
|
||||||
#include "nsCCUncollectableMarker.h"
|
#include "nsCCUncollectableMarker.h"
|
||||||
|
@ -2803,7 +2803,7 @@ nsFrameSelection::UnselectCells(nsIContent *aTableContent,
|
||||||
if (!mDomSelections[index])
|
if (!mDomSelections[index])
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(aTableContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(aTableContent->GetPrimaryFrame());
|
||||||
if (!tableFrame)
|
if (!tableFrame)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -2883,7 +2883,7 @@ nsFrameSelection::AddCellsToSelection(nsIContent *aTableContent,
|
||||||
if (!mDomSelections[index])
|
if (!mDomSelections[index])
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(aTableContent->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(aTableContent->GetPrimaryFrame());
|
||||||
if (!tableFrame) // Check that |table| is a table.
|
if (!tableFrame) // Check that |table| is a table.
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -2957,7 +2957,7 @@ nsFrameSelection::SelectRowOrColumn(nsIContent *aCellContent, uint32_t aTarget)
|
||||||
// Get table and cell layout interfaces to access
|
// Get table and cell layout interfaces to access
|
||||||
// cell data based on cellmap location
|
// cell data based on cellmap location
|
||||||
// Frames are not ref counted, so don't use an nsCOMPtr
|
// Frames are not ref counted, so don't use an nsCOMPtr
|
||||||
nsTableOuterFrame* tableFrame = do_QueryFrame(table->GetPrimaryFrame());
|
nsTableWrapperFrame* tableFrame = do_QueryFrame(table->GetPrimaryFrame());
|
||||||
if (!tableFrame) return NS_ERROR_FAILURE;
|
if (!tableFrame) return NS_ERROR_FAILURE;
|
||||||
nsITableCellLayout *cellLayout = GetCellLayout(aCellContent);
|
nsITableCellLayout *cellLayout = GetCellLayout(aCellContent);
|
||||||
if (!cellLayout) return NS_ERROR_FAILURE;
|
if (!cellLayout) return NS_ERROR_FAILURE;
|
||||||
|
|
|
@ -685,7 +685,7 @@ ListMathMLTree(nsIFrame* atLeast)
|
||||||
|
|
||||||
NS_QUERYFRAME_HEAD(nsMathMLmtableOuterFrame)
|
NS_QUERYFRAME_HEAD(nsMathMLmtableOuterFrame)
|
||||||
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
|
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
|
||||||
NS_QUERYFRAME_TAIL_INHERITING(nsTableOuterFrame)
|
NS_QUERYFRAME_TAIL_INHERITING(nsTableWrapperFrame)
|
||||||
|
|
||||||
nsContainerFrame*
|
nsContainerFrame*
|
||||||
NS_NewMathMLmtableOuterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
|
NS_NewMathMLmtableOuterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||||
|
@ -822,7 +822,7 @@ nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext,
|
||||||
nsAutoString value;
|
nsAutoString value;
|
||||||
// we want to return a table that is anchored according to the align attribute
|
// we want to return a table that is anchored according to the align attribute
|
||||||
|
|
||||||
nsTableOuterFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
nsTableWrapperFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||||
NS_ASSERTION(aDesiredSize.Height() >= 0, "illegal height for mtable");
|
NS_ASSERTION(aDesiredSize.Height() >= 0, "illegal height for mtable");
|
||||||
NS_ASSERTION(aDesiredSize.Width() >= 0, "illegal width for mtable");
|
NS_ASSERTION(aDesiredSize.Width() >= 0, "illegal width for mtable");
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsMathMLContainerFrame.h"
|
#include "nsMathMLContainerFrame.h"
|
||||||
#include "nsBlockFrame.h"
|
#include "nsBlockFrame.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nsTableRowFrame.h"
|
#include "nsTableRowFrame.h"
|
||||||
#include "nsTableCellFrame.h"
|
#include "nsTableCellFrame.h"
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
// <mtable> -- table or matrix
|
// <mtable> -- table or matrix
|
||||||
//
|
//
|
||||||
|
|
||||||
class nsMathMLmtableOuterFrame : public nsTableOuterFrame,
|
class nsMathMLmtableOuterFrame : public nsTableWrapperFrame,
|
||||||
public nsMathMLFrame
|
public nsMathMLFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -27,7 +27,7 @@ public:
|
||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
// overloaded nsTableOuterFrame methods
|
// overloaded nsTableWrapperFrame methods
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
Reflow(nsPresContext* aPresContext,
|
Reflow(nsPresContext* aPresContext,
|
||||||
|
@ -42,11 +42,11 @@ public:
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||||
{
|
{
|
||||||
return nsTableOuterFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
|
return nsTableWrapperFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit nsMathMLmtableOuterFrame(nsStyleContext* aContext) : nsTableOuterFrame(aContext) {}
|
explicit nsMathMLmtableOuterFrame(nsStyleContext* aContext) : nsTableWrapperFrame(aContext) {}
|
||||||
virtual ~nsMathMLmtableOuterFrame();
|
virtual ~nsMathMLmtableOuterFrame();
|
||||||
|
|
||||||
// helper to find the row frame at a given index, positive or negative, e.g.,
|
// helper to find the row frame at a given index, positive or negative, e.g.,
|
||||||
|
|
|
@ -677,12 +677,12 @@ nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush)
|
||||||
if (mOuterFrame) {
|
if (mOuterFrame) {
|
||||||
nsIAtom* type = mOuterFrame->GetType();
|
nsIAtom* type = mOuterFrame->GetType();
|
||||||
if (type == nsGkAtoms::tableOuterFrame) {
|
if (type == nsGkAtoms::tableOuterFrame) {
|
||||||
// If the frame is an outer table frame then we should get the style
|
// If the frame is a table wrapper frame then we should get the style
|
||||||
// from the inner table frame.
|
// from the inner table frame.
|
||||||
mInnerFrame = mOuterFrame->PrincipalChildList().FirstChild();
|
mInnerFrame = mOuterFrame->PrincipalChildList().FirstChild();
|
||||||
NS_ASSERTION(mInnerFrame, "Outer table must have an inner");
|
NS_ASSERTION(mInnerFrame, "table wrapper must have an inner");
|
||||||
NS_ASSERTION(!mInnerFrame->GetNextSibling(),
|
NS_ASSERTION(!mInnerFrame->GetNextSibling(),
|
||||||
"Outer table frames should have just one child, "
|
"table wrapper frames should have just one child, "
|
||||||
"the inner table");
|
"the inner table");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5209,7 +5209,7 @@ nsComputedDOMStyle::GetMarginWidthFor(mozilla::css::Side aSide)
|
||||||
AssertFlushedPendingReflows();
|
AssertFlushedPendingReflows();
|
||||||
|
|
||||||
// For tables, GetUsedMargin always returns an empty margin, so we
|
// For tables, GetUsedMargin always returns an empty margin, so we
|
||||||
// should read the margin from the outer table frame instead.
|
// should read the margin from the table wrapper frame instead.
|
||||||
val->SetAppUnits(mOuterFrame->GetUsedMargin().Side(aSide));
|
val->SetAppUnits(mOuterFrame->GetUsedMargin().Side(aSide));
|
||||||
NS_ASSERTION(mOuterFrame == mInnerFrame ||
|
NS_ASSERTION(mOuterFrame == mInnerFrame ||
|
||||||
mInnerFrame->GetUsedMargin() == nsMargin(0, 0, 0, 0),
|
mInnerFrame->GetUsedMargin() == nsMargin(0, 0, 0, 0),
|
||||||
|
|
|
@ -21,10 +21,10 @@ UNIFIED_SOURCES += [
|
||||||
'nsTableColFrame.cpp',
|
'nsTableColFrame.cpp',
|
||||||
'nsTableColGroupFrame.cpp',
|
'nsTableColGroupFrame.cpp',
|
||||||
'nsTableFrame.cpp',
|
'nsTableFrame.cpp',
|
||||||
'nsTableOuterFrame.cpp',
|
|
||||||
'nsTablePainter.cpp',
|
'nsTablePainter.cpp',
|
||||||
'nsTableRowFrame.cpp',
|
'nsTableRowFrame.cpp',
|
||||||
'nsTableRowGroupFrame.cpp',
|
'nsTableRowGroupFrame.cpp',
|
||||||
|
'nsTableWrapperFrame.cpp',
|
||||||
'SpanningCellSorter.cpp',
|
'SpanningCellSorter.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ nsTableCellFrame::NotifyPercentBSize(const nsHTMLReflowState& aReflowState)
|
||||||
// nsHTMLReflowState ensures the mCBReflowState of blocks inside a
|
// nsHTMLReflowState ensures the mCBReflowState of blocks inside a
|
||||||
// cell is the cell frame, not the inner-cell block, and that the
|
// cell is the cell frame, not the inner-cell block, and that the
|
||||||
// containing block of an inner table is the containing block of its
|
// containing block of an inner table is the containing block of its
|
||||||
// outer table.
|
// table wrapper.
|
||||||
// XXXldb Given the now-stricter |NeedsToObserve|, many if not all of
|
// XXXldb Given the now-stricter |NeedsToObserve|, many if not all of
|
||||||
// these tests are probably unnecessary.
|
// these tests are probably unnecessary.
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ nsTableCellFrame::NeedsToObserve(const nsHTMLReflowState& aReflowState)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We always need to let the percent bsize observer be propagated
|
// We always need to let the percent bsize observer be propagated
|
||||||
// from an outer table frame to an inner table frame.
|
// from a table wrapper frame to an inner table frame.
|
||||||
nsIAtom *fType = aReflowState.frame->GetType();
|
nsIAtom *fType = aReflowState.frame->GetType();
|
||||||
if (fType == nsGkAtoms::tableFrame) {
|
if (fType == nsGkAtoms::tableFrame) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nsTableColGroupFrame.h"
|
#include "nsTableColGroupFrame.h"
|
||||||
#include "nsTableRowFrame.h"
|
#include "nsTableRowFrame.h"
|
||||||
#include "nsTableRowGroupFrame.h"
|
#include "nsTableRowGroupFrame.h"
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
#include "nsTablePainter.h"
|
#include "nsTablePainter.h"
|
||||||
|
|
||||||
#include "BasicTableLayoutStrategy.h"
|
#include "BasicTableLayoutStrategy.h"
|
||||||
|
@ -124,10 +124,10 @@ struct BCPropertyData
|
||||||
nsStyleContext*
|
nsStyleContext*
|
||||||
nsTableFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
nsTableFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
||||||
{
|
{
|
||||||
// Since our parent, the table outer frame, returned this frame, we
|
// Since our parent, the table wrapper frame, returned this frame, we
|
||||||
// must return whatever our parent would normally have returned.
|
// must return whatever our parent would normally have returned.
|
||||||
|
|
||||||
NS_PRECONDITION(GetParent(), "table constructed without outer table");
|
NS_PRECONDITION(GetParent(), "table constructed without table wrapper");
|
||||||
if (!mContent->GetParent() && !StyleContext()->GetPseudo()) {
|
if (!mContent->GetParent() && !StyleContext()->GetPseudo()) {
|
||||||
// We're the root. We have no style context parent.
|
// We're the root. We have no style context parent.
|
||||||
*aProviderFrame = nullptr;
|
*aProviderFrame = nullptr;
|
||||||
|
@ -183,7 +183,7 @@ nsTableFrame::Init(nsIContent* aContent,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Set my isize, because all frames in a table flow are the same isize and
|
// Set my isize, because all frames in a table flow are the same isize and
|
||||||
// code in nsTableOuterFrame depends on this being set.
|
// code in nsTableWrapperFrame depends on this being set.
|
||||||
WritingMode wm = GetWritingMode();
|
WritingMode wm = GetWritingMode();
|
||||||
SetSize(LogicalSize(wm, aPrevInFlow->ISize(wm), BSize(wm)));
|
SetSize(LogicalSize(wm, aPrevInFlow->ISize(wm), BSize(wm)));
|
||||||
}
|
}
|
||||||
|
@ -2646,7 +2646,7 @@ nsTableFrame::GetUsedPadding() const
|
||||||
/* virtual */ nsMargin
|
/* virtual */ nsMargin
|
||||||
nsTableFrame::GetUsedMargin() const
|
nsTableFrame::GetUsedMargin() const
|
||||||
{
|
{
|
||||||
// The margin is inherited to the outer table frame via
|
// The margin is inherited to the table wrapper frame via
|
||||||
// the ::-moz-table-outer rule in ua.css.
|
// the ::-moz-table-outer rule in ua.css.
|
||||||
return nsMargin(0, 0, 0, 0);
|
return nsMargin(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -6487,7 +6487,7 @@ BCPaintBorderIterator::SetDamageArea(const nsRect& aDirtyRect)
|
||||||
|
|
||||||
// XXX comment refers to the obsolete NS_FRAME_OUTSIDE_CHILDREN flag
|
// XXX comment refers to the obsolete NS_FRAME_OUTSIDE_CHILDREN flag
|
||||||
// XXX but I don't understand it, so not changing it for now
|
// XXX but I don't understand it, so not changing it for now
|
||||||
// outer table borders overflow the table, so the table might be
|
// table wrapper borders overflow the table, so the table might be
|
||||||
// target to other areas as the NS_FRAME_OUTSIDE_CHILDREN is set
|
// target to other areas as the NS_FRAME_OUTSIDE_CHILDREN is set
|
||||||
// on the table
|
// on the table
|
||||||
if (!haveIntersect)
|
if (!haveIntersect)
|
||||||
|
|
|
@ -121,7 +121,7 @@ enum nsTableColType {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nsTableFrame maps the inner portion of a table (everything except captions.)
|
* nsTableFrame maps the inner portion of a table (everything except captions.)
|
||||||
* Used as a pseudo-frame within nsTableOuterFrame, it may also be used
|
* Used as a pseudo-frame within nsTableWrapperFrame, it may also be used
|
||||||
* stand-alone as the top-level frame.
|
* stand-alone as the top-level frame.
|
||||||
*
|
*
|
||||||
* The principal child list contains row group frames. There is also an
|
* The principal child list contains row group frames. There is also an
|
||||||
|
@ -140,8 +140,8 @@ public:
|
||||||
NS_DECLARE_FRAME_PROPERTY_DELETABLE(PositionedTablePartArray,
|
NS_DECLARE_FRAME_PROPERTY_DELETABLE(PositionedTablePartArray,
|
||||||
nsTArray<nsIFrame*>)
|
nsTArray<nsIFrame*>)
|
||||||
|
|
||||||
/** nsTableOuterFrame has intimate knowledge of the inner table frame */
|
/** nsTableWrapperFrame has intimate knowledge of the inner table frame */
|
||||||
friend class nsTableOuterFrame;
|
friend class nsTableWrapperFrame;
|
||||||
|
|
||||||
/** instantiate a new instance of nsTableRowFrame.
|
/** instantiate a new instance of nsTableRowFrame.
|
||||||
* @param aPresShell the pres shell for this frame
|
* @param aPresShell the pres shell for this frame
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "nsTableOuterFrame.h"
|
#include "nsTableWrapperFrame.h"
|
||||||
|
|
||||||
#include "nsFrameManager.h"
|
#include "nsFrameManager.h"
|
||||||
#include "nsTableFrame.h"
|
#include "nsTableFrame.h"
|
||||||
|
@ -30,7 +30,7 @@ using namespace mozilla::layout;
|
||||||
#define NO_SIDE 100
|
#define NO_SIDE 100
|
||||||
|
|
||||||
/* virtual */ nscoord
|
/* virtual */ nscoord
|
||||||
nsTableOuterFrame::GetLogicalBaseline(WritingMode aWritingMode) const
|
nsTableWrapperFrame::GetLogicalBaseline(WritingMode aWritingMode) const
|
||||||
{
|
{
|
||||||
nsIFrame* kid = mFrames.FirstChild();
|
nsIFrame* kid = mFrames.FirstChild();
|
||||||
if (!kid) {
|
if (!kid) {
|
||||||
|
@ -42,29 +42,29 @@ nsTableOuterFrame::GetLogicalBaseline(WritingMode aWritingMode) const
|
||||||
kid->BStart(aWritingMode, mRect.Size());
|
kid->BStart(aWritingMode, mRect.Size());
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableOuterFrame::nsTableOuterFrame(nsStyleContext* aContext):
|
nsTableWrapperFrame::nsTableWrapperFrame(nsStyleContext* aContext)
|
||||||
nsContainerFrame(aContext)
|
: nsContainerFrame(aContext)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableOuterFrame::~nsTableOuterFrame()
|
nsTableWrapperFrame::~nsTableWrapperFrame()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_QUERYFRAME_HEAD(nsTableOuterFrame)
|
NS_QUERYFRAME_HEAD(nsTableWrapperFrame)
|
||||||
NS_QUERYFRAME_ENTRY(nsTableOuterFrame)
|
NS_QUERYFRAME_ENTRY(nsTableWrapperFrame)
|
||||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
a11y::AccType
|
a11y::AccType
|
||||||
nsTableOuterFrame::AccessibleType()
|
nsTableWrapperFrame::AccessibleType()
|
||||||
{
|
{
|
||||||
return a11y::eHTMLTableType;
|
return a11y::eHTMLTableType;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
nsTableWrapperFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
{
|
{
|
||||||
DestroyAbsoluteFrames(aDestructRoot);
|
DestroyAbsoluteFrames(aDestructRoot);
|
||||||
mCaptionFrames.DestroyFramesFrom(aDestructRoot);
|
mCaptionFrames.DestroyFramesFrom(aDestructRoot);
|
||||||
|
@ -72,7 +72,7 @@ nsTableOuterFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
}
|
}
|
||||||
|
|
||||||
const nsFrameList&
|
const nsFrameList&
|
||||||
nsTableOuterFrame::GetChildList(ChildListID aListID) const
|
nsTableWrapperFrame::GetChildList(ChildListID aListID) const
|
||||||
{
|
{
|
||||||
if (aListID == kCaptionList) {
|
if (aListID == kCaptionList) {
|
||||||
return mCaptionFrames;
|
return mCaptionFrames;
|
||||||
|
@ -82,14 +82,14 @@ nsTableOuterFrame::GetChildList(ChildListID aListID) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::GetChildLists(nsTArray<ChildList>* aLists) const
|
nsTableWrapperFrame::GetChildLists(nsTArray<ChildList>* aLists) const
|
||||||
{
|
{
|
||||||
nsContainerFrame::GetChildLists(aLists);
|
nsContainerFrame::GetChildLists(aLists);
|
||||||
mCaptionFrames.AppendIfNonempty(aLists, kCaptionList);
|
mCaptionFrames.AppendIfNonempty(aLists, kCaptionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::SetInitialChildList(ChildListID aListID,
|
nsTableWrapperFrame::SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList)
|
nsFrameList& aChildList)
|
||||||
{
|
{
|
||||||
if (kCaptionList == aListID) {
|
if (kCaptionList == aListID) {
|
||||||
|
@ -108,7 +108,7 @@ nsTableOuterFrame::SetInitialChildList(ChildListID aListID,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::AppendFrames(ChildListID aListID,
|
nsTableWrapperFrame::AppendFrames(ChildListID aListID,
|
||||||
nsFrameList& aFrameList)
|
nsFrameList& aFrameList)
|
||||||
{
|
{
|
||||||
// We only have two child frames: the inner table and a caption frame.
|
// We only have two child frames: the inner table and a caption frame.
|
||||||
|
@ -121,13 +121,12 @@ nsTableOuterFrame::AppendFrames(ChildListID aListID,
|
||||||
|
|
||||||
// Reflow the new caption frame. It's already marked dirty, so
|
// Reflow the new caption frame. It's already marked dirty, so
|
||||||
// just tell the pres shell.
|
// just tell the pres shell.
|
||||||
PresContext()->PresShell()->
|
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
|
||||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::InsertFrames(ChildListID aListID,
|
nsTableWrapperFrame::InsertFrames(ChildListID aListID,
|
||||||
nsIFrame* aPrevFrame,
|
nsIFrame* aPrevFrame,
|
||||||
nsFrameList& aFrameList)
|
nsFrameList& aFrameList)
|
||||||
{
|
{
|
||||||
|
@ -141,13 +140,12 @@ nsTableOuterFrame::InsertFrames(ChildListID aListID,
|
||||||
|
|
||||||
// Reflow the new caption frame. It's already marked dirty, so
|
// Reflow the new caption frame. It's already marked dirty, so
|
||||||
// just tell the pres shell.
|
// just tell the pres shell.
|
||||||
PresContext()->PresShell()->
|
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
|
||||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::RemoveFrame(ChildListID aListID,
|
nsTableWrapperFrame::RemoveFrame(ChildListID aListID,
|
||||||
nsIFrame* aOldFrame)
|
nsIFrame* aOldFrame)
|
||||||
{
|
{
|
||||||
// We only have two child frames: the inner table and one caption frame.
|
// We only have two child frames: the inner table and one caption frame.
|
||||||
|
@ -169,7 +167,7 @@ nsTableOuterFrame::RemoveFrame(ChildListID aListID,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +195,7 @@ nsTableOuterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilder,
|
nsTableWrapperFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
|
@ -212,17 +210,17 @@ nsTableOuterFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilde
|
||||||
}
|
}
|
||||||
|
|
||||||
nsStyleContext*
|
nsStyleContext*
|
||||||
nsTableOuterFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
nsTableWrapperFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
||||||
{
|
{
|
||||||
// The table outer frame and the (inner) table frame split the style
|
// The table wrapper frame and the (inner) table frame split the style
|
||||||
// data by giving the table frame the style context associated with
|
// data by giving the table frame the style context associated with
|
||||||
// the table content node and creating a style context for the outer
|
// the table content node and creating a style context for the wrapper
|
||||||
// frame that is a *child* of the table frame's style context,
|
// frame that is a *child* of the table frame's style context,
|
||||||
// matching the ::-moz-table-outer pseudo-element. html.css has a
|
// matching the ::-moz-table-outer pseudo-element. html.css has a
|
||||||
// rule that causes that pseudo-element (and thus the outer table)
|
// rule that causes that pseudo-element (and thus the wrapper table)
|
||||||
// to inherit *some* style properties from the table frame. The
|
// to inherit *some* style properties from the table frame. The
|
||||||
// children of the table inherit directly from the inner table, and
|
// children of the table inherit directly from the inner table, and
|
||||||
// the outer table's style context is a leaf.
|
// the table wrapper's style context is a leaf.
|
||||||
|
|
||||||
return (*aProviderFrame = InnerTableFrame())->StyleContext();
|
return (*aProviderFrame = InnerTableFrame())->StyleContext();
|
||||||
}
|
}
|
||||||
|
@ -230,9 +228,8 @@ nsTableOuterFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
||||||
// INCREMENTAL REFLOW HELPER FUNCTIONS
|
// INCREMENTAL REFLOW HELPER FUNCTIONS
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::InitChildReflowState(nsPresContext& aPresContext,
|
nsTableWrapperFrame::InitChildReflowState(nsPresContext& aPresContext,
|
||||||
nsHTMLReflowState& aReflowState)
|
nsHTMLReflowState& aReflowState)
|
||||||
|
|
||||||
{
|
{
|
||||||
nsMargin collapseBorder;
|
nsMargin collapseBorder;
|
||||||
nsMargin collapsePadding(0,0,0,0);
|
nsMargin collapsePadding(0,0,0,0);
|
||||||
|
@ -252,7 +249,7 @@ nsTableOuterFrame::InitChildReflowState(nsPresContext& aPresContext,
|
||||||
// get the margin and padding data. nsHTMLReflowState doesn't handle the
|
// get the margin and padding data. nsHTMLReflowState doesn't handle the
|
||||||
// case of auto margins
|
// case of auto margins
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::GetChildMargin(nsPresContext* aPresContext,
|
nsTableWrapperFrame::GetChildMargin(nsPresContext* aPresContext,
|
||||||
const nsHTMLReflowState& aOuterRS,
|
const nsHTMLReflowState& aOuterRS,
|
||||||
nsIFrame* aChildFrame,
|
nsIFrame* aChildFrame,
|
||||||
nscoord aAvailISize,
|
nscoord aAvailISize,
|
||||||
|
@ -295,7 +292,7 @@ GetContainingBlockSize(const nsHTMLReflowState& aOuterRS)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ nscoord
|
/* virtual */ nscoord
|
||||||
nsTableOuterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
nsTableWrapperFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||||
{
|
{
|
||||||
nscoord iSize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
nscoord iSize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||||
InnerTableFrame(), nsLayoutUtils::MIN_ISIZE);
|
InnerTableFrame(), nsLayoutUtils::MIN_ISIZE);
|
||||||
|
@ -317,7 +314,7 @@ nsTableOuterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ nscoord
|
/* virtual */ nscoord
|
||||||
nsTableOuterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
nsTableWrapperFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||||
{
|
{
|
||||||
nscoord maxISize;
|
nscoord maxISize;
|
||||||
DISPLAY_PREF_WIDTH(this, maxISize);
|
DISPLAY_PREF_WIDTH(this, maxISize);
|
||||||
|
@ -398,7 +395,7 @@ ChildShrinkWrapISize(nsRenderingContext *aRenderingContext,
|
||||||
|
|
||||||
/* virtual */
|
/* virtual */
|
||||||
LogicalSize
|
LogicalSize
|
||||||
nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
nsTableWrapperFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||||
WritingMode aWM,
|
WritingMode aWM,
|
||||||
const LogicalSize& aCBSize,
|
const LogicalSize& aCBSize,
|
||||||
nscoord aAvailableISize,
|
nscoord aAvailableISize,
|
||||||
|
@ -409,7 +406,7 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||||
{
|
{
|
||||||
nscoord kidAvailableISize = aAvailableISize - aMargin.ISize(aWM);
|
nscoord kidAvailableISize = aAvailableISize - aMargin.ISize(aWM);
|
||||||
NS_ASSERTION(aBorder.IsAllZero() && aPadding.IsAllZero(),
|
NS_ASSERTION(aBorder.IsAllZero() && aPadding.IsAllZero(),
|
||||||
"Table outer frames cannot have borders or paddings");
|
"Table wrapper frames cannot have borders or paddings");
|
||||||
|
|
||||||
// When we're shrink-wrapping, our auto size needs to wrap around the
|
// 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)
|
// actual size of the table, which (if it is specified as a percent)
|
||||||
|
@ -460,7 +457,7 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
nsTableOuterFrame::GetCaptionSide()
|
nsTableWrapperFrame::GetCaptionSide()
|
||||||
{
|
{
|
||||||
if (mCaptionFrames.NotEmpty()) {
|
if (mCaptionFrames.NotEmpty()) {
|
||||||
return mCaptionFrames.FirstChild()->StyleTableBorder()->mCaptionSide;
|
return mCaptionFrames.FirstChild()->StyleTableBorder()->mCaptionSide;
|
||||||
|
@ -471,17 +468,18 @@ nsTableOuterFrame::GetCaptionSide()
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
nsTableOuterFrame::GetCaptionVerticalAlign()
|
nsTableWrapperFrame::GetCaptionVerticalAlign()
|
||||||
{
|
{
|
||||||
const nsStyleCoord& va =
|
const nsStyleCoord& va =
|
||||||
mCaptionFrames.FirstChild()->StyleDisplay()->mVerticalAlign;
|
mCaptionFrames.FirstChild()->StyleDisplay()->mVerticalAlign;
|
||||||
|
|
||||||
return (va.GetUnit() == eStyleUnit_Enumerated)
|
return (va.GetUnit() == eStyleUnit_Enumerated)
|
||||||
? va.GetIntValue()
|
? va.GetIntValue()
|
||||||
: NS_STYLE_VERTICAL_ALIGN_TOP;
|
: NS_STYLE_VERTICAL_ALIGN_TOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::SetDesiredSize(uint8_t aCaptionSide,
|
nsTableWrapperFrame::SetDesiredSize(uint8_t aCaptionSide,
|
||||||
const LogicalSize& aInnerSize,
|
const LogicalSize& aInnerSize,
|
||||||
const LogicalSize& aCaptionSize,
|
const LogicalSize& aCaptionSize,
|
||||||
const LogicalMargin& aInnerMargin,
|
const LogicalMargin& aInnerMargin,
|
||||||
|
@ -548,7 +546,7 @@ nsTableOuterFrame::SetDesiredSize(uint8_t aCaptionSide,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsTableOuterFrame::GetCaptionOrigin(uint32_t aCaptionSide,
|
nsTableWrapperFrame::GetCaptionOrigin(uint32_t aCaptionSide,
|
||||||
const LogicalSize& aContainBlockSize,
|
const LogicalSize& aContainBlockSize,
|
||||||
const LogicalSize& aInnerSize,
|
const LogicalSize& aInnerSize,
|
||||||
const LogicalMargin& aInnerMargin,
|
const LogicalMargin& aInnerMargin,
|
||||||
|
@ -640,7 +638,7 @@ nsTableOuterFrame::GetCaptionOrigin(uint32_t aCaptionSide,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsTableOuterFrame::GetInnerOrigin(uint32_t aCaptionSide,
|
nsTableWrapperFrame::GetInnerOrigin(uint32_t aCaptionSide,
|
||||||
const LogicalSize& aContainBlockSize,
|
const LogicalSize& aContainBlockSize,
|
||||||
const LogicalSize& aCaptionSize,
|
const LogicalSize& aCaptionSize,
|
||||||
const LogicalMargin& aCaptionMargin,
|
const LogicalMargin& aCaptionMargin,
|
||||||
|
@ -732,7 +730,7 @@ nsTableOuterFrame::GetInnerOrigin(uint32_t aCaptionSide,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
|
nsTableWrapperFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
|
||||||
nsIFrame* aChildFrame,
|
nsIFrame* aChildFrame,
|
||||||
const nsHTMLReflowState& aOuterRS,
|
const nsHTMLReflowState& aOuterRS,
|
||||||
Maybe<nsHTMLReflowState>& aChildRS,
|
Maybe<nsHTMLReflowState>& aChildRS,
|
||||||
|
@ -778,7 +776,7 @@ nsTableOuterFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::OuterDoReflowChild(nsPresContext* aPresContext,
|
nsTableWrapperFrame::OuterDoReflowChild(nsPresContext* aPresContext,
|
||||||
nsIFrame* aChildFrame,
|
nsIFrame* aChildFrame,
|
||||||
const nsHTMLReflowState& aChildRS,
|
const nsHTMLReflowState& aChildRS,
|
||||||
nsHTMLReflowMetrics& aMetrics,
|
nsHTMLReflowMetrics& aMetrics,
|
||||||
|
@ -796,9 +794,9 @@ nsTableOuterFrame::OuterDoReflowChild(nsPresContext* aPresContext,
|
||||||
uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
||||||
|
|
||||||
// We don't want to delete our next-in-flow's child if it's an inner table
|
// We don't want to delete our next-in-flow's child if it's an inner table
|
||||||
// frame, because outer table frames always assume that their inner table
|
// frame, because table wrapper frames always assume that their inner table
|
||||||
// frames don't go away. If an outer table frame is removed because it is
|
// frames don't go away. If a table wrapper frame is removed because it is
|
||||||
// a next-in-flow of an already complete outer table frame, then it will
|
// a next-in-flow of an already complete table wrapper frame, then it will
|
||||||
// take care of removing it's inner table frame.
|
// take care of removing it's inner table frame.
|
||||||
if (aChildFrame == InnerTableFrame()) {
|
if (aChildFrame == InnerTableFrame()) {
|
||||||
flags |= NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD;
|
flags |= NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD;
|
||||||
|
@ -809,7 +807,7 @@ nsTableOuterFrame::OuterDoReflowChild(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::UpdateOverflowAreas(nsHTMLReflowMetrics& aMet)
|
nsTableWrapperFrame::UpdateOverflowAreas(nsHTMLReflowMetrics& aMet)
|
||||||
{
|
{
|
||||||
aMet.SetOverflowAreasToDesiredBounds();
|
aMet.SetOverflowAreasToDesiredBounds();
|
||||||
ConsiderChildOverflow(aMet.mOverflowAreas, InnerTableFrame());
|
ConsiderChildOverflow(aMet.mOverflowAreas, InnerTableFrame());
|
||||||
|
@ -819,13 +817,13 @@ nsTableOuterFrame::UpdateOverflowAreas(nsHTMLReflowMetrics& aMet)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
|
||||||
nsHTMLReflowMetrics& aDesiredSize,
|
nsHTMLReflowMetrics& aDesiredSize,
|
||||||
const nsHTMLReflowState& aOuterRS,
|
const nsHTMLReflowState& aOuterRS,
|
||||||
nsReflowStatus& aStatus)
|
nsReflowStatus& aStatus)
|
||||||
{
|
{
|
||||||
MarkInReflow();
|
MarkInReflow();
|
||||||
DO_GLOBAL_REFLOW_COUNT("nsTableOuterFrame");
|
DO_GLOBAL_REFLOW_COUNT("nsTableWrapperFrame");
|
||||||
DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus);
|
DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus);
|
||||||
|
|
||||||
// Initialize out parameters
|
// Initialize out parameters
|
||||||
|
@ -1013,7 +1011,7 @@ nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIAtom*
|
nsIAtom*
|
||||||
nsTableOuterFrame::GetType() const
|
nsTableWrapperFrame::GetType() const
|
||||||
{
|
{
|
||||||
return nsGkAtoms::tableOuterFrame;
|
return nsGkAtoms::tableOuterFrame;
|
||||||
}
|
}
|
||||||
|
@ -1021,7 +1019,7 @@ nsTableOuterFrame::GetType() const
|
||||||
/* ----- global methods ----- */
|
/* ----- global methods ----- */
|
||||||
|
|
||||||
nsIContent*
|
nsIContent*
|
||||||
nsTableOuterFrame::GetCellAt(uint32_t aRowIdx, uint32_t aColIdx) const
|
nsTableWrapperFrame::GetCellAt(uint32_t aRowIdx, uint32_t aColIdx) const
|
||||||
{
|
{
|
||||||
nsTableCellMap* cellMap = InnerTableFrame()->GetCellMap();
|
nsTableCellMap* cellMap = InnerTableFrame()->GetCellMap();
|
||||||
if (!cellMap) {
|
if (!cellMap) {
|
||||||
|
@ -1037,19 +1035,19 @@ nsTableOuterFrame::GetCellAt(uint32_t aRowIdx, uint32_t aColIdx) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nsTableOuterFrame*
|
nsTableWrapperFrame*
|
||||||
NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
NS_NewTableWrapperFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||||
{
|
{
|
||||||
return new (aPresShell) nsTableOuterFrame(aContext);
|
return new (aPresShell) nsTableWrapperFrame(aContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsTableOuterFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsTableWrapperFrame)
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
nsresult
|
nsresult
|
||||||
nsTableOuterFrame::GetFrameName(nsAString& aResult) const
|
nsTableWrapperFrame::GetFrameName(nsAString& aResult) const
|
||||||
{
|
{
|
||||||
return MakeFrameName(NS_LITERAL_STRING("TableOuter"), aResult);
|
return MakeFrameName(NS_LITERAL_STRING("TableWrapper"), aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef nsTableOuterFrame_h__
|
#ifndef nsTableWrapperFrame_h__
|
||||||
#define nsTableOuterFrame_h__
|
#define nsTableWrapperFrame_h__
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/Maybe.h"
|
#include "mozilla/Maybe.h"
|
||||||
|
@ -14,23 +14,23 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary frame for a table element,
|
* Primary frame for a table element,
|
||||||
* the nsTableOuterFrame contains 0 or one caption frame, and a nsTableFrame
|
* the nsTableWrapperFrame contains 0 or one caption frame, and a nsTableFrame
|
||||||
* pseudo-frame (referred to as the "inner frame').
|
* pseudo-frame (referred to as the "inner frame').
|
||||||
*/
|
*/
|
||||||
class nsTableOuterFrame : public nsContainerFrame
|
class nsTableWrapperFrame : public nsContainerFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
NS_DECL_QUERYFRAME_TARGET(nsTableOuterFrame)
|
NS_DECL_QUERYFRAME_TARGET(nsTableWrapperFrame)
|
||||||
|
|
||||||
/** instantiate a new instance of nsTableRowFrame.
|
/** instantiate a new instance of nsTableRowFrame.
|
||||||
* @param aPresShell the pres shell for this frame
|
* @param aPresShell the pres shell for this frame
|
||||||
*
|
*
|
||||||
* @return the frame that was created
|
* @return the frame that was created
|
||||||
*/
|
*/
|
||||||
friend nsTableOuterFrame* NS_NewTableOuterFrame(nsIPresShell* aPresShell,
|
friend nsTableWrapperFrame* NS_NewTableWrapperFrame(nsIPresShell* aPresShell,
|
||||||
nsStyleContext* aContext);
|
nsStyleContext* aContext);
|
||||||
|
|
||||||
// nsIFrame overrides - see there for a description
|
// nsIFrame overrides - see there for a description
|
||||||
|
@ -182,8 +182,8 @@ public:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
explicit nsTableOuterFrame(nsStyleContext* aContext);
|
explicit nsTableWrapperFrame(nsStyleContext* aContext);
|
||||||
virtual ~nsTableOuterFrame();
|
virtual ~nsTableWrapperFrame();
|
||||||
|
|
||||||
void InitChildReflowState(nsPresContext& aPresContext,
|
void InitChildReflowState(nsPresContext& aPresContext,
|
||||||
nsHTMLReflowState& aReflowState);
|
nsHTMLReflowState& aReflowState);
|
||||||
|
@ -257,7 +257,8 @@ protected:
|
||||||
(~eCanContainOverflowContainers));
|
(~eCanContainOverflowContainers));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableFrame* InnerTableFrame() const {
|
nsTableFrame* InnerTableFrame() const
|
||||||
|
{
|
||||||
return static_cast<nsTableFrame*>(mFrames.FirstChild());
|
return static_cast<nsTableFrame*>(mFrames.FirstChild());
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче