mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1002632 part 1: Make an image document's refresh driver receive ticks from the image's clients, & disable its internal timer. r=bz
This commit is contained in:
parent
662a3563fd
commit
1807829bf1
@ -218,6 +218,19 @@ SVGDocumentWrapper::SetCurrentTime(float aTime)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SVGDocumentWrapper::TickRefreshDriver()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
mViewer->GetPresShell(getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
nsPresContext* presContext = presShell->GetPresContext();
|
||||
if (presContext) {
|
||||
presContext->RefreshDriver()->DoTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** nsIStreamListener methods **/
|
||||
|
||||
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt,
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
void ResetAnimation();
|
||||
float GetCurrentTime();
|
||||
void SetCurrentTime(float aTime);
|
||||
void TickRefreshDriver();
|
||||
|
||||
/**
|
||||
* Force a layout flush of the underlying SVG document.
|
||||
|
@ -506,9 +506,10 @@ VectorImage::RequestRefresh(const TimeStamp& aTime)
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Implement for b666446.
|
||||
EvaluateAnimation();
|
||||
|
||||
mSVGDocumentWrapper->TickRefreshDriver();
|
||||
|
||||
if (mHasPendingInvalidation) {
|
||||
SendInvalidationNotifications();
|
||||
mHasPendingInvalidation = false;
|
||||
|
@ -862,6 +862,13 @@ nsRefreshDriver::EnsureTimerStarted(bool aAdjustingTimer)
|
||||
return;
|
||||
}
|
||||
|
||||
if (mPresContext->Document()->IsBeingUsedAsImage()) {
|
||||
// Image documents receive ticks from clients' refresh drivers.
|
||||
MOZ_ASSERT(!mActiveTimer,
|
||||
"image document refresh driver should never have its own timer");
|
||||
return;
|
||||
}
|
||||
|
||||
// We got here because we're either adjusting the time *or* we're
|
||||
// starting it for the first time. Add to the right timer,
|
||||
// prehaps removing it from a previously-set one.
|
||||
|
Loading…
Reference in New Issue
Block a user