зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1059014 (part 3) - Remove support for pausing and resuming painting. r=dbaron.
This reverts much of part 2 of bug 878935, except for the Android browser.js changes which have already been reverted elsewhere. --HG-- extra : rebase_source : efdcede145567d8a56409cebecdd49a9307ec71a
This commit is contained in:
Родитель
6cdc913990
Коммит
6f4a1e234b
|
@ -31,7 +31,7 @@ class nsDOMNavigationTiming;
|
|||
[ptr] native nsDOMNavigationTimingPtr(nsDOMNavigationTiming);
|
||||
[ref] native nsIContentViewerTArray(nsTArray<nsCOMPtr<nsIContentViewer> >);
|
||||
|
||||
[scriptable, builtinclass, uuid(26425c7d-0e85-419b-933b-8abfe3289882)]
|
||||
[scriptable, builtinclass, uuid(fbd04c99-e149-473f-8a68-44f53d82f98b)]
|
||||
interface nsIContentViewer : nsISupports
|
||||
{
|
||||
[noscript] void init(in nsIWidgetPtr aParentWidget,
|
||||
|
@ -244,18 +244,6 @@ interface nsIContentViewer : nsISupports
|
|||
*/
|
||||
[noscript] void appendSubtree(in nsIContentViewerTArray array);
|
||||
|
||||
/**
|
||||
* Instruct the refresh driver to discontinue painting until further
|
||||
* notice.
|
||||
*/
|
||||
void pausePainting();
|
||||
|
||||
/**
|
||||
* Instruct the refresh driver to resume painting after a previous call to
|
||||
* pausePainting().
|
||||
*/
|
||||
void resumePainting();
|
||||
|
||||
/*
|
||||
* Render the document as if being viewed on a device with the specified
|
||||
* media type. This will cause a reflow.
|
||||
|
|
|
@ -2832,17 +2832,6 @@ nsDocumentViewer::CallChildren(CallChildFunc aFunc, void* aClosure)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ChangeChildPaintingEnabled(nsIContentViewer* aChild, void* aClosure)
|
||||
{
|
||||
bool* enablePainting = (bool*) aClosure;
|
||||
if (*enablePainting) {
|
||||
aChild->ResumePainting();
|
||||
} else {
|
||||
aChild->PausePainting();
|
||||
}
|
||||
}
|
||||
|
||||
struct ZoomInfo
|
||||
{
|
||||
float mZoom;
|
||||
|
@ -3272,34 +3261,6 @@ NS_IMETHODIMP nsDocumentViewer::AppendSubtree(nsTArray<nsCOMPtr<nsIContentViewer
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::PausePainting()
|
||||
{
|
||||
bool enablePaint = false;
|
||||
CallChildren(ChangeChildPaintingEnabled, &enablePaint);
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->PausePainting();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::ResumePainting()
|
||||
{
|
||||
bool enablePaint = true;
|
||||
CallChildren(ChangeChildPaintingEnabled, &enablePaint);
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->ResumePainting();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::GetContentSize(int32_t* aWidth, int32_t* aHeight)
|
||||
{
|
||||
|
|
|
@ -140,10 +140,10 @@ typedef struct CapturingContentInfo {
|
|||
mozilla::StaticRefPtr<nsIContent> mContent;
|
||||
} CapturingContentInfo;
|
||||
|
||||
// b07c5323-3061-4ca9-95ed-84cccbffadac
|
||||
// 0ff43c2e-5688-464f-a23f-a3de223df684
|
||||
#define NS_IPRESSHELL_IID \
|
||||
{ 0xb07c5323, 0x3061, 0x4ca9, \
|
||||
{ 0x95, 0xed, 0x84, 0xcc, 0xcb, 0xff, 0xad, 0xac } }
|
||||
{ 0x0ff43c2e, 0x5688, 0x464f, \
|
||||
{ 0xa2, 0x3f, 0xa3, 0xde, 0x22, 0x3d, 0xf6, 0x84 } }
|
||||
|
||||
// debug VerifyReflow flags
|
||||
#define VERIFY_REFLOW_ON 0x01
|
||||
|
@ -936,20 +936,6 @@ public:
|
|||
*/
|
||||
bool IsPaintingSuppressed() const { return mPaintingSuppressed; }
|
||||
|
||||
/**
|
||||
* Pause painting by freezing the refresh driver of this and all parent
|
||||
* presentations. This may not have the desired effect if this pres shell
|
||||
* has its own refresh driver.
|
||||
*/
|
||||
virtual void PausePainting() = 0;
|
||||
|
||||
/**
|
||||
* Resume painting by thawing the refresh driver of this and all parent
|
||||
* presentations. This may not have the desired effect if this pres shell
|
||||
* has its own refresh driver.
|
||||
*/
|
||||
virtual void ResumePainting() = 0;
|
||||
|
||||
/**
|
||||
* Unsuppress painting.
|
||||
*/
|
||||
|
@ -1803,7 +1789,6 @@ protected:
|
|||
bool mFontSizeInflationForceEnabled;
|
||||
bool mFontSizeInflationDisabledInMasterProcess;
|
||||
bool mFontSizeInflationEnabled;
|
||||
bool mPaintingIsFrozen;
|
||||
|
||||
// Dirty bit indicating that mFontSizeInflationEnabled needs to be recomputed.
|
||||
bool mFontSizeInflationEnabledIsDirty;
|
||||
|
|
|
@ -802,7 +802,6 @@ PresShell::PresShell()
|
|||
addedPointerEventEnabled = true;
|
||||
}
|
||||
|
||||
mPaintingIsFrozen = false;
|
||||
mHasCSSBackgroundColor = true;
|
||||
mIsLastChromeOnlyEscapeKeyConsumed = false;
|
||||
mHasReceivedPaintMessage = false;
|
||||
|
@ -826,13 +825,6 @@ PresShell::~PresShell()
|
|||
mLastCallbackEventRequest == nullptr,
|
||||
"post-reflow queues not empty. This means we're leaking");
|
||||
|
||||
// Verify that if painting was frozen, but we're being removed from the tree,
|
||||
// that we now re-enable painting on our refresh driver, since it may need to
|
||||
// be re-used by another presentation.
|
||||
if (mPaintingIsFrozen) {
|
||||
mPresContext->RefreshDriver()->Thaw();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(mPresArenaAllocCount == 0,
|
||||
"Some pres arena objects were not freed");
|
||||
|
@ -10883,26 +10875,6 @@ nsIPresShell::FontSizeInflationEnabled()
|
|||
return mFontSizeInflationEnabled;
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::PausePainting()
|
||||
{
|
||||
if (GetPresContext()->RefreshDriver()->PresContext() != GetPresContext())
|
||||
return;
|
||||
|
||||
mPaintingIsFrozen = true;
|
||||
GetPresContext()->RefreshDriver()->Freeze();
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::ResumePainting()
|
||||
{
|
||||
if (GetPresContext()->RefreshDriver()->PresContext() != GetPresContext())
|
||||
return;
|
||||
|
||||
mPaintingIsFrozen = false;
|
||||
GetPresContext()->RefreshDriver()->Thaw();
|
||||
}
|
||||
|
||||
void
|
||||
nsIPresShell::SyncWindowProperties(nsView* aView)
|
||||
{
|
||||
|
|
|
@ -730,9 +730,6 @@ protected:
|
|||
virtual void ThemeChanged() override { mPresContext->ThemeChanged(); }
|
||||
virtual void BackingScaleFactorChanged() override { mPresContext->UIResolutionChanged(); }
|
||||
|
||||
virtual void PausePainting() override;
|
||||
virtual void ResumePainting() override;
|
||||
|
||||
void UpdateImageVisibility();
|
||||
void UpdateActivePointerState(mozilla::WidgetGUIEvent* aEvent);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче