forked from mirrors/gecko-dev
Bug 1600542 - Remove a few other no longer reachable XUL box special-cases. r=TYLin
The only XUL frames that remain are either scrollbars, or leafs. These are uses that I'm pretty sure are no longer needed. There are a few others that will go in the future. Depends on D172874 Differential Revision: https://phabricator.services.mozilla.com/D172875
This commit is contained in:
parent
c869e31d5e
commit
5dfcee19a5
3 changed files with 18 additions and 64 deletions
|
|
@ -11513,15 +11513,6 @@ PresShell::WindowSizeConstraints PresShell::GetWindowSizeConstraints() {
|
||||||
if (!rootFrame || !mPresContext) {
|
if (!rootFrame || !mPresContext) {
|
||||||
return {minSize, maxSize};
|
return {minSize, maxSize};
|
||||||
}
|
}
|
||||||
if (rootFrame->IsXULBoxFrame()) {
|
|
||||||
UniquePtr<gfxContext> rcx(CreateReferenceRenderingContext());
|
|
||||||
if (!rcx) {
|
|
||||||
return {minSize, maxSize};
|
|
||||||
}
|
|
||||||
nsBoxLayoutState state(mPresContext, rcx.get());
|
|
||||||
minSize = rootFrame->GetXULMinSize(state);
|
|
||||||
maxSize = rootFrame->GetXULMaxSize(state);
|
|
||||||
} else {
|
|
||||||
const auto* pos = rootFrame->StylePosition();
|
const auto* pos = rootFrame->StylePosition();
|
||||||
if (pos->mMinWidth.ConvertsToLength()) {
|
if (pos->mMinWidth.ConvertsToLength()) {
|
||||||
minSize.width = pos->mMinWidth.ToLength();
|
minSize.width = pos->mMinWidth.ToLength();
|
||||||
|
|
@ -11535,7 +11526,6 @@ PresShell::WindowSizeConstraints PresShell::GetWindowSizeConstraints() {
|
||||||
if (pos->mMaxHeight.ConvertsToLength()) {
|
if (pos->mMaxHeight.ConvertsToLength()) {
|
||||||
maxSize.height = pos->mMaxHeight.ToLength();
|
maxSize.height = pos->mMaxHeight.ToLength();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return {minSize, maxSize};
|
return {minSize, maxSize};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -965,15 +965,6 @@ static bool RecomputePosition(nsIFrame* aFrame) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool HasBoxAncestor(nsIFrame* aFrame) {
|
|
||||||
for (nsIFrame* f = aFrame; f; f = f->GetParent()) {
|
|
||||||
if (f->IsXULBoxFrame()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if aFrame's subtree has placeholders for out-of-flow content
|
* Return true if aFrame's subtree has placeholders for out-of-flow content
|
||||||
* that would be affected due to the change to
|
* that would be affected due to the change to
|
||||||
|
|
@ -1285,11 +1276,6 @@ static void StyleChangeReflow(nsIFrame* aFrame, nsChangeHint aHint) {
|
||||||
dirtyType = IntrinsicDirty::FrameAncestorsAndDescendants;
|
dirtyType = IntrinsicDirty::FrameAncestorsAndDescendants;
|
||||||
} else if (aHint & nsChangeHint_ClearAncestorIntrinsics) {
|
} else if (aHint & nsChangeHint_ClearAncestorIntrinsics) {
|
||||||
dirtyType = IntrinsicDirty::FrameAndAncestors;
|
dirtyType = IntrinsicDirty::FrameAndAncestors;
|
||||||
} else if ((aHint & nsChangeHint_UpdateComputedBSize) &&
|
|
||||||
HasBoxAncestor(aFrame)) {
|
|
||||||
// The frame's computed BSize is changing, and we have a box ancestor
|
|
||||||
// whose cached intrinsic height may need to be updated.
|
|
||||||
dirtyType = IntrinsicDirty::FrameAndAncestors;
|
|
||||||
} else {
|
} else {
|
||||||
dirtyType = IntrinsicDirty::None;
|
dirtyType = IntrinsicDirty::None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -603,23 +603,6 @@ void BasicTableLayoutStrategy::DistributePctISizeToColumns(float aSpanPrefPct,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
// Bypass some assertions for tables inside XUL which we're realistically not
|
|
||||||
// going to investigate unless they cause havoc. Thunderbird hits these very
|
|
||||||
// often.
|
|
||||||
static bool IsCloseToXULBox(nsTableFrame* aTableFrame) {
|
|
||||||
// NOTE: GetParent() is guaranteed to be the table wrapper (thus non-null).
|
|
||||||
nsIFrame* f = aTableFrame->GetParent()->GetParent();
|
|
||||||
for (size_t i = 0; f && i < 2; ++i) {
|
|
||||||
if (f->IsXULBoxFrame()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
f = f->GetParent();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void BasicTableLayoutStrategy::DistributeISizeToColumns(
|
void BasicTableLayoutStrategy::DistributeISizeToColumns(
|
||||||
nscoord aISize, int32_t aFirstCol, int32_t aColCount,
|
nscoord aISize, int32_t aFirstCol, int32_t aColCount,
|
||||||
BtlsISizeType aISizeType, bool aSpanHasSpecifiedISize) {
|
BtlsISizeType aISizeType, bool aSpanHasSpecifiedISize) {
|
||||||
|
|
@ -776,8 +759,7 @@ void BasicTableLayoutStrategy::DistributeISizeToColumns(
|
||||||
// Return early -- we don't have any extra space to distribute.
|
// Return early -- we don't have any extra space to distribute.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NS_ASSERTION(!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min) ||
|
NS_ASSERTION(!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min),
|
||||||
IsCloseToXULBox(mTableFrame),
|
|
||||||
"Table inline-size is less than the "
|
"Table inline-size is less than the "
|
||||||
"sum of its columns' min inline-sizes");
|
"sum of its columns' min inline-sizes");
|
||||||
if (aISize < guess_min_pct) {
|
if (aISize < guess_min_pct) {
|
||||||
|
|
@ -1007,13 +989,9 @@ void BasicTableLayoutStrategy::DistributeISizeToColumns(
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
NS_ASSERTION(
|
||||||
if (!IsCloseToXULBox(mTableFrame)) {
|
(space == 0 || space == nscoord_MAX) &&
|
||||||
NS_ASSERTION((space == 0 || space == nscoord_MAX) &&
|
((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f)
|
||||||
((l2t == FLEX_PCT_LARGE)
|
|
||||||
? (-0.001f < basis.f && basis.f < 0.001f)
|
|
||||||
: (basis.c == 0 || basis.c == nscoord_MAX)),
|
: (basis.c == 0 || basis.c == nscoord_MAX)),
|
||||||
"didn't subtract all that we added");
|
"didn't subtract all that we added");
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue