Back out c04824522d46 (bug 848973) for (at least) 10.8 and Android reftest failures

CLOSED TREE
This commit is contained in:
Phil Ringnalda
2013-03-26 23:31:57 -07:00
parent 32bb774c42
commit 5198339fdf
4 changed files with 60 additions and 86 deletions

View File

@@ -1956,7 +1956,7 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
// Mark the table frame as an absolute container if needed
newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
if (display->IsPositionedStyle() && !aParentFrame->IsSVGText()) {
if (display->IsPositioned(aParentFrame)) {
aState.PushAbsoluteContainingBlock(newFrame, absoluteSaveState);
}
if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
@@ -3623,8 +3623,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
} else if (!(bits & FCDATA_SKIP_ABSPOS_PUSH)) {
nsIFrame* cb = maybeAbsoluteContainingBlock;
cb->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
if (maybeAbsoluteContainingBlockDisplay->IsPositionedStyle()) {
NS_ASSERTION(!cb->IsSVGText(), "SVG text cannot have abspos children");
if (maybeAbsoluteContainingBlockDisplay->IsPositioned(cb)) {
aState.PushAbsoluteContainingBlock(cb, absoluteSaveState);
}
}
@@ -4242,7 +4241,8 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
// XXX Ignore tables for the time being
// XXXbz it would be nice to combine this with the other block
// case... Think about how do do this?
if (aDisplay->IsBlockInsideStyle() &&
if ((aParentFrame ? aDisplay->IsBlockInside(aParentFrame) :
aDisplay->IsBlockInsideStyle()) &&
aDisplay->IsScrollableOverflow() &&
!propagatedScrollToViewport) {
// Except we don't want to do that for paginated contexts for
@@ -4263,7 +4263,8 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
}
// Handle various non-scrollable blocks
if (aDisplay->IsBlockInsideStyle()) {
if ((aParentFrame ? aDisplay->IsBlockInside(aParentFrame) :
aDisplay->IsBlockInsideStyle())) {
static const FrameConstructionData sNonScrollableBlockData =
FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructNonScrollableBlock);
return &sNonScrollableBlockData;
@@ -4329,7 +4330,8 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
&nsCSSFrameConstructor::ConstructTableCell) }
};
return FindDataByInt(aDisplay->mDisplay,
return FindDataByInt((aParentFrame ? aDisplay->GetDisplay(aParentFrame) :
aDisplay->mDisplay),
aElement, aStyleContext, sDisplayData,
ArrayLength(sDisplayData));
}
@@ -5291,7 +5293,8 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
(!aParentFrame || // No aParentFrame means inline
aParentFrame->StyleDisplay()->mDisplay == NS_STYLE_DISPLAY_INLINE)) ||
// Things that are inline-outside but aren't inline frames are inline
display->IsInlineOutsideStyle() ||
(aParentFrame ? display->IsInlineOutside(aParentFrame) :
display->IsInlineOutsideStyle()) ||
// Popups that are certainly out of flow.
isPopup;
@@ -10451,7 +10454,7 @@ nsCSSFrameConstructor::CreateLetterFrame(nsIFrame* aBlockFrame,
// Create the right type of first-letter frame
const nsStyleDisplay* display = sc->StyleDisplay();
if (display->IsFloatingStyle() && !aParentFrame->IsSVGText()) {
if (display->IsFloating(aParentFrame)) {
// Make a floating first-letter frame
CreateFloatingLetterFrame(state, aBlockFrame, aTextContent, textFrame,
blockContent, aParentFrame, sc, aResult);