Bug 1675987 - No derogatory language: Remove references to "crazy" in layout module r=emilio,AlaskanEmily

Differential Revision: https://phabricator.services.mozilla.com/D97657
This commit is contained in:
Jon Bauman 2020-11-20 21:21:03 +00:00
Родитель 2e621affde
Коммит f5c1a59332
6 изменённых файлов: 27 добавлений и 27 удалений

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

@ -2029,8 +2029,8 @@ void nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
aMetrics.SetSize(wm, finalSize);
#ifdef DEBUG_blocks
if ((CRAZY_SIZE(aMetrics.Width()) || CRAZY_SIZE(aMetrics.Height())) &&
!GetParent()->IsCrazySizeAssertSuppressed()) {
if ((ABSURD_SIZE(aMetrics.Width()) || ABSURD_SIZE(aMetrics.Height())) &&
!GetParent()->IsAbsurdSizeAssertSuppressed()) {
ListTag(stdout);
printf(": WARNING: desired:%d,%d\n", aMetrics.Width(), aMetrics.Height());
}
@ -4923,11 +4923,11 @@ bool nsBlockFrame::PlaceLine(BlockReflowInput& aState,
}
#ifdef DEBUG
if (!GetParent()->IsCrazySizeAssertSuppressed()) {
if (!GetParent()->IsAbsurdSizeAssertSuppressed()) {
static nscoord lastHeight = 0;
if (CRAZY_SIZE(aLine->BStart())) {
if (ABSURD_SIZE(aLine->BStart())) {
lastHeight = aLine->BStart();
if (abs(aLine->BStart() - lastHeight) > CRAZY_COORD / 10) {
if (abs(aLine->BStart() - lastHeight) > ABSURD_COORD / 10) {
nsIFrame::ListTag(stdout);
printf(": line=%p y=%d line.bounds.height=%d\n",
static_cast<void*>(aLine.get()), aLine->BStart(),

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

@ -290,9 +290,9 @@ void nsBlockReflowContext::ReflowBlock(
#ifdef DEBUG
if (!aFrameReflowStatus.IsInlineBreakBefore()) {
if ((CRAZY_SIZE(mMetrics.ISize(mWritingMode)) ||
CRAZY_SIZE(mMetrics.BSize(mWritingMode))) &&
!mFrame->GetParent()->IsCrazySizeAssertSuppressed()) {
if ((ABSURD_SIZE(mMetrics.ISize(mWritingMode)) ||
ABSURD_SIZE(mMetrics.BSize(mWritingMode))) &&
!mFrame->GetParent()->IsAbsurdSizeAssertSuppressed()) {
printf("nsBlockReflowContext: ");
mFrame->ListTag(stdout);
printf(" metrics=%d,%d!\n", mMetrics.ISize(mWritingMode),

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

@ -29,9 +29,9 @@ class PresShell;
#ifdef DEBUG
// 10 million pixels, converted to app units. Note that this a bit larger
// than 1/4 of nscoord_MAX. So, if any content gets to be this large, we're
// definitely in danger of grazing up against nscoord_MAX; hence, it's CRAZY.
# define CRAZY_COORD (10000000 * 60)
# define CRAZY_SIZE(_x) (((_x) < -CRAZY_COORD) || ((_x) > CRAZY_COORD))
// definitely in danger of grazing up against nscoord_MAX; hence, it's ABSURD.
# define ABSURD_COORD (10000000 * 60)
# define ABSURD_SIZE(_x) (((_x) < -ABSURD_COORD) || ((_x) > ABSURD_COORD))
#endif
/**
@ -482,9 +482,9 @@ class nsContainerFrame : public nsSplittableFrame {
void ClearHasFirstLetterChild() { mHasFirstLetterChild = false; }
#ifdef DEBUG
// Use this to suppress the CRAZY_SIZE assertions.
// Use this to suppress the ABSURD_SIZE assertions.
NS_DECLARE_FRAME_PROPERTY_SMALL_VALUE(DebugReflowingWithInfiniteISize, bool)
bool IsCrazySizeAssertSuppressed() const {
bool IsAbsurdSizeAssertSuppressed() const {
return GetProperty(DebugReflowingWithInfiniteISize());
}
#endif

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

@ -4939,7 +4939,7 @@ static nscoord MeasuringReflow(nsIFrame* aChild,
rs = dummyParentState.ptr();
}
#ifdef DEBUG
// This will suppress various CRAZY_SIZE warnings for this reflow.
// This will suppress various ABSURD_SIZE warnings for this reflow.
parent->SetProperty(nsContainerFrame::DebugReflowingWithInfiniteISize(),
true);
#endif

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

@ -153,13 +153,13 @@ void nsLineLayout::BeginLineReflow(nscoord aICoord, nscoord aBCoord,
"very large sizes, not attempts at intrinsic width "
"calculation");
#ifdef DEBUG
if ((aISize != NS_UNCONSTRAINEDSIZE) && CRAZY_SIZE(aISize) &&
!LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
if ((aISize != NS_UNCONSTRAINEDSIZE) && ABSURD_SIZE(aISize) &&
!LineContainerFrame()->GetParent()->IsAbsurdSizeAssertSuppressed()) {
mBlockReflowInput->mFrame->ListTag(stdout);
printf(": Init: bad caller: width WAS %d(0x%x)\n", aISize, aISize);
}
if ((aBSize != NS_UNCONSTRAINEDSIZE) && CRAZY_SIZE(aBSize) &&
!LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
if ((aBSize != NS_UNCONSTRAINEDSIZE) && ABSURD_SIZE(aBSize) &&
!LineContainerFrame()->GetParent()->IsAbsurdSizeAssertSuppressed()) {
mBlockReflowInput->mFrame->ListTag(stdout);
printf(": Init: bad caller: height WAS %d(0x%x)\n", aBSize, aBSize);
}
@ -293,15 +293,15 @@ void nsLineLayout::UpdateBand(WritingMode aWM,
#endif
#ifdef DEBUG
if ((availSpace.ISize(lineWM) != NS_UNCONSTRAINEDSIZE) &&
CRAZY_SIZE(availSpace.ISize(lineWM)) &&
!LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
ABSURD_SIZE(availSpace.ISize(lineWM)) &&
!LineContainerFrame()->GetParent()->IsAbsurdSizeAssertSuppressed()) {
mBlockReflowInput->mFrame->ListTag(stdout);
printf(": UpdateBand: bad caller: ISize WAS %d(0x%x)\n",
availSpace.ISize(lineWM), availSpace.ISize(lineWM));
}
if ((availSpace.BSize(lineWM) != NS_UNCONSTRAINEDSIZE) &&
CRAZY_SIZE(availSpace.BSize(lineWM)) &&
!LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
ABSURD_SIZE(availSpace.BSize(lineWM)) &&
!LineContainerFrame()->GetParent()->IsAbsurdSizeAssertSuppressed()) {
mBlockReflowInput->mFrame->ListTag(stdout);
printf(": UpdateBand: bad caller: BSize WAS %d(0x%x)\n",
availSpace.BSize(lineWM), availSpace.BSize(lineWM));
@ -965,9 +965,9 @@ void nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowStatus& aReflowStatus,
// Note: break-before means ignore the reflow metrics since the
// frame will be reflowed another time.
if (!aReflowStatus.IsInlineBreakBefore()) {
if ((CRAZY_SIZE(reflowOutput.ISize(lineWM)) ||
CRAZY_SIZE(reflowOutput.BSize(lineWM))) &&
!LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
if ((ABSURD_SIZE(reflowOutput.ISize(lineWM)) ||
ABSURD_SIZE(reflowOutput.BSize(lineWM))) &&
!LineContainerFrame()->GetParent()->IsAbsurdSizeAssertSuppressed()) {
printf("nsLineLayout: ");
aFrame->ListTag(stdout);
printf(" metrics=%d,%d!\n", reflowOutput.Width(), reflowOutput.Height());
@ -2368,7 +2368,7 @@ void nsLineLayout::VerticalAlignFrames(PerSpanData* psd) {
// they might end up being aligned anywhere. However, we'll guess
// that they'll be placed aligned with the top or bottom of this
// frame (as though this frame is the only thing in the line).
// (Guessing isn't crazy, since all we're doing is reducing the
// (Guessing isn't unreasonable, since all we're doing is reducing the
// scope of a quirk and making the behavior more standards-like.)
if (maxStartBoxBSize > maxBCoord - minBCoord) {
// Distribute maxStartBoxBSize to ascent (baselineBCoord - minBCoord), and

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

@ -1979,7 +1979,7 @@ nsRect nsTreeBodyFrame::GetImageSize(int32_t aRowIndex, nsTreeColumn* aCol,
bool needHeight = false;
// We have to load image even though we already have a size.
// Don't change this, otherwise things start to go crazy.
// Don't change this, otherwise things start to go awry.
bool useImageRegion = true;
nsCOMPtr<imgIContainer> image;
GetImage(aRowIndex, aCol, aUseContext, aComputedStyle, useImageRegion,