Skip to content

Commit

Permalink
Backed out changeset f78453d75438 (bug 1855583) for wpt failure on em…
Browse files Browse the repository at this point in the history
…pty-text-baseline-001.html . CLOSED TREE
  • Loading branch information
nbeleuzu committed Nov 20, 2023
1 parent 0276299 commit 6b9047f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 125 deletions.
19 changes: 1 addition & 18 deletions layout/generic/nsLineLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1760,21 +1760,6 @@ static float GetInflationForBlockDirAlignment(nsIFrame* aFrame,
return nsLayoutUtils::FontSizeInflationInner(aFrame, aInflationMinFontSize);
}

bool nsLineLayout::ShouldApplyLineHeightInPreserveWhiteSpace(
const PerSpanData* psd) {
if (psd->mFrame->mFrame->Style()->IsAnonBox()) {
// e.g. An empty `input[type=button]` should still be line-height sized.
return true;
}

for (PerFrameData* pfd = psd->mFirstFrame; pfd; pfd = pfd->mNext) {
if (!pfd->mIsEmpty) {
return true;
}
}
return false;
}

#define BLOCKDIR_ALIGN_FRAMES_NO_MINIMUM nscoord_MAX
#define BLOCKDIR_ALIGN_FRAMES_NO_MAXIMUM nscoord_MIN

Expand Down Expand Up @@ -2309,9 +2294,7 @@ void nsLineLayout::VerticalAlignFrames(PerSpanData* psd) {
}
}
if (applyMinLH) {
if (psd->mHasNonemptyContent ||
(preMode && ShouldApplyLineHeightInPreserveWhiteSpace(psd)) ||
mHasMarker) {
if (psd->mHasNonemptyContent || preMode || mHasMarker) {
#ifdef NOISY_BLOCKDIR_ALIGN
printf(" [span]==> adjusting min/maxBCoord: currentValues: %d,%d",
minBCoord, maxBCoord);
Expand Down
3 changes: 0 additions & 3 deletions layout/generic/nsLineLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,6 @@ class nsLineLayout {
#ifdef DEBUG
void DumpPerSpanData(PerSpanData* psd, int32_t aIndent);
#endif

private:
static bool ShouldApplyLineHeightInPreserveWhiteSpace(const PerSpanData* psd);
};

#endif /* nsLineLayout_h___ */

This file was deleted.

This file was deleted.

0 comments on commit 6b9047f

Please sign in to comment.