Skip to content

Commit

Permalink
Backed out 3 changesets (bug 63895) for debug crashtest failures on a…
Browse files Browse the repository at this point in the history
… CLOSED TREE

Backed out changeset 02e057fea56c (bug 63895)
Backed out changeset 80bd36a3d4f1 (bug 63895)
Backed out changeset 6609365ee797 (bug 63895)
  • Loading branch information
KWierso committed Feb 20, 2014
1 parent 0cc6333 commit 323c184
Show file tree
Hide file tree
Showing 37 changed files with 35 additions and 1,422 deletions.
96 changes: 29 additions & 67 deletions layout/base/nsCSSFrameConstructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,64 +1982,27 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
return newFrame;
}

static void
MakeTablePartAbsoluteContainingBlockIfNeeded(nsFrameConstructorState& aState,
const nsStyleDisplay* aDisplay,
nsFrameConstructorSaveState& aAbsSaveState,
nsIFrame* aFrame)
{
// If we're positioned, then we need to become an absolute containing block
// for any absolutely positioned children and register for post-reflow fixup.
//
// Note that usually if a frame type can be an absolute containing block, we
// always set NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN, whether it actually is or not.
// However, in this case flag serves the additional purpose of indicating that
// the frame was registered with its table frame. This allows us to avoid the
// overhead of unregistering the frame in most cases.
if (aDisplay->IsRelativelyPositionedStyle() ||
aDisplay->IsAbsolutelyPositionedStyle() ||
aDisplay->HasTransform(aFrame)) {
aFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
aState.PushAbsoluteContainingBlock(aFrame, aFrame, aAbsSaveState);
nsTableFrame::RegisterPositionedTablePart(aFrame);
}
}

nsIFrame*
nsCSSFrameConstructor::ConstructTableRowOrRowGroup(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems)
nsCSSFrameConstructor::ConstructTableRow(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
const nsStyleDisplay* aDisplay,
nsFrameItems& aFrameItems)
{
NS_PRECONDITION(aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_ROW ||
aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_ROW_GROUP ||
aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP ||
aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_HEADER_GROUP,
NS_PRECONDITION(aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_ROW,
"Unexpected call");
MOZ_ASSERT(aItem.mStyleContext->StyleDisplay() == aDisplay,
"Display style doesn't match style context");
nsIContent* const content = aItem.mContent;
nsStyleContext* const styleContext = aItem.mStyleContext;
const uint32_t nameSpaceID = aItem.mNameSpaceID;

nsIFrame* newFrame;
if (aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_ROW) {
if (kNameSpaceID_MathML == nameSpaceID)
newFrame = NS_NewMathMLmtrFrame(mPresShell, styleContext);
else
newFrame = NS_NewTableRowFrame(mPresShell, styleContext);
} else {
newFrame = NS_NewTableRowGroupFrame(mPresShell, styleContext);
}
if (kNameSpaceID_MathML == nameSpaceID)
newFrame = NS_NewMathMLmtrFrame(mPresShell, styleContext);
else
newFrame = NS_NewTableRowFrame(mPresShell, styleContext);

InitAndRestoreFrame(aState, content, aParentFrame, newFrame);

nsFrameConstructorSaveState absoluteSaveState;
MakeTablePartAbsoluteContainingBlockIfNeeded(aState, aDisplay,
absoluteSaveState,
newFrame);

nsFrameItems childItems;
NS_ASSERTION(aItem.mAnonChildren.IsEmpty(),
"nsIAnonymousContentCreator::CreateAnonymousContent "
Expand Down Expand Up @@ -2142,11 +2105,6 @@ nsCSSFrameConstructor::ConstructTableCell(nsFrameConstructorState& aState,

InitAndRestoreFrame(aState, content, newFrame, cellInnerFrame);

nsFrameConstructorSaveState absoluteSaveState;
MakeTablePartAbsoluteContainingBlockIfNeeded(aState, aDisplay,
absoluteSaveState,
newFrame);

nsFrameItems childItems;
NS_ASSERTION(aItem.mAnonChildren.IsEmpty(),
"nsIAnonymousContentCreator::CreateAnonymousContent "
Expand Down Expand Up @@ -4417,17 +4375,20 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
NS_NewTableCaptionFrame) },
{ NS_STYLE_DISPLAY_TABLE_ROW_GROUP,
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup) },
FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_SKIP_ABSPOS_PUSH |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
NS_NewTableRowGroupFrame) },
{ NS_STYLE_DISPLAY_TABLE_HEADER_GROUP,
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup) },
FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_SKIP_ABSPOS_PUSH |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
NS_NewTableRowGroupFrame) },
{ NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP,
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup) },
FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_SKIP_ABSPOS_PUSH |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
NS_NewTableRowGroupFrame) },
{ NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP,
FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_SKIP_ABSPOS_PUSH |
Expand All @@ -4440,7 +4401,7 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
{ NS_STYLE_DISPLAY_TABLE_ROW,
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRowGroup),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup) },
&nsCSSFrameConstructor::ConstructTableRow) },
{ NS_STYLE_DISPLAY_TABLE_CELL,
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRow),
Expand Down Expand Up @@ -8857,14 +8818,15 @@ nsCSSFrameConstructor::sPseudoParentData[eParentTypeCount] = {
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
FCDATA_USE_CHILD_ITEMS |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRowGroup),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup),
&nsCSSFrameConstructor::ConstructTableRow),
&nsCSSAnonBoxes::tableRow
},
{ // Row group
FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
FCDATA_USE_CHILD_ITEMS |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
&nsCSSFrameConstructor::ConstructTableRowOrRowGroup),
FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_USE_CHILD_ITEMS |
FCDATA_SKIP_ABSPOS_PUSH |
FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
NS_NewTableRowGroupFrame),
&nsCSSAnonBoxes::tableRowGroup
},
{ // Column group
Expand Down
12 changes: 6 additions & 6 deletions layout/base/nsCSSFrameConstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ class nsCSSFrameConstructor : public nsFrameManager
nsFrameItems& aFrameItems);

/**
* FrameConstructionData callback for constructing table rows and row groups.
* FrameConstructionData callback used for constructing table rows.
*/
nsIFrame* ConstructTableRowOrRowGroup(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);
nsIFrame* ConstructTableRow(nsFrameConstructorState& aState,
FrameConstructionItem& aItem,
nsIFrame* aParentFrame,
const nsStyleDisplay* aStyleDisplay,
nsFrameItems& aFrameItems);

/**
* FrameConstructionData callback used for constructing table columns.
Expand Down
27 changes: 0 additions & 27 deletions layout/generic/nsFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5087,39 +5087,12 @@ nsIFrame::GetOverflowAreas() const
nsRect(nsPoint(0, 0), GetSize()));
}

nsOverflowAreas
nsIFrame::GetOverflowAreasRelativeToSelf() const
{
if (IsTransformed()) {
nsOverflowAreas* preTransformOverflows = static_cast<nsOverflowAreas*>
(Properties().Get(PreTransformOverflowAreasProperty()));
if (preTransformOverflows) {
return nsOverflowAreas(preTransformOverflows->VisualOverflow(),
preTransformOverflows->ScrollableOverflow());
}
}
return nsOverflowAreas(GetVisualOverflowRect(),
GetScrollableOverflowRect());
}

nsRect
nsIFrame::GetScrollableOverflowRectRelativeToParent() const
{
return GetScrollableOverflowRect() + mRect.TopLeft();
}

nsRect
nsIFrame::GetScrollableOverflowRectRelativeToSelf() const
{
if (IsTransformed()) {
nsOverflowAreas* preTransformOverflows = static_cast<nsOverflowAreas*>
(Properties().Get(PreTransformOverflowAreasProperty()));
if (preTransformOverflows)
return preTransformOverflows->ScrollableOverflow();
}
return GetScrollableOverflowRect();
}

nsRect
nsIFrame::GetVisualOverflowRectRelativeToSelf() const
{
Expand Down
18 changes: 0 additions & 18 deletions layout/generic/nsIFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -2216,15 +2216,6 @@ class nsIFrame : public nsQueryFrame

nsOverflowAreas GetOverflowAreas() const;

/**
* Same as GetOverflowAreas, except in this frame's coordinate
* system (before transforms are applied).
*
* @return the overflow areas relative to this frame, before any CSS transforms have
* been applied, i.e. in this frame's coordinate system
*/
nsOverflowAreas GetOverflowAreasRelativeToSelf() const;

/**
* Same as GetScrollableOverflowRect, except relative to the parent
* frame.
Expand All @@ -2234,15 +2225,6 @@ class nsIFrame : public nsQueryFrame
*/
nsRect GetScrollableOverflowRectRelativeToParent() const;

/**
* Same as GetScrollableOverflowRect, except in this frame's coordinate
* system (before transforms are applied).
*
* @return the rect relative to this frame, before any CSS transforms have
* been applied, i.e. in this frame's coordinate system
*/
nsRect GetScrollableOverflowRectRelativeToSelf() const;

/**
* Like GetVisualOverflowRect, except in this frame's
* coordinate system (before transforms are applied).
Expand Down
20 changes: 0 additions & 20 deletions layout/reftests/abs-pos/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,6 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== table-1.html table-1-ref.html
== table-2.html table-2-ref.html
== table-3.html table-3-ref.html
== table-cell-1.html table-internal-1-ref.html
== table-cell-2.html table-internal-2-ref.html
== table-cell-3.html table-internal-3-ref.html
== table-cell-4.html table-internal-4-ref.html
== table-row-1.html table-internal-1-ref.html
== table-row-2.html table-internal-2-ref.html
== table-row-3.html table-internal-3-ref.html
== table-row-4.html table-internal-4-ref.html
== table-row-group-1.html table-internal-1-ref.html
== table-row-group-2.html table-internal-2-ref.html
== table-row-group-3.html table-internal-3-ref.html
== table-row-group-4.html table-internal-4-ref.html
== table-header-group-1.html table-internal-1-ref.html
== table-header-group-2.html table-internal-2-ref.html
== table-header-group-3.html table-internal-3-ref.html
== table-header-group-4.html table-internal-4-ref.html
== table-footer-group-1.html table-internal-1-ref.html
== table-footer-group-2.html table-internal-2-ref.html
== table-footer-group-3.html table-internal-3-ref.html
== table-footer-group-4.html table-internal-4-ref.html
== continuation-positioned-inline-1.html continuation-positioned-inline-ref.html
== continuation-positioned-inline-2.html continuation-positioned-inline-ref.html
== scrollframe-1.html scrollframe-1-ref.html
Expand Down
36 changes: 0 additions & 36 deletions layout/reftests/abs-pos/table-cell-1.html

This file was deleted.

38 changes: 0 additions & 38 deletions layout/reftests/abs-pos/table-cell-2.html

This file was deleted.

50 changes: 0 additions & 50 deletions layout/reftests/abs-pos/table-cell-3.html

This file was deleted.

Loading

0 comments on commit 323c184

Please sign in to comment.