Backed out changeset 411a075b3624 (bug 987030) because it probably caused timeouts of browser_tabview_expander.js. CLOSED TREE

This commit is contained in:
Markus Stange 2014-08-08 18:05:40 +02:00
parent f0f4c49bf4
commit dba9e8b356
3 changed files with 13 additions and 17 deletions

View File

@ -3744,7 +3744,9 @@ public:
NS_IMETHODIMP Notify(nsITimer* aTimer) MOZ_FINAL
{
mShell->DelayedPaintTimerFired();
mShell->SetNextPaintCompressed();
mShell->AddInvalidateHiddenPresShellObserver(mShell->GetPresContext()->RefreshDriver());
mShell->ScheduleViewManagerFlush();
return NS_OK;
}
@ -3764,11 +3766,8 @@ PresShell::ScheduleViewManagerFlush(PaintType aType)
static const uint32_t kPaintDelayPeriod = 1000;
if (!mDelayedPaintTimer) {
mDelayedPaintTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
}
if (mDelayedPaintTimer && !mDelayedPaintTimerActive) {
nsRefPtr<PaintTimerCallBack> cb = new PaintTimerCallBack(this);
mDelayedPaintTimer->InitWithCallback(cb, kPaintDelayPeriod, nsITimer::TYPE_ONE_SHOT);
mDelayedPaintTimerActive = true;
}
return;
}
@ -3776,21 +3775,12 @@ PresShell::ScheduleViewManagerFlush(PaintType aType)
nsPresContext* presContext = GetPresContext();
if (presContext) {
presContext->RefreshDriver()->ScheduleViewManagerFlush();
AddInvalidateHiddenPresShellObserver(presContext->RefreshDriver());
}
if (mDocument) {
mDocument->SetNeedLayoutFlush();
}
}
void
PresShell::DelayedPaintTimerFired()
{
mDelayedPaintTimerActive = false;
mNextPaintCompressed = true;
ScheduleViewManagerFlush();
}
void
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange)

View File

@ -372,6 +372,8 @@ public:
virtual void RecordShadowStyleChange(mozilla::dom::ShadowRoot* aShadowRoot);
void SetNextPaintCompressed() { mNextPaintCompressed = true; }
protected:
virtual ~PresShell();
@ -718,9 +720,6 @@ protected:
virtual void PausePainting() MOZ_OVERRIDE;
virtual void ResumePainting() MOZ_OVERRIDE;
friend class PaintTimerCallBack;
void DelayedPaintTimerFired();
void UpdateImageVisibility();
void UpdateActivePointerState(mozilla::WidgetGUIEvent* aEvent);
@ -841,7 +840,6 @@ protected:
bool mImageVisibilityVisited : 1;
bool mNextPaintCompressed : 1;
bool mDelayedPaintTimerActive : 1;
static bool sDisableNonTestMouseEvents;
};

View File

@ -5020,9 +5020,17 @@ nsIFrame::SchedulePaint(PaintType aType)
nsIPresShell::PAINT_DELAYED_COMPRESS :
nsIPresShell::PAINT_DEFAULT);
if (aType == PAINT_DELAYED_COMPRESS) {
return;
}
if (aType == PAINT_DEFAULT) {
displayRoot->AddStateBits(NS_FRAME_UPDATE_LAYER_TREE);
}
nsIPresShell* shell = PresContext()->PresShell();
if (shell) {
shell->AddInvalidateHiddenPresShellObserver(pres->RefreshDriver());
}
}
Layer*