Bug 1653334 part 1: Remove unused isRangeSelection and isIFrameSelected. r=jwatt

These unused members are removed from nsIWebBrowserPrint and PPrintingTypes
along with their supporting functions.

Differential Revision: https://phabricator.services.mozilla.com/D85007
This commit is contained in:
Bob Owen 2020-08-03 08:53:44 +00:00
Родитель 8147272ea7
Коммит d5715ceb42
6 изменённых файлов: 0 добавлений и 58 удалений

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

@ -3432,24 +3432,6 @@ nsDocumentViewer::GetPrintPreviewNumPages(int32_t* aPrintPreviewNumPages) {
return *aPrintPreviewNumPages > 0 ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsDocumentViewer::GetIsIFrameSelected(bool* aIsIFrameSelected) {
*aIsIFrameSelected = false;
NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);
*aIsIFrameSelected = mPrintJob->IsIFrameSelected();
return NS_OK;
}
NS_IMETHODIMP
nsDocumentViewer::GetIsRangeSelection(bool* aIsRangeSelection) {
*aIsRangeSelection = false;
NS_ENSURE_TRUE(mPrintJob, NS_ERROR_FAILURE);
*aIsRangeSelection = mPrintJob->IsRangeSelection();
return NS_OK;
}
//----------------------------------------------------------------------------------
// Printing/Print Preview Helpers
//----------------------------------------------------------------------------------

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

@ -997,29 +997,6 @@ nsresult nsPrintJob::PrintPreview(
return CommonPrint(true, aPrintSettings, aWebProgressListener, aSourceDoc);
}
//----------------------------------------------------------------------------------
bool nsPrintJob::IsIFrameSelected() {
// Get the docshell for this documentviewer
nsCOMPtr<nsIDocShell> docShell(do_QueryReferent(mDocShell));
// Get the currently focused window
nsCOMPtr<nsPIDOMWindowOuter> currentFocusWin = FindFocusedDOMWindow();
if (currentFocusWin && docShell) {
// Get whether the doc contains a frameset
// Also, check to see if the currently focus docshell
// is a child of this docshell
bool isParentFrameSet;
return IsThereAnIFrameSelected(docShell, currentFocusWin, isParentFrameSet);
}
return false;
}
//----------------------------------------------------------------------------------
bool nsPrintJob::IsRangeSelection() {
// Get the currently focused window
nsCOMPtr<nsPIDOMWindowOuter> currentFocusWin = FindFocusedDOMWindow();
return IsThereARangeSelection(currentFocusWin);
}
//----------------------------------------------------------------------------------
int32_t nsPrintJob::GetPrintPreviewNumPages() {
// When calling this function, the FinishPrintPreview() function might not

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

@ -119,8 +119,6 @@ class nsPrintJob final : public nsIObserver,
bool IsDoingPrint() const { return mIsDoingPrinting; }
bool IsDoingPrintPreview() const { return mIsDoingPrintPreview; }
bool HasEverPrinted() const { return mHasEverPrinted; }
bool IsIFrameSelected();
bool IsRangeSelection();
/// If the returned value is not greater than zero, an error occurred.
int32_t GetPrintPreviewNumPages();
already_AddRefed<nsIPrintSettings> GetCurrentPrintSettings();
@ -299,7 +297,6 @@ class nsPrintJob final : public nsIObserver,
bool mIsDestroying = false;
bool mDisallowSelectionPrint = false;
bool mIsForModalWindow = false;
bool mHasMozPrintCallback = false;
};
#endif // nsPrintJob_h

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

@ -45,16 +45,6 @@ interface nsIWebBrowserPrint : nsISupports
*/
readonly attribute boolean doingPrintPreview;
/**
* This returns whether there is an IFrame selected
*/
readonly attribute boolean isIFrameSelected;
/**
* This returns whether there is a "range" selection
*/
readonly attribute boolean isRangeSelection;
/**
* This returns the total number of pages for the Print Preview
*/

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

@ -72,8 +72,6 @@ struct PrintData {
nsString deviceName;
double printableWidthInInches;
double printableHeightInInches;
bool isIFrameSelected;
bool isRangeSelection;
uint8_t[] devModeData;
/**

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

@ -166,8 +166,6 @@ nsPrintSettingsService::SerializeToPrintData(nsIPrintSettings* aSettings,
// data->deviceName() default-initializes
data->printableWidthInInches() = 0;
data->printableHeightInInches() = 0;
data->isIFrameSelected() = false;
data->isRangeSelection() = false;
// data->GTKPrintSettings() default-initializes
// data->printJobName() default-initializes
data->printAllPages() = true;