From 3e52de68f401f6d71d73a9d8fc92d8e7bc5a05b7 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 7 Oct 2020 21:00:26 +0000 Subject: [PATCH] Bug 1669774 part 2: Rename some APIs and variables for accuracy (s/page/sheet/) in nsPrintJob, nsPagePrintTimer, and nsDocumentViewer. r=TYLin Differential Revision: https://phabricator.services.mozilla.com/D92791 --- layout/base/nsDocumentViewer.cpp | 67 ++++++++++--------- layout/printing/nsPagePrintTimer.cpp | 22 +++--- layout/printing/nsPagePrintTimer.h | 4 ++ layout/printing/nsPrintJob.cpp | 54 +++++++-------- layout/printing/nsPrintJob.h | 15 +++-- .../components/browser/nsIWebBrowserPrint.idl | 6 +- 6 files changed, 90 insertions(+), 78 deletions(-) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index f4ffa667956e..759f776d3f08 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -408,8 +408,7 @@ class nsDocumentViewer final : public nsIContentViewer, nsresult PrintPreviewScrollToPageForOldUI(int16_t aType, int32_t aPageNum); - std::tuple GetCurrentSheetFrameAndPageNumber() - const; + std::tuple GetCurrentSheetFrameAndNumber() const; protected: // Returns the current viewmanager. Might be null. @@ -3207,7 +3206,7 @@ nsresult nsDocumentViewer::PrintPreviewScrollToPageForOldUI(int16_t aType, } // in PP mPrtPreview->mPrintObject->mSeqFrame is null - auto [seqFrame, pageCount] = mPrintJob->GetSeqFrameAndCountPages(); + auto [seqFrame, sheetCount] = mPrintJob->GetSeqFrameAndCountSheets(); if (!seqFrame) { return NS_ERROR_FAILURE; } @@ -3222,7 +3221,7 @@ nsresult nsDocumentViewer::PrintPreviewScrollToPageForOldUI(int16_t aType, // If it is "End" then just do a "goto" to the last page if (aType == nsIWebBrowserPrint::PRINTPREVIEW_END) { aType = nsIWebBrowserPrint::PRINTPREVIEW_GOTO_PAGENUM; - aPageNum = pageCount; + aPageNum = sheetCount; } // Now, locate the current page we are on and @@ -3258,7 +3257,7 @@ nsresult nsDocumentViewer::PrintPreviewScrollToPageForOldUI(int16_t aType, return NS_OK; } } else { // If we get here we are doing "GoTo" - if (aPageNum < 0 || aPageNum > pageCount) { + if (aPageNum < 0 || aPageNum > sheetCount) { return NS_OK; } } @@ -3319,8 +3318,8 @@ nsDocumentViewer::PrintPreviewScrollToPage(int16_t aType, int32_t aPageNum) { mPrintJob->GetPrintPreviewPresShell()->GetRootScrollFrameAsScrollable(); if (!sf) return NS_OK; - auto [seqFrame, pageCount] = mPrintJob->GetSeqFrameAndCountPages(); - Unused << pageCount; + auto [seqFrame, sheetCount] = mPrintJob->GetSeqFrameAndCountSheets(); + Unused << sheetCount; if (!seqFrame) { return NS_ERROR_FAILURE; } @@ -3338,9 +3337,8 @@ nsDocumentViewer::PrintPreviewScrollToPage(int16_t aType, int32_t aPageNum) { break; case nsIWebBrowserPrint::PRINTPREVIEW_PREV_PAGE: case nsIWebBrowserPrint::PRINTPREVIEW_NEXT_PAGE: { - auto [currentFrame, currentPageNumber] = - GetCurrentSheetFrameAndPageNumber(); - Unused << currentPageNumber; + auto [currentFrame, currentSheetNumber] = GetCurrentSheetFrameAndNumber(); + Unused << currentSheetNumber; if (!currentFrame) { return NS_OK; } @@ -3359,7 +3357,7 @@ nsDocumentViewer::PrintPreviewScrollToPage(int16_t aType, int32_t aPageNum) { break; } case nsIWebBrowserPrint::PRINTPREVIEW_GOTO_PAGENUM: { - if (aPageNum < 0 || aPageNum > pageCount) { + if (aPageNum < 0 || aPageNum > sheetCount) { return NS_ERROR_INVALID_ARG; } @@ -3380,13 +3378,13 @@ nsDocumentViewer::PrintPreviewScrollToPage(int16_t aType, int32_t aPageNum) { } std::tuple -nsDocumentViewer::GetCurrentSheetFrameAndPageNumber() const { +nsDocumentViewer::GetCurrentSheetFrameAndNumber() const { MOZ_ASSERT(mPrintJob); MOZ_ASSERT(GetIsPrintPreview() && !mPrintJob->GetIsCreatingPrintPreview()); // in PP mPrtPreview->mPrintObject->mSeqFrame is null - auto [seqFrame, pageCount] = mPrintJob->GetSeqFrameAndCountPages(); - Unused << pageCount; + auto [seqFrame, sheetCount] = mPrintJob->GetSeqFrameAndCountSheets(); + Unused << sheetCount; if (!seqFrame) { return {nullptr, 0}; } @@ -3394,7 +3392,7 @@ nsDocumentViewer::GetCurrentSheetFrameAndPageNumber() const { nsIScrollableFrame* sf = mPrintJob->GetPrintPreviewPresShell()->GetRootScrollFrameAsScrollable(); if (!sf) { - // No scrollable contents, returns 1 even if there are multiple pages. + // No scrollable contents, returns 1 even if there are multiple sheets. return {seqFrame->PrincipalChildList().FirstChild(), 1}; } @@ -3402,17 +3400,17 @@ nsDocumentViewer::GetCurrentSheetFrameAndPageNumber() const { float halfwayPoint = currentScrollPosition.y + float(sf->GetScrollPortRect().height) / 2.0f; float lastDistanceFromHalfwayPoint = std::numeric_limits::max(); - int32_t pageNumber = 0; + int32_t sheetNumber = 0; const nsIFrame* currentSheet = nullptr; float previewScale = seqFrame->GetPrintPreviewScale(); for (const nsIFrame* sheetFrame : seqFrame->PrincipalChildList()) { nsRect sheetRect = sheetFrame->GetRect(); - pageNumber++; + sheetNumber++; currentSheet = sheetFrame; float bottomOfSheet = sheetRect.YMost() * previewScale; if (bottomOfSheet < halfwayPoint) { - // If the bottom of the page is not yet over the halfway point, iterate + // If the bottom of the sheet is not yet over the halfway point, iterate // the next frame to see if the next frame is over the halfway point and // compare the distance from the halfway point. lastDistanceFromHalfwayPoint = halfwayPoint - bottomOfSheet; @@ -3421,28 +3419,31 @@ nsDocumentViewer::GetCurrentSheetFrameAndPageNumber() const { float topOfSheet = sheetRect.Y() * previewScale; if (topOfSheet <= halfwayPoint) { - // If the top of the page is not yet over the halfway point or on the - // point, it's the current page. + // If the top of the sheet is not yet over the halfway point or on the + // point, it's the current sheet. break; } - // Now the page rect is completely over the halfway point, compare the + // Now the sheet rect is completely over the halfway point, compare the // distances from the halfway point. if ((topOfSheet - halfwayPoint) >= lastDistanceFromHalfwayPoint) { - // If the previous page distance is less than or equal to the current page - // distance, choose the previous one as the current. - pageNumber--; - MOZ_ASSERT(pageNumber > 0); + // If the previous sheet distance is less than or equal to the current + // sheet distance, choose the previous one as the current. + sheetNumber--; + MOZ_ASSERT(sheetNumber > 0); currentSheet = currentSheet->GetPrevInFlow(); MOZ_ASSERT(currentSheet); } break; } - MOZ_ASSERT(pageNumber <= pageCount); - return {currentSheet, pageNumber}; + MOZ_ASSERT(sheetNumber <= sheetCount); + return {currentSheet, sheetNumber}; } +// XXXdholbert As noted in nsIWebBrowserPrint.idl, this API (the IDL attr +// 'printPreviewCurrentPageNumber') is misnamed and needs s/Page/Sheet/. See +// bug 1669762. NS_IMETHODIMP nsDocumentViewer::GetPrintPreviewCurrentPageNumber(int32_t* aNumber) { NS_ENSURE_ARG_POINTER(aNumber); @@ -3451,13 +3452,13 @@ nsDocumentViewer::GetPrintPreviewCurrentPageNumber(int32_t* aNumber) { return NS_ERROR_FAILURE; } - auto [currentFrame, currentPageNumber] = GetCurrentSheetFrameAndPageNumber(); + auto [currentFrame, currentSheetNumber] = GetCurrentSheetFrameAndNumber(); Unused << currentFrame; - if (!currentPageNumber) { + if (!currentSheetNumber) { return NS_ERROR_FAILURE; } - *aNumber = currentPageNumber; + *aNumber = currentSheetNumber; return NS_OK; } @@ -3542,12 +3543,14 @@ nsDocumentViewer::GetRawNumPages(int32_t* aRawNumPages) { return *aRawNumPages > 0 ? NS_OK : NS_ERROR_FAILURE; } +// XXXdholbert As noted in nsIWebBrowserPrint.idl, this API (the IDL attr +// 'printPreviewNumPages') is misnamed and needs s/Page/Sheet/. +// See bug 1669762. NS_IMETHODIMP nsDocumentViewer::GetPrintPreviewNumPages(int32_t* aPrintPreviewNumPages) { NS_ENSURE_ARG_POINTER(aPrintPreviewNumPages); NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE); - - *aPrintPreviewNumPages = mPrintJob->GetPrintPreviewNumPages(); + *aPrintPreviewNumPages = mPrintJob->GetPrintPreviewNumSheets(); return *aPrintPreviewNumPages > 0 ? NS_OK : NS_ERROR_FAILURE; } diff --git a/layout/printing/nsPagePrintTimer.cpp b/layout/printing/nsPagePrintTimer.cpp index b1f27c74f962..397add43042d 100644 --- a/layout/printing/nsPagePrintTimer.cpp +++ b/layout/printing/nsPagePrintTimer.cpp @@ -64,25 +64,25 @@ NS_IMETHODIMP nsPagePrintTimer::Run() { bool initNewTimer = true; // Check to see if we are done - // inRange will be true if a page is actually printed + // inRange will be true if a sheet is actually printed bool inRange; bool donePrinting; // donePrinting will be true if it completed successfully or // if the printing was cancelled - donePrinting = !mPrintJob || mPrintJob->PrintPage(mPrintObj, inRange); + donePrinting = !mPrintJob || mPrintJob->PrintSheet(mPrintObj, inRange); if (donePrinting) { if (mWaitingForRemotePrint || // If we are not waiting for the remote printing, it is the time to - // end printing task by calling DonePrintingPages. - (!mPrintJob || mPrintJob->DonePrintingPages(mPrintObj, NS_OK))) { + // end printing task by calling DonePrintingSheets. + (!mPrintJob || mPrintJob->DonePrintingSheets(mPrintObj, NS_OK))) { initNewTimer = false; mDone = true; } } // Note that the Stop() destroys this after the print job finishes - // (The nsPrintJob stops holding a reference when DonePrintingPages + // (The nsPrintJob stops holding a reference when DonePrintingSheets // returns true.) Stop(); if (initNewTimer) { @@ -108,7 +108,7 @@ nsPagePrintTimer::Notify(nsITimer* timer) { } // There are four things that call Notify with different values for timer: - // 1) the delay between pages (timer == mTimer) + // 1) the delay between sheets (timer == mTimer) // 2) canvasPrintState done (timer == null) // 3) the watch dog timer (timer == mWatchDogTimer) // 4) the waiting for remote print "timer" (timer == mWaitingForRemotePrint) @@ -116,14 +116,14 @@ nsPagePrintTimer::Notify(nsITimer* timer) { // Reset the counter since a mozPrintCallback has finished. mWatchDogCount = 0; } else if (timer == mTimer) { - // Reset the watchdog timer before the start of every page. + // Reset the watchdog timer before the start of every sheet. mWatchDogCount = 0; mTimer = nullptr; } else if (timer == mWaitingForRemotePrint) { mWaitingForRemotePrint = nullptr; - // If we are still waiting for the page delay timer, don't let the - // notification from the remote print job trigger the next page. + // If we are still waiting for the sheet delay timer, don't let the + // notification from the remote print job trigger the next sheet. if (mTimer) { return NS_OK; } @@ -138,7 +138,7 @@ nsPagePrintTimer::Notify(nsITimer* timer) { bool donePrePrint = true; // Don't start to pre-print if we're waiting on the parent still. if (mPrintJob && !mWaitingForRemotePrint) { - donePrePrint = mPrintJob->PrePrintPage(); + donePrePrint = mPrintJob->PrePrintSheet(); } if (donePrePrint && !mWaitingForRemotePrint) { @@ -168,7 +168,7 @@ void nsPagePrintTimer::RemotePrintFinished() { // now clean up print or print the next webshell if (mDone && mPrintJob) { - mDone = mPrintJob->DonePrintingPages(mPrintObj, NS_OK); + mDone = mPrintJob->DonePrintingSheets(mPrintObj, NS_OK); } mWaitingForRemotePrint->SetTarget( diff --git a/layout/printing/nsPagePrintTimer.h b/layout/printing/nsPagePrintTimer.h index 7b633881997b..f761fc36e918 100644 --- a/layout/printing/nsPagePrintTimer.h +++ b/layout/printing/nsPagePrintTimer.h @@ -20,6 +20,10 @@ class nsPrintJob; //--------------------------------------------------- //-- Page Timer Class //--------------------------------------------------- +// Strictly speaking, this actually manages the timing of printing *sheets* +// (instances of "PrintedSheetFrame"), each of which may encompass multiple +// pages (nsPageFrames) of the document. The use of "Page" in the class name +// here is for historical / colloquial purposes. class nsPagePrintTimer final : public mozilla::Runnable, public nsITimerCallback { public: diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp index b66559fc2563..499a795b3ab0 100644 --- a/layout/printing/nsPrintJob.cpp +++ b/layout/printing/nsPrintJob.cpp @@ -221,7 +221,7 @@ static bool IsParentAFrameSet(nsIDocShell* aParent) { } static std::tuple -GetSeqFrameAndCountPagesInternal(const UniquePtr& aPO) { +GetSeqFrameAndCountSheetsInternal(const UniquePtr& aPO) { if (!aPO) { return {nullptr, 0}; } @@ -231,7 +231,7 @@ GetSeqFrameAndCountPagesInternal(const UniquePtr& aPO) { // Nightly/Aurora in case the other patch fixes this. if (!aPO->mPresShell) { MOZ_DIAGNOSTIC_ASSERT( - false, "GetSeqFrameAndCountPages needs a non-null pres shell"); + false, "GetSeqFrameAndCountSheets needs a non-null pres shell"); return {nullptr, 0}; } @@ -240,7 +240,7 @@ GetSeqFrameAndCountPagesInternal(const UniquePtr& aPO) { return {nullptr, 0}; } - // count the total number of pages + // count the total number of sheets return {seqFrame, seqFrame->PrincipalChildList().GetLength()}; } @@ -427,12 +427,12 @@ nsresult nsPrintJob::Cancel() { //----------------------------------------------------------------- std::tuple -nsPrintJob::GetSeqFrameAndCountPages() { +nsPrintJob::GetSeqFrameAndCountSheets() { MOZ_ASSERT(mPrtPreview); // Guarantee that mPrintPreview->mPrintObject won't be deleted during a call - // of GetSeqFrameAndCountPagesInternal(). + // of GetSeqFrameAndCountSheetsInternal(). RefPtr printDataForPrintPreview = mPrtPreview; - return GetSeqFrameAndCountPagesInternal( + return GetSeqFrameAndCountSheetsInternal( printDataForPrintPreview->mPrintObject); } //--------------------------------------------------------------------------------- @@ -871,23 +871,23 @@ int32_t nsPrintJob::GetRawNumPages() const { if (NS_WARN_IF(!printData)) { return 0; } - auto [seqFrame, numPages] = - GetSeqFrameAndCountPagesInternal(printData->mPrintObject); + auto [seqFrame, numSheets] = + GetSeqFrameAndCountSheetsInternal(printData->mPrintObject); - Unused << numPages; + Unused << numSheets; return seqFrame ? seqFrame->GetRawNumPages() : 0; } //---------------------------------------------------------------------------------- -int32_t nsPrintJob::GetPrintPreviewNumPages() { +int32_t nsPrintJob::GetPrintPreviewNumSheets() { RefPtr printData = mPrtPreview ? mPrtPreview : mPrt; if (NS_WARN_IF(!printData)) { return 0; } - auto [seqFrame, numPages] = - GetSeqFrameAndCountPagesInternal(printData->mPrintObject); + auto [seqFrame, numSheets] = + GetSeqFrameAndCountSheetsInternal(printData->mPrintObject); Unused << seqFrame; - return numPages; + return numSheets; } //---------------------------------------------------------------------------------- @@ -1032,7 +1032,7 @@ nsresult nsPrintJob::DocumentReadyForPrinting() { if (NS_FAILED(rv)) { // The print job was canceled or there was a problem // So remove all other documents from the print list - DonePrintingPages(nullptr, rv); + DonePrintingSheets(nullptr, rv); } return rv; } @@ -1412,7 +1412,7 @@ nsresult nsPrintJob::SetupToPrintContent() { } // This will print the docshell document - // when it completes asynchronously in the DonePrintingPages method + // when it completes asynchronously in the DonePrintingSheets method // it will check to see if there are more docshells to be printed and // then PrintDocContent will be called again. @@ -2169,14 +2169,14 @@ void nsPrintJob::EllipseLongString(nsAString& aStr, const uint32_t aLen, } //------------------------------------------------------- -bool nsPrintJob::PrePrintPage() { +bool nsPrintJob::PrePrintSheet() { NS_ASSERTION(mPageSeqFrame.IsAlive(), "mPageSeqFrame is not alive!"); NS_ASSERTION(mPrt, "mPrt is null!"); // Although these should NEVER be nullptr // This is added insurance, to make sure we don't crash in optimized builds if (!mPrt || !mPageSeqFrame.IsAlive()) { - return true; // means we are done preparing the page. + return true; // means we are done preparing the sheet. } // Guarantee that mPrt won't be deleted during a call of @@ -2188,13 +2188,13 @@ bool nsPrintJob::PrePrintPage() { printData->mPrintSettings->GetIsCancelled(&isCancelled); if (isCancelled) return true; - // Ask mPageSeqFrame if the page is ready to be printed. - // If the page doesn't get printed at all, the |done| will be |true|. + // Ask mPageSeqFrame if the sheet is ready to be printed. + // If the sheet doesn't get printed at all, the |done| will be |true|. bool done = false; nsPageSequenceFrame* pageSeqFrame = do_QueryFrame(mPageSeqFrame.GetFrame()); nsresult rv = pageSeqFrame->PrePrintNextSheet(mPagePrintTimer, &done); if (NS_FAILED(rv)) { - // ??? ::PrintPage doesn't set |printData->mIsAborted = true| if + // ??? ::PrintSheet doesn't set |printData->mIsAborted = true| if // rv != NS_ERROR_ABORT, but I don't really understand why this should be // the right thing to do? Shouldn't |printData->mIsAborted| set to true // all the time if something went wrong? @@ -2207,7 +2207,7 @@ bool nsPrintJob::PrePrintPage() { return done; } -bool nsPrintJob::PrintPage(nsPrintObject* aPO, bool& aInRange) { +bool nsPrintJob::PrintSheet(nsPrintObject* aPO, bool& aInRange) { NS_ASSERTION(aPO, "aPO is null!"); NS_ASSERTION(mPageSeqFrame.IsAlive(), "mPageSeqFrame is not alive!"); NS_ASSERTION(mPrt, "mPrt is null!"); @@ -2232,7 +2232,7 @@ bool nsPrintJob::PrintPage(nsPrintObject* aPO, bool& aInRange) { RefPtr printData = mPrt; PR_PL(("-----------------------------------\n")); - PR_PL(("------ In DV::PrintPage PO: %p (%s)\n", aPO, + PR_PL(("------ In DV::PrintSheet PO: %p (%s)\n", aPO, gFrameTypesStr[aPO->mFrameType])); // Check setting to see if someone request it be cancelled @@ -2263,7 +2263,7 @@ bool nsPrintJob::PrintPage(nsPrintObject* aPO, bool& aInRange) { mPagePrintTimer->WaitForRemotePrint(); } - // Print the Page + // Print the sheet // if a print job was cancelled externally, an EndPage or BeginPage may // fail and the failure is passed back here. // Returning true means we are done printing. @@ -2365,9 +2365,9 @@ bool nsPrintJob::IsWindowsInOurSubTree(nsPIDOMWindowOuter* window) const { } //------------------------------------------------------- -bool nsPrintJob::DonePrintingPages(nsPrintObject* aPO, nsresult aResult) { +bool nsPrintJob::DonePrintingSheets(nsPrintObject* aPO, nsresult aResult) { // NS_ASSERTION(aPO, "Pointer is null!"); - PR_PL(("****** In DV::DonePrintingPages PO: %p (%s)\n", aPO, + PR_PL(("****** In DV::DonePrintingSheets PO: %p (%s)\n", aPO, aPO ? gFrameTypesStr[aPO->mFrameType] : "")); // If there is a pageSeqFrame, make sure there are no more printCanvas active @@ -2388,7 +2388,7 @@ bool nsPrintJob::DonePrintingPages(nsPrintObject* aPO, nsresult aResult) { bool didPrint = PrintDocContent(printData->mPrintObject, rv); if (NS_SUCCEEDED(rv) && didPrint) { PR_PL( - ("****** In DV::DonePrintingPages PO: %p (%s) didPrint:%s (Not Done " + ("****** In DV::DonePrintingSheets PO: %p (%s) didPrint:%s (Not Done " "Printing)\n", aPO, gFrameTypesStr[aPO->mFrameType], PRT_YESNO(didPrint))); return false; @@ -2536,7 +2536,7 @@ nsresult nsPrintJob::FinishPrintPreview() { if (mPrintPreviewCallback) { mPrintPreviewCallback(PrintPreviewResultInfo( - GetPrintPreviewNumPages(), GetRawNumPages(), + GetPrintPreviewNumSheets(), GetRawNumPages(), !mDisallowSelectionPrint && printData->mSelectionRoot)); mPrintPreviewCallback = nullptr; } diff --git a/layout/printing/nsPrintJob.h b/layout/printing/nsPrintJob.h index f225009b2f6b..0819f77d6d17 100644 --- a/layout/printing/nsPrintJob.h +++ b/layout/printing/nsPrintJob.h @@ -127,7 +127,12 @@ class nsPrintJob final : public nsIObserver, bool HasEverPrinted() const { return mHasEverPrinted; } /// If the returned value is not greater than zero, an error occurred. int32_t GetRawNumPages() const; - int32_t GetPrintPreviewNumPages(); + + // Returns the total number of PrintedSheetFrames (i.e. faces of a sheet of + // paper) for this print job. (This may be less than the raw number of pages, + // due to pages having been skipped in a page range or combined into a single + // sheet via pages-per-sheet.) + int32_t GetPrintPreviewNumSheets(); already_AddRefed GetCurrentPrintSettings(); // The setters here also update the DocViewer @@ -136,11 +141,11 @@ class nsPrintJob final : public nsIObserver, void SetIsPrintPreview(bool aIsPrintPreview); bool GetIsCreatingPrintPreview() const { return mIsCreatingPrintPreview; } - std::tuple GetSeqFrameAndCountPages(); + std::tuple GetSeqFrameAndCountSheets(); - bool PrePrintPage(); - bool PrintPage(nsPrintObject* aPOect, bool& aInRange); - bool DonePrintingPages(nsPrintObject* aPO, nsresult aResult); + bool PrePrintSheet(); + bool PrintSheet(nsPrintObject* aPOect, bool& aInRange); + bool DonePrintingSheets(nsPrintObject* aPO, nsresult aResult); nsresult CleanupOnFailure(nsresult aResult, bool aIsPrinting); // If FinishPrintPreview() fails, caller may need to reset the state of the diff --git a/toolkit/components/browser/nsIWebBrowserPrint.idl b/toolkit/components/browser/nsIWebBrowserPrint.idl index 0bbbf77c44fd..eef0d8b57ef7 100644 --- a/toolkit/components/browser/nsIWebBrowserPrint.idl +++ b/toolkit/components/browser/nsIWebBrowserPrint.idl @@ -34,7 +34,7 @@ interface nsIWebBrowserPrint : nsISupports * * XXXdholbert Consider renaming these? Strictly speaking, these deal with * *sheets* (which are roughly the same as pages in the default configuration - * of one page per sheet). + * of one page per sheet). Fix in bug 1669762. */ const short PRINTPREVIEW_GOTO_PAGENUM = 0; const short PRINTPREVIEW_PREV_PAGE = 1; @@ -77,7 +77,7 @@ interface nsIWebBrowserPrint : nsISupports * * XXXdholbert Consider renaming this? Strictly speaking, this is the number * of *sheets* (which is the same as the number of pages in the default - * configuration of one page per sheet). + * configuration of one page per sheet). Fix in bug 1669762. */ readonly attribute long printPreviewNumPages; @@ -86,7 +86,7 @@ interface nsIWebBrowserPrint : nsISupports * * XXXdholbert Consider renaming this? (similar to printPreviewNumPages above) * Strictly speaking, this is the number of the *sheet* which is currently in - * the print preview viewport. + * the print preview viewport. Fix in bug 1669762. */ readonly attribute long printPreviewCurrentPageNumber;