diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index d796324b5c94..63e01a10e289 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -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 @@ -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); diff --git a/layout/generic/nsLineLayout.h b/layout/generic/nsLineLayout.h index 917feb159533..16f78c754d51 100644 --- a/layout/generic/nsLineLayout.h +++ b/layout/generic/nsLineLayout.h @@ -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___ */ diff --git a/testing/web-platform/tests/css/css-display/empty-text-baseline-001.html b/testing/web-platform/tests/css/css-display/empty-text-baseline-001.html deleted file mode 100644 index bfcf639a3be6..000000000000 --- a/testing/web-platform/tests/css/css-display/empty-text-baseline-001.html +++ /dev/null @@ -1,42 +0,0 @@ - - -CSS Test: An Empty Text Node Should Not Generate a Baseline - - - - - - - - -
x
x
- diff --git a/testing/web-platform/tests/css/css-display/empty-text-baseline-002.html b/testing/web-platform/tests/css/css-display/empty-text-baseline-002.html deleted file mode 100644 index ca9558a403a0..000000000000 --- a/testing/web-platform/tests/css/css-display/empty-text-baseline-002.html +++ /dev/null @@ -1,62 +0,0 @@ - - -CSS Test: An Empty Text Node Should Not Generate a Baseline - - - - - - - - -
x
-
x
-
x
-
x
-