mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout changesets 3581b3d60886, cff9eab960e3, d390c8c21882 for Android foreignObject-fixedpos-01.html failures on a CLOSED TREE.
This commit is contained in:
parent
c309f38e81
commit
4546c52c30
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function addFrame(contents)
|
||||
{
|
||||
var frame = document.createElement("iframe");
|
||||
frame.src = "data:text/html," + contents;
|
||||
document.body.appendChild(frame);
|
||||
}
|
||||
function boom()
|
||||
{
|
||||
addFrame("1");
|
||||
document.documentElement.offsetHeight;
|
||||
addFrame("2");
|
||||
document.body.style.display = "table-caption";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
@ -391,6 +391,5 @@ load 770381-1.html
|
||||
load 795646.html
|
||||
load 813372-1.html
|
||||
load 836990-1.html
|
||||
load 860579-1.html
|
||||
pref(layers.force-active,true) load 859526-1.html
|
||||
pref(layers.force-active,true) load 859630-1.html
|
||||
|
@ -791,12 +791,7 @@ public:
|
||||
// logic in GetAbsoluteContainingBlock.
|
||||
// Also makes aNewAbsoluteContainingBlock the containing block for
|
||||
// fixed-pos elements if necessary.
|
||||
// aPositionedFrame is the frame whose style actually makes
|
||||
// aNewAbsoluteContainingBlock a containing block. E.g. for a scrollable element
|
||||
// aPositionedFrame is the element's primary frame and
|
||||
// aNewAbsoluteContainingBlock is the scrolled frame.
|
||||
void PushAbsoluteContainingBlock(nsIFrame* aNewAbsoluteContainingBlock,
|
||||
nsIFrame* aPositionedFrame,
|
||||
nsFrameConstructorSaveState& aSaveState);
|
||||
|
||||
// Function to push the existing float containing block state and
|
||||
@ -1034,7 +1029,6 @@ AdjustAbsoluteContainingBlock(nsIFrame* aContainingBlockIn)
|
||||
|
||||
void
|
||||
nsFrameConstructorState::PushAbsoluteContainingBlock(nsIFrame* aNewAbsoluteContainingBlock,
|
||||
nsIFrame* aPositionedFrame,
|
||||
nsFrameConstructorSaveState& aSaveState)
|
||||
{
|
||||
aSaveState.mItems = &mAbsoluteItems;
|
||||
@ -1050,14 +1044,14 @@ nsFrameConstructorState::PushAbsoluteContainingBlock(nsIFrame* aNewAbsoluteConta
|
||||
mFixedItems = mAbsoluteItems;
|
||||
}
|
||||
|
||||
mAbsoluteItems =
|
||||
mAbsoluteItems =
|
||||
nsAbsoluteItems(AdjustAbsoluteContainingBlock(aNewAbsoluteContainingBlock));
|
||||
|
||||
/* See if we're wiring the fixed-pos and abs-pos lists together. This happens iff
|
||||
* we're a transformed element.
|
||||
*/
|
||||
mFixedPosIsAbsPos = aPositionedFrame &&
|
||||
aPositionedFrame->StyleDisplay()->HasTransform(aPositionedFrame);
|
||||
mFixedPosIsAbsPos = aNewAbsoluteContainingBlock &&
|
||||
aNewAbsoluteContainingBlock->StyleDisplay()->HasTransform(aNewAbsoluteContainingBlock);
|
||||
|
||||
if (aNewAbsoluteContainingBlock) {
|
||||
aNewAbsoluteContainingBlock->MarkAsAbsoluteContainingBlock();
|
||||
@ -1961,7 +1955,7 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
||||
(display->HasTransformStyle() &&
|
||||
aParentFrame->IsFrameOfType(nsIFrame::eSupportsCSSTransforms))) &&
|
||||
!aParentFrame->IsSVGText()) {
|
||||
aState.PushAbsoluteContainingBlock(newFrame, newFrame, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(newFrame, absoluteSaveState);
|
||||
}
|
||||
if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
|
||||
ConstructFramesFromItemList(aState, aItem.mChildItems,
|
||||
@ -2363,7 +2357,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
||||
// the root element
|
||||
mDocElementContainingBlock->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
state.PushAbsoluteContainingBlock(mDocElementContainingBlock,
|
||||
mDocElementContainingBlock,
|
||||
absoluteSaveState);
|
||||
}
|
||||
|
||||
@ -2450,8 +2443,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
||||
mDocElementContainingBlock),
|
||||
mDocElementContainingBlock, styleContext,
|
||||
&contentFrame, frameItems,
|
||||
display->IsPositioned(contentFrame) ? contentFrame : nullptr,
|
||||
nullptr);
|
||||
display->IsPositioned(contentFrame), nullptr);
|
||||
newFrame = frameItems.FirstChild();
|
||||
NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
|
||||
}
|
||||
@ -3072,7 +3064,7 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
|
||||
|
||||
newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
if (newFrame->IsPositioned()) {
|
||||
aState.PushAbsoluteContainingBlock(newFrame, newFrame, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(newFrame, absoluteSaveState);
|
||||
}
|
||||
|
||||
ProcessChildren(aState, content, styleContext, blockFrame, true,
|
||||
@ -3623,7 +3615,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
nsFrameConstructorSaveState absoluteSaveState;
|
||||
|
||||
if (bits & FCDATA_FORCE_NULL_ABSPOS_CONTAINER) {
|
||||
aState.PushAbsoluteContainingBlock(nullptr, nullptr, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(nullptr, absoluteSaveState);
|
||||
} else if (!(bits & FCDATA_SKIP_ABSPOS_PUSH)) {
|
||||
nsIFrame* cb = maybeAbsoluteContainingBlock;
|
||||
cb->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
@ -3632,7 +3624,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
(maybeAbsoluteContainingBlockDisplay->HasTransformStyle() &&
|
||||
cb->IsFrameOfType(nsIFrame::eSupportsCSSTransforms))) &&
|
||||
!cb->IsSVGText()) {
|
||||
aState.PushAbsoluteContainingBlock(cb, primaryFrame, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(cb, absoluteSaveState);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4367,7 +4359,7 @@ nsCSSFrameConstructor::ConstructScrollableBlock(nsFrameConstructorState& aState,
|
||||
ConstructBlock(aState, scrolledContentStyle->StyleDisplay(), content,
|
||||
newFrame, newFrame, scrolledContentStyle,
|
||||
&scrolledFrame, blockItem,
|
||||
aDisplay->IsPositioned(newFrame) ? newFrame : nullptr,
|
||||
aDisplay->IsPositioned(scrolledFrame),
|
||||
aItem.mPendingBinding);
|
||||
|
||||
NS_ASSERTION(blockItem.FirstChild() == scrolledFrame,
|
||||
@ -4410,8 +4402,7 @@ nsCSSFrameConstructor::ConstructNonScrollableBlock(nsFrameConstructorState& aSta
|
||||
ConstructBlock(aState, aDisplay, aItem.mContent,
|
||||
aState.GetGeometricParent(aDisplay, aParentFrame),
|
||||
aParentFrame, styleContext, &newFrame,
|
||||
aFrameItems,
|
||||
aDisplay->IsPositioned(newFrame) ? newFrame : nullptr,
|
||||
aFrameItems, aDisplay->IsPositioned(newFrame),
|
||||
aItem.mPendingBinding);
|
||||
return newFrame;
|
||||
}
|
||||
@ -10901,7 +10892,7 @@ nsCSSFrameConstructor::ConstructBlock(nsFrameConstructorState& aState,
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame** aNewFrame,
|
||||
nsFrameItems& aFrameItems,
|
||||
nsIFrame* aPositionedFrameForAbsPosContainer,
|
||||
bool aAbsPosContainer,
|
||||
PendingBinding* aPendingBinding)
|
||||
{
|
||||
// Create column wrapper if necessary
|
||||
@ -10946,9 +10937,9 @@ nsCSSFrameConstructor::ConstructBlock(nsFrameConstructorState& aState,
|
||||
// in nsBlockFrame::CalculateContainingBlockSizeForAbsolutes.
|
||||
nsFrameConstructorSaveState absoluteSaveState;
|
||||
(*aNewFrame)->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
if (aPositionedFrameForAbsPosContainer) {
|
||||
if (aAbsPosContainer) {
|
||||
// NS_ASSERTION(aRelPos, "should have made area frame for this");
|
||||
aState.PushAbsoluteContainingBlock(*aNewFrame, aPositionedFrameForAbsPosContainer, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(*aNewFrame, absoluteSaveState);
|
||||
}
|
||||
|
||||
// Process the child content
|
||||
@ -11047,7 +11038,7 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
|
||||
if (positioned) {
|
||||
// Relatively positioned frames becomes a container for child
|
||||
// frames that are positioned
|
||||
aState.PushAbsoluteContainingBlock(newFrame, newFrame, absoluteSaveState);
|
||||
aState.PushAbsoluteContainingBlock(newFrame, absoluteSaveState);
|
||||
}
|
||||
|
||||
// Process the child content
|
||||
|
@ -1582,9 +1582,6 @@ private:
|
||||
// block
|
||||
// @param aContentParent is the parent the block would have if it
|
||||
// were in-flow
|
||||
// @param aPositionedFrameForAbsPosContainer if non-null, then the new
|
||||
// block should be an abs-pos container and aPositionedFrameForAbsPosContainer
|
||||
// is the frame whose style is making this block an abs-pos container.
|
||||
// @param aPendingBinding the pending binding from this block's frame
|
||||
// construction item.
|
||||
void ConstructBlock(nsFrameConstructorState& aState,
|
||||
@ -1595,7 +1592,7 @@ private:
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame** aNewFrame,
|
||||
nsFrameItems& aFrameItems,
|
||||
nsIFrame* aPositionedFrameForAbsPosContainer,
|
||||
bool aAbsPosContainer,
|
||||
PendingBinding* aPendingBinding);
|
||||
|
||||
nsIFrame* ConstructInline(nsFrameConstructorState& aState,
|
||||
|
@ -1396,15 +1396,28 @@ static void Sort(nsDisplayList* aList, int32_t aCount, nsDisplayList::SortLEQ aC
|
||||
}
|
||||
|
||||
static nsIContent* FindContentInDocument(nsDisplayItem* aItem, nsIDocument* aDoc) {
|
||||
nsIFrame* f = aItem->GetUnderlyingFrame();
|
||||
while (f) {
|
||||
nsPresContext* pc = f->PresContext();
|
||||
if (pc->Document() == aDoc) {
|
||||
return f->GetContent();
|
||||
nsIFrame* frame = aItem->GetUnderlyingFrame();
|
||||
nsIContent* c = frame->GetContent();
|
||||
for (;;) {
|
||||
nsIDocument* d;
|
||||
if (c) {
|
||||
d = c->OwnerDoc();
|
||||
} else {
|
||||
d = frame->PresContext()->Document();
|
||||
}
|
||||
if (d == aDoc) {
|
||||
return c;
|
||||
}
|
||||
nsIDocument* parentDoc = d->GetParentDocument();
|
||||
if (!parentDoc) {
|
||||
return nullptr;
|
||||
}
|
||||
c = parentDoc->FindContentForSubDocument(d);
|
||||
if (!c) {
|
||||
NS_ERROR("No content for subdocument?");
|
||||
return nullptr;
|
||||
}
|
||||
f = nsLayoutUtils::GetCrossDocParentFrame(pc->PresShell()->GetRootFrame());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static bool IsContentLEQ(nsDisplayItem* aItem1, nsDisplayItem* aItem2,
|
||||
|
@ -807,19 +807,11 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsDisplayList content;
|
||||
|
||||
{
|
||||
// Clear clip state while we construct the children of the
|
||||
// nsDisplayTransform, since they'll be in a different coordinate system.
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
clipState.Clear();
|
||||
|
||||
nsIFrame* child = GetFirstPrincipalChild();
|
||||
while (child) {
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->GetVisualOverflowRectRelativeToSelf(), &content);
|
||||
child = child->GetNextSibling();
|
||||
}
|
||||
nsIFrame* child = GetFirstPrincipalChild();
|
||||
while (child) {
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->GetVisualOverflowRectRelativeToSelf(), &content);
|
||||
child = child->GetNextSibling();
|
||||
}
|
||||
|
||||
content.AppendNewToTop(new (aBuilder)
|
||||
|
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
#parent {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin-left: 10px;
|
||||
background: green;
|
||||
}
|
||||
#child {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="parent">
|
||||
<div id="child"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,27 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
#parent {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
overflow: hidden;
|
||||
transform: translateX(10px);
|
||||
background: green;
|
||||
}
|
||||
#child {
|
||||
position: fixed;
|
||||
top: -10px;
|
||||
left: -10px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="parent">
|
||||
<div id="child"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1753,6 +1753,5 @@ skip-if(B2G) == 818276-1.html 818276-1-ref.html
|
||||
== 847850-1.html 847850-1-ref.html
|
||||
== 848421-1.html 848421-1-ref.html
|
||||
test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html
|
||||
== 849996-1.html 849996-1-ref.html
|
||||
== 858803-1.html 858803-1-ref.html
|
||||
!= 860370.html 860370-notref.html
|
||||
|
Loading…
Reference in New Issue
Block a user