diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index ef898a29918b..b81ca7e9fd8f 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -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 //---------------------------------------------------------------------------------- diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp index dd372ed43ad4..60a2c07639d4 100644 --- a/layout/printing/nsPrintJob.cpp +++ b/layout/printing/nsPrintJob.cpp @@ -997,29 +997,6 @@ nsresult nsPrintJob::PrintPreview( return CommonPrint(true, aPrintSettings, aWebProgressListener, aSourceDoc); } -//---------------------------------------------------------------------------------- -bool nsPrintJob::IsIFrameSelected() { - // Get the docshell for this documentviewer - nsCOMPtr docShell(do_QueryReferent(mDocShell)); - // Get the currently focused window - nsCOMPtr 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 currentFocusWin = FindFocusedDOMWindow(); - return IsThereARangeSelection(currentFocusWin); -} - //---------------------------------------------------------------------------------- int32_t nsPrintJob::GetPrintPreviewNumPages() { // When calling this function, the FinishPrintPreview() function might not diff --git a/layout/printing/nsPrintJob.h b/layout/printing/nsPrintJob.h index d16a9bc79e65..1fcca926bd4c 100644 --- a/layout/printing/nsPrintJob.h +++ b/layout/printing/nsPrintJob.h @@ -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 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 diff --git a/toolkit/components/browser/nsIWebBrowserPrint.idl b/toolkit/components/browser/nsIWebBrowserPrint.idl index 20523a4f98a5..9689a4cb534f 100644 --- a/toolkit/components/browser/nsIWebBrowserPrint.idl +++ b/toolkit/components/browser/nsIWebBrowserPrint.idl @@ -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 */ diff --git a/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh b/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh index 8e5f725667df..e67e43cd6efc 100644 --- a/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh +++ b/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh @@ -72,8 +72,6 @@ struct PrintData { nsString deviceName; double printableWidthInInches; double printableHeightInInches; - bool isIFrameSelected; - bool isRangeSelection; uint8_t[] devModeData; /** diff --git a/widget/nsPrintSettingsService.cpp b/widget/nsPrintSettingsService.cpp index 921b94bd7d36..518669864868 100644 --- a/widget/nsPrintSettingsService.cpp +++ b/widget/nsPrintSettingsService.cpp @@ -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;