mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out cset 447498cdecee for landing the wrong patch (it was obsoleted by a new one).
MozReview-Commit-ID: HOLKux4OtCQ
This commit is contained in:
parent
f3b216a389
commit
d8c0239ac8
@ -4387,7 +4387,7 @@ ScrollFrameHelper::ScrollEvent::ScrollEvent(ScrollFrameHelper* aHelper)
|
|||||||
: mHelper(aHelper)
|
: mHelper(aHelper)
|
||||||
{
|
{
|
||||||
mDriver = mHelper->mOuter->PresContext()->RefreshDriver();
|
mDriver = mHelper->mOuter->PresContext()->RefreshDriver();
|
||||||
mDriver->AddRefreshObserver(this, Flush_Layout);
|
mDriver->AddRefreshObserver(this, Flush_Style);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollFrameHelper::ScrollEvent::~ScrollEvent()
|
ScrollFrameHelper::ScrollEvent::~ScrollEvent()
|
||||||
@ -4401,7 +4401,7 @@ ScrollFrameHelper::ScrollEvent::~ScrollEvent()
|
|||||||
void
|
void
|
||||||
ScrollFrameHelper::ScrollEvent::WillRefresh(mozilla::TimeStamp aTime)
|
ScrollFrameHelper::ScrollEvent::WillRefresh(mozilla::TimeStamp aTime)
|
||||||
{
|
{
|
||||||
mDriver->RemoveRefreshObserver(this, Flush_Layout);
|
mDriver->RemoveRefreshObserver(this, Flush_Style);
|
||||||
mDriver = nullptr;
|
mDriver = nullptr;
|
||||||
mHelper->FireScrollEvent();
|
mHelper->FireScrollEvent();
|
||||||
}
|
}
|
||||||
|
@ -101,29 +101,6 @@ public:
|
|||||||
|
|
||||||
bool IsSmoothScrollingEnabled();
|
bool IsSmoothScrollingEnabled();
|
||||||
|
|
||||||
/**
|
|
||||||
* This class handles the dispatching of scroll events to content.
|
|
||||||
*
|
|
||||||
* nsRefreshDriver maintains three lists of refresh observers, one for each
|
|
||||||
* flush type: Flush_Style, Flush_Layout, and Flush_Display.
|
|
||||||
*
|
|
||||||
* During a tick, it runs through each list of observers, in order, and runs
|
|
||||||
* them. To iterate over each list, it uses an EndLimitedIterator, which is
|
|
||||||
* designed to iterate only over elements present when the iterator was
|
|
||||||
* created, not elements added afterwards. This means that, for a given flush
|
|
||||||
* type, a refresh observer added during the execution of another refresh
|
|
||||||
* observer of that flush type, will not run until the next tick.
|
|
||||||
*
|
|
||||||
* During main-thread animation-driven scrolling, ScrollEvents are *posted*
|
|
||||||
* by AsyncScroll::WillRefresh(). AsyncScroll registers itself as a Flush_Style
|
|
||||||
* refresh observer.
|
|
||||||
*
|
|
||||||
* Posting a scroll event, as of bug 1250550, registers a Flush_Layout
|
|
||||||
* refresh observer, which *fires* the event when run. This allows the event
|
|
||||||
* to be fired to content in the same refresh driver tick as it is posted.
|
|
||||||
* This is an important invariant to maintain to reduce scroll event latency
|
|
||||||
* for main-thread scrolling.
|
|
||||||
*/
|
|
||||||
class ScrollEvent : public nsARefreshObserver {
|
class ScrollEvent : public nsARefreshObserver {
|
||||||
public:
|
public:
|
||||||
NS_INLINE_DECL_REFCOUNTING(ScrollEvent, override)
|
NS_INLINE_DECL_REFCOUNTING(ScrollEvent, override)
|
||||||
|
Loading…
Reference in New Issue
Block a user