Bug 1596184 - Get rid of nsStackFrame. r=layout-reviewers,mats

There are no legacy-stack uses anymore.

Differential Revision: https://phabricator.services.mozilla.com/D126077
This commit is contained in:
Emilio Cobos Álvarez 2021-09-20 12:05:32 +00:00
Родитель 44355968c1
Коммит 0873ed43bc
21 изменённых файлов: 995 добавлений и 1188 удалений

Просмотреть файл

@ -25,7 +25,6 @@ function boom(){
o_0.style.offsetInlineStart = "calc(3*25px)";
doc.style.paddingTop = "calc(67108864%)";
doc.style.width = "3e-0%";
o_0.style.display = "-moz-stack";
o_0.style.position = "relative";
}
addEventListener("DOMContentLoaded", boom);

Просмотреть файл

@ -1,11 +0,0 @@
<html>
<body>
<style>#stack{ display: -moz-stack; }</style>
<span id="stack"><select></select><select>
</select></span>
</body>
</html>

Просмотреть файл

@ -143,7 +143,7 @@ window.location.reload();
<q style=" display: -moz-inline-box; position: absolute; direction: rtl;">
<bdo style=" display: -moz-box; direction: rtl;">
<s style=" display: table-row; position: fixed; direction: rtl;">
<nobr style=" display: -moz-stack; direction: ltr;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
<nobr style=" direction: ltr;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
<bdo style=" display: table-column; position: absolute; direction: ltr;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</bdo>
<p>
@ -159,7 +159,7 @@ window.location.reload();
<bdo style=" display: table-column; position: absolute; direction: ltr;">
<bdo style=" display: inline-table; direction: ltr;">
<s style=" display: table-cell;">
<small style=" display: -moz-stack; position: fixed;">
<small style=" position: fixed;">
<nobr style=" display: table-footer-group; direction: ltr;">
<samp style=" display: table-row-group; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</samp>
@ -253,7 +253,7 @@ window.location.reload();
<s style=" display: table-cell;">
<bdo style=" display: -moz-box;">
<bdo style="overflow: scroll; display: -moz-box; float: right;">
<s style=" display: -moz-stack; position: fixed; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
<s style=" position: fixed; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</s>
</bdo>
</bdo>
@ -282,7 +282,7 @@ window.location.reload();
<s style=" display: table-cell;">
<bdo style=" display: -moz-box;">
<bdo style="overflow: scroll; display: -moz-box; float: right;">
<s style=" display: -moz-stack; position: fixed; direction: rtl;">
<s style=" position: fixed; direction: rtl;">
<s style=" display: -moz-inline-box; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</s>
</s>
@ -314,7 +314,7 @@ window.location.reload();
<s style=" display: table-cell;">
<bdo style=" display: -moz-box;">
<bdo style="overflow: scroll; display: -moz-box; float: right;">
<s style=" display: -moz-stack; position: fixed; direction: rtl;">
<s style=" position: fixed; direction: rtl;">
<s style=" display: -moz-inline-box; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</s>
<bdo style="overflow: hidden; display: -moz-popup; ">
@ -347,7 +347,7 @@ window.location.reload();
<s style=" display: table-cell;">
<bdo style=" display: -moz-box;">
<bdo style="overflow: scroll; display: -moz-box; float: right;">
<s style=" display: -moz-stack; position: fixed; direction: rtl;">
<s style=" position: fixed; direction: rtl;">
<bdo style="overflow: hidden; display: -moz-popup; ">
<q style=" display: list-item; direction: ltr;">
</q>
@ -381,7 +381,7 @@ window.location.reload();
<s style=" display: table-cell;">
<bdo style=" display: -moz-box;">
<bdo style="overflow: scroll; display: -moz-box; float: right;">
<s style=" display: -moz-stack; position: fixed; direction: rtl;">
<s style=" position: fixed; direction: rtl;">
<bdo style="overflow: hidden; display: -moz-popup; ">
<q style=" display: list-item; direction: ltr;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</q>
@ -565,7 +565,7 @@ window.location.reload();
<bdo style=" display: inline-block; direction: rtl;">
<small style=" display: -moz-inline-box; position: fixed; direction: ltr;">
<q style=" display: table-row; direction: rtl;">
<samp style=" display: -moz-stack; direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
<samp style=" direction: rtl;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
</samp>
</q>mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m
<bdo style=" display: table-row-group;">mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m

Просмотреть файл

@ -81,7 +81,6 @@ load 325984-2.html
load chrome://reftest/content/crashtests/layout/base/crashtests/328944-1.xhtml
load 329900-1.html
load 330015-1.html
load 331204-1.html
load 331679-1.xhtml
load 331679-2.xml
load 331679-3.xml

Просмотреть файл

@ -224,8 +224,6 @@ nsIFrame* NS_NewDeckFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewLeafBoxFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewStackFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewRangeFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewImageBoxFrame(PresShell* aPresShell, ComputedStyle* aStyle);
@ -257,8 +255,7 @@ nsHTMLScrollFrame* NS_NewHTMLScrollFrame(PresShell* aPresShell,
ComputedStyle* aStyle, bool aIsRoot);
nsXULScrollFrame* NS_NewXULScrollFrame(PresShell* aPresShell,
ComputedStyle* aStyle, bool aIsRoot,
bool aClipAllDescendants);
ComputedStyle* aStyle, bool aIsRoot);
nsIFrame* NS_NewSliderFrame(PresShell* aPresShell, ComputedStyle* aStyle);
@ -4234,9 +4231,7 @@ already_AddRefed<ComputedStyle> nsCSSFrameConstructor::BeginBuildingScrollFrame(
// HTMLScrollFrame
const nsStyleDisplay* displayStyle = aContentStyle->StyleDisplay();
if (displayStyle->IsXULDisplayStyle()) {
gfxScrollFrame = NS_NewXULScrollFrame(
mPresShell, contentStyle, aIsRoot,
displayStyle->mDisplay == StyleDisplay::MozStack);
gfxScrollFrame = NS_NewXULScrollFrame(mPresShell, contentStyle, aIsRoot);
} else {
gfxScrollFrame = NS_NewHTMLScrollFrame(mPresShell, contentStyle, aIsRoot);
}
@ -4557,11 +4552,6 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay& aDisplay,
return &data;
}
#ifdef MOZ_XUL
case StyleDisplayInside::MozStack: {
static const FrameConstructionData data =
SCROLLABLE_XUL_FCDATA(NS_NewStackFrame);
return &data;
}
case StyleDisplayInside::MozDeck: {
static const FrameConstructionData data =
SIMPLE_XUL_FCDATA(NS_NewDeckFrame);

Просмотреть файл

@ -92,7 +92,6 @@ FRAME_CLASSES = [
Frame("nsPageSequenceFrame", "PageSequence", NOT_LEAF),
Frame("nsSliderFrame", "Slider", NOT_LEAF),
Frame("nsSplitterFrame", "Box", NOT_LEAF),
Frame("nsStackFrame", "Box", NOT_LEAF),
Frame("nsSubDocumentFrame", "SubDocument", LEAF),
Frame("PrintedSheetFrame", "PrintedSheet", NOT_LEAF),
Frame("SVGAFrame", "SVGA", NOT_LEAF),

Просмотреть файл

@ -1458,21 +1458,18 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
//----------nsXULScrollFrame-------------------------------------------
nsXULScrollFrame* NS_NewXULScrollFrame(PresShell* aPresShell,
ComputedStyle* aStyle, bool aIsRoot,
bool aClipAllDescendants) {
return new (aPresShell) nsXULScrollFrame(aStyle, aPresShell->GetPresContext(),
aIsRoot, aClipAllDescendants);
ComputedStyle* aStyle, bool aIsRoot) {
return new (aPresShell)
nsXULScrollFrame(aStyle, aPresShell->GetPresContext(), aIsRoot);
}
NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame)
nsXULScrollFrame::nsXULScrollFrame(ComputedStyle* aStyle,
nsPresContext* aPresContext, bool aIsRoot,
bool aClipAllDescendants)
nsPresContext* aPresContext, bool aIsRoot)
: nsBoxFrame(aStyle, aPresContext, kClassID, aIsRoot),
mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot) {
SetXULLayoutManager(nullptr);
mHelper.mClipAllDescendants = aClipAllDescendants;
}
void nsXULScrollFrame::ScrollbarActivityStarted() const {
@ -2214,7 +2211,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter, bool aIsRoot)
mFrameIsUpdatingScrollbar(false),
mDidHistoryRestore(false),
mIsRoot(aIsRoot),
mClipAllDescendants(aIsRoot),
mSuppressScrollbarUpdate(false),
mSkippedScrollbarLayout(false),
mHadNonInitialReflow(false),
@ -3864,7 +3860,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// (clipRect) will be applied to the zoom container itself below.
nsRect clipRectForContents =
willBuildAsyncZoomContainer ? scrollPortClip : clipRect;
if (mClipAllDescendants) {
if (mIsRoot) {
clipState.ClipContentDescendants(clipRectForContents,
haveRadii ? radii : nullptr);
} else {
@ -3876,7 +3872,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
;
if (contentBoxClip) {
contentBoxClipState.emplace(aBuilder);
if (mClipAllDescendants) {
if (mIsRoot) {
contentBoxClipState->ClipContentDescendants(*contentBoxClip);
} else {
contentBoxClipState->ClipContainingBlockDescendants(*contentBoxClip);
@ -4049,7 +4045,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
if (willBuildAsyncZoomContainer) {
MOZ_ASSERT(mClipAllDescendants);
MOZ_ASSERT(mIsRoot);
// Wrap all our scrolled contents in an nsDisplayAsyncZoom. This will be
// the layer that gets scaled for APZ zooming. It does not have the

Просмотреть файл

@ -640,9 +640,6 @@ class ScrollFrameHelper : public nsIReflowCallback {
bool mDidHistoryRestore : 1;
// Is this the scrollframe for the document's viewport?
bool mIsRoot : 1;
// True if we should clip all descendants, false if we should only clip
// descendants for which we are the containing block.
bool mClipAllDescendants : 1;
// If true, don't try to layout the scrollbars in Reflow(). This can be
// useful if multiple passes are involved, because we don't want to place the
// scrollbars at the wrong size.
@ -1289,8 +1286,7 @@ class nsXULScrollFrame final : public nsBoxFrame,
friend nsXULScrollFrame* NS_NewXULScrollFrame(mozilla::PresShell* aPresShell,
ComputedStyle* aStyle,
bool aIsRoot,
bool aClipAllDescendants);
bool aIsRoot);
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) final {
@ -1712,8 +1708,7 @@ class nsXULScrollFrame final : public nsBoxFrame,
#endif
protected:
nsXULScrollFrame(ComputedStyle*, nsPresContext*, bool aIsRoot,
bool aClipAllDescendants);
nsXULScrollFrame(ComputedStyle*, nsPresContext*, bool aIsRoot);
void ClampAndSetBounds(nsBoxLayoutState& aState, nsRect& aRect,
nsPoint aScrollPosition,

Просмотреть файл

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="display: -moz-stack;" id="s">x</div>
</body>
</html>

Просмотреть файл

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="document.getElementById('s').firstChild.data = 'x';">
<div style="display: -moz-stack;" id="s"> </div>
</body>
</html>

Просмотреть файл

@ -925,7 +925,6 @@ fuzzy-if(winWidget,0-123,0-1900) fuzzy-if(webrender&&swgl,0-1,0-39) == 409659-1d
== 410621-1.html 410621-1-ref.html
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 411059-1.html 411059-1-ref.html # Bug 1392106
fuzzy-if(webrender&&winWidget,46-129,652-770) == 411334-1.xml 411334-1-ref.xml
== 411367-2.html 411367-2-ref.html
== 411367-3.html 411367-3-ref.html
== 411585-1.html 411585-1-ref.html
== 411585-2.html 411585-2-ref.html

Просмотреть файл

@ -91,8 +91,6 @@ enum class StyleDisplay : uint16_t {
StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::MozBox),
MozInlineBox =
StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::MozBox),
MozStack =
StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozStack),
MozDeck =
StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozDeck),
MozPopup =

Просмотреть файл

@ -1,22 +0,0 @@
<html>
<head>
<style type="text/css">
body {
overflow: auto;
display: -moz-stack;
}
</style>
</head>
<body>
<table><tbody><tr><td>Cell</td></tr></tbody></table>
</body>
</html>

Просмотреть файл

@ -31,7 +31,6 @@ load 308752-2.html
load 316636-1.html
load 317876.html
load chrome://reftest/content/crashtests/layout/tables/crashtests/322779-1.xhtml
load 323489-1.html
load 323604-1.html
load 323604-2.xhtml
load 329891.xhtml

Просмотреть файл

@ -33,7 +33,6 @@ UNIFIED_SOURCES += [
"nsScrollbarFrame.cpp",
"nsSliderFrame.cpp",
"nsSprocketLayout.cpp",
"nsStackFrame.cpp",
"nsStackLayout.cpp",
"nsXULTooltipListener.cpp",
]

Просмотреть файл

@ -127,7 +127,7 @@ class nsBoxFrame : public nsContainerFrame {
virtual bool HonorPrintBackgroundSettings() const override;
// virtual so nsStackFrame, nsButtonBoxFrame, nsSliderFrame and nsMenuFrame
// virtual so nsButtonBoxFrame, nsSliderFrame and nsMenuFrame
// can override it
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);

Просмотреть файл

@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//
// Eric Vaughan
// Netscape Communications
//
// See documentation in associated header file
//
#include "nsStackFrame.h"
#include "mozilla/ComputedStyle.h"
#include "mozilla/PresShell.h"
#include "nsIContent.h"
#include "nsCOMPtr.h"
#include "nsHTMLParts.h"
#include "nsCSSRendering.h"
#include "nsBoxLayoutState.h"
#include "nsStackLayout.h"
#include "nsDisplayList.h"
using namespace mozilla;
nsIFrame* NS_NewStackFrame(PresShell* aPresShell, ComputedStyle* aStyle) {
return new (aPresShell) nsStackFrame(aStyle, aPresShell->GetPresContext());
}
NS_IMPL_FRAMEARENA_HELPERS(nsStackFrame)
nsStackFrame::nsStackFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
: nsBoxFrame(aStyle, aPresContext, kClassID) {
nsCOMPtr<nsBoxLayout> layout;
NS_NewStackLayout(layout);
SetXULLayoutManager(layout);
}
// REVIEW: The old code put everything in the background layer. To be more
// consistent with the way other frames work, I'm putting everything in the
// Content() (i.e., foreground) layer (see nsIFrame::BuildDisplayListForChild,
// the case for stacking context but non-positioned, non-floating frames).
// This could easily be changed back by hacking
// nsBoxFrame::BuildDisplayListInternal a bit more.
void nsStackFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) {
// BuildDisplayListForChild puts stacking contexts into the
// PositionedDescendants list. So we need to map that list to
// aLists.Content(). This is an easy way to do that.
nsDisplayList* content = aLists.Content();
nsDisplayListSet kidLists(content, content, content, content, content,
content);
nsIFrame* kid = mFrames.FirstChild();
while (kid) {
// Force each child into its own true stacking context.
BuildDisplayListForChild(aBuilder, kid, kidLists,
DisplayChildFlag::ForceStackingContext);
kid = kid->GetNextSibling();
}
}

Просмотреть файл

@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
Eric D Vaughan
A frame that can have multiple children. Only one child may be displayed at
one time. So the can be flipped though like a Stack of cards.
**/
#ifndef nsStackFrame_h___
#define nsStackFrame_h___
#include "mozilla/Attributes.h"
#include "nsBoxFrame.h"
namespace mozilla {
class PresShell;
} // namespace mozilla
class nsStackFrame final : public nsBoxFrame {
public:
NS_DECL_FRAMEARENA_HELPERS(nsStackFrame)
friend nsIFrame* NS_NewStackFrame(mozilla::PresShell* aPresShell,
ComputedStyle* aStyle);
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"Stack"_ns, aResult);
}
#endif
virtual void BuildDisplayListForChildren(
nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) override;
protected:
explicit nsStackFrame(ComputedStyle* aStyle, nsPresContext* aPresContext);
}; // class nsStackFrame
#endif

Просмотреть файл

@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=372685
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<menuitem id="a" style="display: -moz-stack;">
<menuitem id="a" style="display: -moz-box;">
<box id="b" style="display: -moz-popup; ">
<box id="c" style="position: fixed;"></box>
</box>

Просмотреть файл

@ -110,8 +110,6 @@ pub enum DisplayInside {
#[cfg(feature = "gecko")]
MozBox,
#[cfg(feature = "gecko")]
MozStack,
#[cfg(feature = "gecko")]
MozDeck,
#[cfg(feature = "gecko")]
MozPopup,
@ -227,8 +225,6 @@ impl Display {
#[cfg(feature = "gecko")]
pub const MozInlineBox: Self = Self::new(DisplayOutside::Inline, DisplayInside::MozBox);
#[cfg(feature = "gecko")]
pub const MozStack: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozStack);
#[cfg(feature = "gecko")]
pub const MozDeck: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozDeck);
#[cfg(feature = "gecko")]
pub const MozPopup: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozPopup);
@ -609,8 +605,6 @@ impl Parse for Display {
#[cfg(feature = "gecko")]
"-moz-inline-box" if moz_box_display_values_enabled(context) => Display::MozInlineBox,
#[cfg(feature = "gecko")]
"-moz-stack" if moz_display_values_enabled(context) => Display::MozStack,
#[cfg(feature = "gecko")]
"-moz-deck" if moz_display_values_enabled(context) => Display::MozDeck,
#[cfg(feature = "gecko")]
"-moz-popup" if moz_display_values_enabled(context) => Display::MozPopup,

Просмотреть файл

@ -417,10 +417,6 @@ stack > *|*:not(:-moz-native-anonymous) {
min-height: 0;
}
legacy-stack {
display: -moz-stack;
}
/********** tabbox *********/
tabbox {