зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8147272ea7
Коммит
d5715ceb42
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче