зеркало из https://github.com/mozilla/gecko-dev.git
Bug 596491. Part 4: Rename ForcePluginGeometryUpdate to SynchronousPluginGeometryUpdate, and make it do nothing if no plugin geometry update is required. r=mats,a=blocking
This commit is contained in:
Родитель
891d0b33dd
Коммит
7d301e82fa
|
@ -2651,8 +2651,13 @@ nsRootPresContext::UpdatePluginGeometry()
|
|||
}
|
||||
|
||||
void
|
||||
nsRootPresContext::ForcePluginGeometryUpdate()
|
||||
nsRootPresContext::SynchronousPluginGeometryUpdate()
|
||||
{
|
||||
if (!mNeedsToUpdatePluginGeometry) {
|
||||
// Nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
// Force synchronous paint
|
||||
nsIPresShell* shell = GetPresShell();
|
||||
if (!shell)
|
||||
|
@ -2684,8 +2689,10 @@ nsRootPresContext::RequestUpdatePluginGeometry(nsIFrame* aFrame)
|
|||
mNeedsToUpdatePluginGeometry = PR_TRUE;
|
||||
|
||||
// Dispatch a Gecko event to ensure plugin geometry gets updated
|
||||
// XXX this really should be done through the refresh driver, once
|
||||
// all painting happens in the refresh driver
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
NS_NewRunnableMethod(this, &nsRootPresContext::ForcePluginGeometryUpdate);
|
||||
NS_NewRunnableMethod(this, &nsRootPresContext::SynchronousPluginGeometryUpdate);
|
||||
NS_DispatchToMainThread(event);
|
||||
|
||||
mUpdatePluginGeometryForFrame = aFrame;
|
||||
|
|
|
@ -1248,7 +1248,7 @@ public:
|
|||
* during paint is best for keeping plugins in sync with content.
|
||||
* But we also force geometry updates in case painting doesn't work.
|
||||
*/
|
||||
void ForcePluginGeometryUpdate();
|
||||
void SynchronousPluginGeometryUpdate();
|
||||
|
||||
/**
|
||||
* Call this after reflow and scrolling to ensure that the geometry
|
||||
|
|
Загрузка…
Ссылка в новой задаче