зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1557687. Remove nsPrintData::mDocWasToBeDestroyed. r=bobowen
This shows that this variable has never been read going back all the way to the original Mercurial import in 2007: hg grep -f --diff mDocWasToBeDestroyed layout/printing/ns* Differential Revision: https://phabricator.services.mozilla.com/D34143 --HG-- extra : rebase_source : c14a51dab1825e26fb8031d291d2c69e78931c84 extra : amend_source : 73794b07d703987db8d2eb49dd97d74b1a9be325
This commit is contained in:
Родитель
e360889d62
Коммит
913d6b76ee
|
@ -33,7 +33,6 @@ nsPrintData::nsPrintData(ePrintDataType aType)
|
||||||
mOnStartSent(false),
|
mOnStartSent(false),
|
||||||
mIsAborted(false),
|
mIsAborted(false),
|
||||||
mPreparingForPrint(false),
|
mPreparingForPrint(false),
|
||||||
mDocWasToBeDestroyed(false),
|
|
||||||
mShrinkToFit(false),
|
mShrinkToFit(false),
|
||||||
mNumPrintablePages(0),
|
mNumPrintablePages(0),
|
||||||
mNumPagesPrinted(0),
|
mNumPagesPrinted(0),
|
||||||
|
|
|
@ -31,13 +31,6 @@ class PrintPreviewUserEventSuppressor;
|
||||||
// mPreparingForPrint - indicates that we have started Printing but
|
// mPreparingForPrint - indicates that we have started Printing but
|
||||||
// have not gone to the timer to start printing the pages. It gets turned
|
// have not gone to the timer to start printing the pages. It gets turned
|
||||||
// off right before we go to the timer.
|
// off right before we go to the timer.
|
||||||
//
|
|
||||||
// mDocWasToBeDestroyed - Gets set when "someone" tries to unload the document
|
|
||||||
// while we were prparing to Print. This typically happens if a user starts
|
|
||||||
// to print while a page is still loading. If they start printing and pause
|
|
||||||
// at the print dialog and then the page comes in, we then abort printing
|
|
||||||
// because the document is no longer stable.
|
|
||||||
//
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
class nsPrintData {
|
class nsPrintData {
|
||||||
typedef mozilla::PrintPreviewUserEventSuppressor
|
typedef mozilla::PrintPreviewUserEventSuppressor
|
||||||
|
@ -77,9 +70,8 @@ class nsPrintData {
|
||||||
bool mIsIFrameSelected;
|
bool mIsIFrameSelected;
|
||||||
bool mIsParentAFrameSet;
|
bool mIsParentAFrameSet;
|
||||||
bool mOnStartSent;
|
bool mOnStartSent;
|
||||||
bool mIsAborted; // tells us the document is being aborted
|
bool mIsAborted; // tells us the document is being aborted
|
||||||
bool mPreparingForPrint; // see comments above
|
bool mPreparingForPrint; // see comments above
|
||||||
bool mDocWasToBeDestroyed; // see comments above
|
|
||||||
bool mShrinkToFit;
|
bool mShrinkToFit;
|
||||||
int32_t mNumPrintablePages;
|
int32_t mNumPrintablePages;
|
||||||
int32_t mNumPagesPrinted;
|
int32_t mNumPagesPrinted;
|
||||||
|
|
|
@ -630,15 +630,6 @@ nsresult nsPrintJob::Initialize(nsIDocumentViewerPrint* aDocViewerPrint,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------
|
|
||||||
bool nsPrintJob::CheckBeforeDestroy() {
|
|
||||||
if (mPrt && mPrt->mPreparingForPrint) {
|
|
||||||
mPrt->mDocWasToBeDestroyed = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
nsresult nsPrintJob::Cancel() {
|
nsresult nsPrintJob::Cancel() {
|
||||||
if (mPrt && mPrt->mPrintSettings) {
|
if (mPrt && mPrt->mPrintSettings) {
|
||||||
|
|
|
@ -208,7 +208,8 @@ class nsPrintJob final : public nsIObserver,
|
||||||
nsAString& aTitle, nsAString& aURLStr,
|
nsAString& aTitle, nsAString& aURLStr,
|
||||||
eDocTitleDefault aDefType);
|
eDocTitleDefault aDefType);
|
||||||
|
|
||||||
bool CheckBeforeDestroy();
|
bool CheckBeforeDestroy() const { return mPrt && mPrt->mPreparingForPrint; }
|
||||||
|
|
||||||
nsresult Cancel();
|
nsresult Cancel();
|
||||||
|
|
||||||
mozilla::PresShell* GetPrintPreviewPresShell() {
|
mozilla::PresShell* GetPrintPreviewPresShell() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче