зеркало из https://github.com/mozilla/gecko-dev.git
Bug 826817. Part 4: Remove will-send-did-paint and did-send-will-paint flags from nsIPresShell APIs. r=tnikkel
This commit is contained in:
Родитель
15c63857c3
Коммит
9d55e9ed4b
|
@ -120,10 +120,10 @@ typedef struct CapturingContentInfo {
|
|||
nsIContent* mContent;
|
||||
} CapturingContentInfo;
|
||||
|
||||
// a43e26cd-9573-44c7-8fe5-859549eff814
|
||||
// 0841d094-debf-4255-bc7c-c6ff638b2c83
|
||||
#define NS_IPRESSHELL_IID \
|
||||
{0xb0f585b5, 0x199b, 0x4cd7, \
|
||||
{0x9c, 0xee, 0xea, 0xfd, 0x40, 0xc4, 0x88, 0x6f}}
|
||||
{ 0x0841d094, 0xdebf, 0x4255, \
|
||||
{ 0xbc, 0x7c, 0xc6, 0xff, 0x63, 0x8b, 0x2c, 0x83 } }
|
||||
|
||||
// debug VerifyReflow flags
|
||||
#define VERIFY_REFLOW_ON 0x01
|
||||
|
@ -1236,7 +1236,6 @@ public:
|
|||
PAINT_LAYERS = 0x01,
|
||||
/* Composite layers to the window. */
|
||||
PAINT_COMPOSITE = 0x02,
|
||||
PAINT_WILL_SEND_DID_PAINT = 0x80
|
||||
};
|
||||
virtual void Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
||||
uint32_t aFlags) = 0;
|
||||
|
@ -1252,13 +1251,13 @@ public:
|
|||
* painted widget). This is issued at a time when it's safe to modify
|
||||
* widget geometry.
|
||||
*/
|
||||
virtual void WillPaint(bool aWillSendDidPaint) = 0;
|
||||
virtual void WillPaint() = 0;
|
||||
/**
|
||||
* Notify that we're going to call Paint with PAINT_COMPOSITE.
|
||||
* Fires on the presshell for the painted widget.
|
||||
* This is issued at a time when it's safe to modify widget geometry.
|
||||
*/
|
||||
virtual void WillPaintWindow(bool aWillSendDidPaint) = 0;
|
||||
virtual void WillPaintWindow() = 0;
|
||||
/**
|
||||
* Notify that we called Paint with PAINT_COMPOSITE.
|
||||
* Fires on the presshell for the painted widget.
|
||||
|
|
|
@ -5274,10 +5274,6 @@ public:
|
|||
~nsAutoNotifyDidPaint()
|
||||
{
|
||||
mShell->GetPresContext()->NotifyDidPaintForSubtree(mFlags);
|
||||
if (!(mFlags & nsIPresShell::PAINT_WILL_SEND_DID_PAINT) &&
|
||||
nsContentUtils::XPConnect()) {
|
||||
nsContentUtils::XPConnect()->NotifyDidPaint();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -7128,7 +7124,7 @@ PresShell::ShouldIgnoreInvalidation()
|
|||
}
|
||||
|
||||
void
|
||||
PresShell::WillPaint(bool aWillSendDidPaint)
|
||||
PresShell::WillPaint()
|
||||
{
|
||||
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
|
||||
if (!rootPresContext) {
|
||||
|
@ -7156,7 +7152,7 @@ PresShell::WillPaint(bool aWillSendDidPaint)
|
|||
}
|
||||
|
||||
void
|
||||
PresShell::WillPaintWindow(bool aWillSendDidPaint)
|
||||
PresShell::WillPaintWindow()
|
||||
{
|
||||
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
|
||||
if (rootPresContext != mPresContext) {
|
||||
|
|
|
@ -196,8 +196,8 @@ public:
|
|||
nsIDOMEvent* aEvent,
|
||||
nsEventStatus* aStatus);
|
||||
virtual bool ShouldIgnoreInvalidation();
|
||||
virtual void WillPaint(bool aWillSendDidPaint);
|
||||
virtual void WillPaintWindow(bool aWillSendDidPaint);
|
||||
virtual void WillPaint();
|
||||
virtual void WillPaintWindow();
|
||||
virtual void DidPaintWindow();
|
||||
virtual void ScheduleViewManagerFlush();
|
||||
virtual void DispatchSynthMouseMove(nsGUIEvent *aEvent, bool aFlushOnHoverChange);
|
||||
|
|
|
@ -331,8 +331,7 @@ void nsViewManager::Refresh(nsView *aView, const nsIntRegion& aRegion)
|
|||
printf("--COMPOSITE-- %p\n", mPresShell);
|
||||
#endif
|
||||
mPresShell->Paint(aView, damageRegion,
|
||||
nsIPresShell::PAINT_COMPOSITE |
|
||||
nsIPresShell::PAINT_WILL_SEND_DID_PAINT);
|
||||
nsIPresShell::PAINT_COMPOSITE);
|
||||
#ifdef DEBUG_INVALIDATIONS
|
||||
printf("--ENDCOMPOSITE--\n");
|
||||
#endif
|
||||
|
@ -397,8 +396,7 @@ void nsViewManager::ProcessPendingUpdatesForView(nsView* aView,
|
|||
aView->GetWidget()->WillPaint();
|
||||
SetPainting(true);
|
||||
mPresShell->Paint(aView, nsRegion(),
|
||||
nsIPresShell::PAINT_LAYERS |
|
||||
nsIPresShell::PAINT_WILL_SEND_DID_PAINT);
|
||||
nsIPresShell::PAINT_LAYERS);
|
||||
#ifdef DEBUG_INVALIDATIONS
|
||||
printf("---- PAINT END ----\n");
|
||||
#endif
|
||||
|
@ -631,7 +629,7 @@ void nsViewManager::WillPaintWindow(nsIWidget* aWidget)
|
|||
|
||||
nsCOMPtr<nsIPresShell> shell = mPresShell;
|
||||
if (shell) {
|
||||
shell->WillPaintWindow(true);
|
||||
shell->WillPaintWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1148,7 +1146,7 @@ nsViewManager::CallWillPaintOnObservers()
|
|||
if (vm->mRootView && vm->mRootView->IsEffectivelyVisible()) {
|
||||
nsCOMPtr<nsIPresShell> shell = vm->GetPresShell();
|
||||
if (shell) {
|
||||
shell->WillPaint(true);
|
||||
shell->WillPaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче