Bug 1402204 - Remove NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL as it doesn't appear to be needed any more. r=mats

This commit is contained in:
Matt Woodrow 2017-09-20 13:12:37 +12:00
Родитель 9b61794af5
Коммит 0b12597ec2
3 изменённых файлов: 1 добавлений и 30 удалений

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

@ -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();

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

@ -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)

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

@ -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;