зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241371. Properly update mLastUpdateImagesPos on scrollframes when the image visibility pass encounters them. r=mats
This is a regression from bug 1002992 where we switch from the display list builder to the frame tree walker and didn't update mLastUpdateImagesPos in the frame walker.
This commit is contained in:
Родитель
6cd0b6de0f
Коммит
aefbcd85cf
|
@ -5577,6 +5577,7 @@ PresShell::MarkImagesInSubtreeVisible(nsIFrame* aFrame, const nsRect& aRect)
|
|||
|
||||
nsIScrollableFrame* scrollFrame = do_QueryFrame(aFrame);
|
||||
if (scrollFrame) {
|
||||
scrollFrame->NotifyImageVisibilityUpdate();
|
||||
nsRect displayPort;
|
||||
bool usingDisplayport =
|
||||
nsLayoutUtils::GetDisplayPortForVisibilityTesting(
|
||||
|
|
|
@ -2474,6 +2474,12 @@ ScrollFrameHelper::ScheduleSyntheticMouseMove()
|
|||
ScrollActivityCallback, this, 100, nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
||||
void
|
||||
ScrollFrameHelper::NotifyImageVisibilityUpdate()
|
||||
{
|
||||
mLastUpdateImagesPos = GetScrollPosition();
|
||||
}
|
||||
|
||||
void
|
||||
ScrollFrameHelper::ScrollToImpl(nsPoint aPt, const nsRect& aRange, nsIAtom* aOrigin)
|
||||
{
|
||||
|
@ -2896,7 +2902,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
if (aBuilder->IsForImageVisibility()) {
|
||||
mLastUpdateImagesPos = GetScrollPosition();
|
||||
NotifyImageVisibilityUpdate();
|
||||
}
|
||||
|
||||
mOuter->DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
|
|
@ -367,6 +367,7 @@ public:
|
|||
bool DecideScrollableLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRect* aDirtyRect,
|
||||
bool aAllowCreateDisplayPort);
|
||||
void NotifyImageVisibilityUpdate();
|
||||
|
||||
void ScheduleSyntheticMouseMove();
|
||||
static void ScrollActivityCallback(nsITimer *aTimer, void* anInstance);
|
||||
|
@ -849,6 +850,9 @@ public:
|
|||
bool aAllowCreateDisplayPort) override {
|
||||
return mHelper.DecideScrollableLayer(aBuilder, aDirtyRect, aAllowCreateDisplayPort);
|
||||
}
|
||||
virtual void NotifyImageVisibilityUpdate() override {
|
||||
mHelper.NotifyImageVisibilityUpdate();
|
||||
}
|
||||
|
||||
// nsIStatefulFrame
|
||||
NS_IMETHOD SaveState(nsPresState** aState) override {
|
||||
|
@ -1316,7 +1320,9 @@ public:
|
|||
bool aAllowCreateDisplayPort) override {
|
||||
return mHelper.DecideScrollableLayer(aBuilder, aDirtyRect, aAllowCreateDisplayPort);
|
||||
}
|
||||
|
||||
virtual void NotifyImageVisibilityUpdate() override {
|
||||
mHelper.NotifyImageVisibilityUpdate();
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
virtual nsresult GetFrameName(nsAString& aResult) const override;
|
||||
|
|
|
@ -441,6 +441,11 @@ public:
|
|||
virtual bool DecideScrollableLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRect* aDirtyRect,
|
||||
bool aAllowCreateDisplayPort) = 0;
|
||||
|
||||
/**
|
||||
* Notification that this scroll frame is getting its image visibility updated.
|
||||
*/
|
||||
virtual void NotifyImageVisibilityUpdate() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче