From 991f16122fa425ae45d881f0b77fd4535da6af76 Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Wed, 20 Jul 2022 00:48:21 +0000 Subject: [PATCH] Bug 1780264 Part 1 - Remove ReflowInput::mStyleVisibility. r=layout-reviewers,emilio Differential Revision: https://phabricator.services.mozilla.com/D152202 --- layout/generic/ReflowInput.cpp | 1 - layout/generic/ReflowInput.h | 1 - layout/generic/nsBlockFrame.cpp | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp index f5ed60bd7836..8e3eb6df408e 100644 --- a/layout/generic/ReflowInput.cpp +++ b/layout/generic/ReflowInput.cpp @@ -336,7 +336,6 @@ void ReflowInput::Init(nsPresContext* aPresContext, mStylePosition = mFrame->StylePosition(); mStyleDisplay = mFrame->StyleDisplay(); - mStyleVisibility = mFrame->StyleVisibility(); mStyleBorder = mFrame->StyleBorder(); mStyleMargin = mFrame->StyleMargin(); mStylePadding = mFrame->StylePadding(); diff --git a/layout/generic/ReflowInput.h b/layout/generic/ReflowInput.h index a556d6adc757..ff295f99c1c9 100644 --- a/layout/generic/ReflowInput.h +++ b/layout/generic/ReflowInput.h @@ -409,7 +409,6 @@ struct ReflowInput : public SizeComputationInput { // Cached pointers to the various style structs used during initialization. const nsStyleDisplay* mStyleDisplay = nullptr; - const nsStyleVisibility* mStyleVisibility = nullptr; const nsStylePosition* mStylePosition = nullptr; const nsStyleBorder* mStyleBorder = nullptr; const nsStyleMargin* mStyleMargin = nullptr; diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 6bc9d3709a38..6ad7a0b220ab 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -2724,8 +2724,7 @@ void nsBlockFrame::ReflowDirtyLines(BlockReflowState& aState) { const auto align = isLastLine ? StyleText()->TextAlignForLastLine() : StyleText()->mTextAlign; if (line->mWritingMode.IsVertical() || line->mWritingMode.IsBidiRTL() || - !IsAlignedLeft(align, - aState.mReflowInput.mStyleVisibility->mDirection, + !IsAlignedLeft(align, StyleVisibility()->mDirection, StyleTextReset()->mUnicodeBidi, this)) { line->MarkDirty(); }