зеркало из https://github.com/mozilla/gecko-dev.git
Bug 643678. When documents go in the bfcache remove them from any schedule plugin geometry updates. r=roc
This commit is contained in:
Родитель
e825660a54
Коммит
c5140ff72c
|
@ -2811,6 +2811,16 @@ nsRootPresContext::RootForgetUpdatePluginGeometryFrame(nsIFrame* aFrame)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsRootPresContext::RootForgetUpdatePluginGeometryFrameForPresContext(
|
||||
nsPresContext* aPresContext)
|
||||
{
|
||||
if (aPresContext->GetContainsUpdatePluginGeometryFrame()) {
|
||||
aPresContext->SetContainsUpdatePluginGeometryFrame(PR_FALSE);
|
||||
mUpdatePluginGeometryForFrame = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
NotifyDidPaintForSubtreeCallback(nsITimer *aTimer, void *aClosure)
|
||||
{
|
||||
|
|
|
@ -982,6 +982,11 @@ public:
|
|||
}
|
||||
inline void ForgetUpdatePluginGeometryFrame(nsIFrame* aFrame);
|
||||
|
||||
PRBool GetContainsUpdatePluginGeometryFrame()
|
||||
{
|
||||
return mContainsUpdatePluginGeometryFrame;
|
||||
}
|
||||
|
||||
void SetContainsUpdatePluginGeometryFrame(PRBool aValue)
|
||||
{
|
||||
mContainsUpdatePluginGeometryFrame = aValue;
|
||||
|
@ -1298,6 +1303,14 @@ public:
|
|||
*/
|
||||
void RootForgetUpdatePluginGeometryFrame(nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Call this when a document is going to no longer be valid for plugin updates
|
||||
* (say by going into the bfcache). If mContainsUpdatePluginGeometryFrame is
|
||||
* set in the prescontext then it will be cleared along with
|
||||
* mUpdatePluginGeometryForFrame.
|
||||
*/
|
||||
void RootForgetUpdatePluginGeometryFrameForPresContext(nsPresContext* aPresContext);
|
||||
|
||||
/**
|
||||
* Increment DOM-modification generation counter to indicate that
|
||||
* the DOM has changed in a way that might lead to style changes/
|
||||
|
|
|
@ -7467,6 +7467,14 @@ PresShell::Freeze()
|
|||
presContext->RefreshDriver()->Freeze();
|
||||
}
|
||||
|
||||
if (presContext) {
|
||||
nsRootPresContext* rootPresContext = presContext->GetRootPresContext();
|
||||
if (rootPresContext) {
|
||||
rootPresContext->
|
||||
RootForgetUpdatePluginGeometryFrameForPresContext(mPresContext);
|
||||
}
|
||||
}
|
||||
|
||||
mFrozen = PR_TRUE;
|
||||
if (mDocument) {
|
||||
UpdateImageLockingState();
|
||||
|
|
Загрузка…
Ссылка в новой задаче