From 0b12597ec200904c543522d8a023cbf77e559e78 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Wed, 20 Sep 2017 13:12:37 +1200 Subject: [PATCH] Bug 1402204 - Remove NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL as it doesn't appear to be needed any more. r=mats --- layout/generic/TextOverflow.cpp | 2 -- layout/generic/nsFrameStateBits.h | 11 ----------- layout/generic/nsGfxScrollFrame.cpp | 18 +----------------- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp index 53c63b015289..98e6941939c9 100644 --- a/layout/generic/TextOverflow.cpp +++ b/layout/generic/TextOverflow.cpp @@ -366,8 +366,6 @@ TextOverflow::TextOverflow(nsDisplayListBuilder* aBuilder, LogicalPoint(mBlockWM, mScrollableFrame->GetScrollPosition(), nullContainerSize)); - nsIFrame* scrollFrame = do_QueryFrame(mScrollableFrame); - scrollFrame->AddStateBits(NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL); } uint8_t direction = aBlockFrame->StyleVisibility()->mDirection; const nsStyleTextReset* style = aBlockFrame->StyleTextReset(); diff --git a/layout/generic/nsFrameStateBits.h b/layout/generic/nsFrameStateBits.h index 392c25ef5d12..8cf02597a9a3 100644 --- a/layout/generic/nsFrameStateBits.h +++ b/layout/generic/nsFrameStateBits.h @@ -556,17 +556,6 @@ FRAME_STATE_BIT(Block, 62, BULLET_FRAME_HAS_FONT_INFLATION) FRAME_STATE_BIT(Block, 63, BULLET_FRAME_IMAGE_LOADING) -// == Frame state bits that apply to scroll frames ============================ - -FRAME_STATE_GROUP(Scroll, nsIScrollableFrame) - -// When set, the next scroll operation on the scrollframe will invalidate its -// entire contents. Useful for text-overflow. -// This bit is cleared after each time the scrollframe is scrolled. Whoever -// needs to set it should set it again on each paint. -FRAME_STATE_BIT(Scroll, 20, NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL) - - // == Frame state bits that apply to image frames ============================= FRAME_STATE_GROUP(Image, nsImageFrame) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index b297106150cc..03791fda3ded 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2421,12 +2421,6 @@ static void AdjustViews(nsIFrame* aFrame) } } -static bool -NeedToInvalidateOnScroll(nsIFrame* aFrame) -{ - return (aFrame->GetStateBits() & NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL) != 0; -} - bool ScrollFrameHelper::IsIgnoringViewportClipping() const { if (!mIsRoot) @@ -2603,14 +2597,7 @@ void ScrollFrameHelper::ScrollVisual() AdjustViews(mScrolledFrame); // We need to call this after fixing up the view positions // to be consistent with the frame hierarchy. - bool needToInvalidateOnScroll = NeedToInvalidateOnScroll(mOuter); - mOuter->RemoveStateBits(NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL); - if (needToInvalidateOnScroll) { - MarkNotRecentlyScrolled(); - } else { - MarkRecentlyScrolled(); - } - + MarkRecentlyScrolled(); } /** @@ -3279,9 +3266,6 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, if (aBuilder->IsPaintingToWindow()) { mScrollPosAtLastPaint = GetScrollPosition(); - if (IsMaybeScrollingActive() && NeedToInvalidateOnScroll(mOuter)) { - MarkNotRecentlyScrolled(); - } if (IsMaybeScrollingActive()) { if (mScrollPosForLayerPixelAlignment == nsPoint(-1,-1)) { mScrollPosForLayerPixelAlignment = mScrollPosAtLastPaint;