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.

The revert caused mass b2g Gij test bustages
This commit is contained in:
Nicholas Nethercote 2015-11-24 16:09:04 +05:30
Родитель 29cc7aba9f
Коммит 8a4d84a51a
5 изменённых файлов: 4 добавлений и 101 удалений

Просмотреть файл

@ -31,7 +31,7 @@ class nsDOMNavigationTiming;
[ptr] native nsDOMNavigationTimingPtr(nsDOMNavigationTiming);
[ref] native nsIContentViewerTArray(nsTArray<nsCOMPtr<nsIContentViewer> >);
[scriptable, builtinclass, uuid(2da17016-7851-4a45-a7a8-00b360e01595)]
[scriptable, builtinclass, uuid(91b6c1f3-fc5f-43a9-88f4-9286bd19387f)]
interface nsIContentViewer : nsISupports
{
[noscript] void init(in nsIWidgetPtr aParentWidget,
@ -229,18 +229,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.

Просмотреть файл

@ -2774,17 +2774,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;
@ -3214,34 +3203,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;
// e3042b8d-0cc0-4ee6-baca-fec1ba89ee97
// 327d78a0-0680-4709-b209-1cf9578720e6
#define NS_IPRESSHELL_IID \
{ 0xe3042b8d, 0x0cc0, 0x4ee6, \
{ 0xba, 0xca, 0xfe, 0xc1, 0xba, 0x89, 0xee, 0x97 } }
{ 0x327d78a0, 0x0680, 0x4709, \
{ 0xb2, 0x09, 0x1c, 0xf9, 0x57, 0x87, 0x20, 0xe6 } }
// 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.
*/
@ -1813,7 +1799,6 @@ protected:
bool mFontSizeInflationForceEnabled;
bool mFontSizeInflationDisabledInMasterProcess;
bool mFontSizeInflationEnabled;
bool mPaintingIsFrozen;
// Dirty bit indicating that mFontSizeInflationEnabled needs to be recomputed.
bool mFontSizeInflationEnabledIsDirty;

Просмотреть файл

@ -799,7 +799,6 @@ PresShell::PresShell()
addedPointerEventEnabled = true;
}
mPaintingIsFrozen = false;
mHasCSSBackgroundColor = true;
mIsLastChromeOnlyEscapeKeyConsumed = false;
mHasReceivedPaintMessage = false;
@ -823,13 +822,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");
@ -10851,26 +10843,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)
{

Просмотреть файл

@ -738,9 +738,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);