Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 830278 - Part 2: Move mDisallowSelectionPrint check into IsThereA…

…RangeSelection to make sure code doesn't re-enable selection printing. r=heycam, a=akeybl
  • Loading branch information...
commit 0760eb67f58ea0166798adcb67075292f5ab7fca 1 parent f4e59e2
@rocallahan rocallahan authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 layout/printing/nsPrintEngine.cpp
View
5 layout/printing/nsPrintEngine.cpp
@@ -561,7 +561,7 @@ nsPrintEngine::DoCommonPrint(bool aIsPrintPreview,
}
// Now determine how to set up the Frame print UI
mPrt->mPrintSettings->SetPrintOptions(nsIPrintSettings::kEnableSelectionRB,
- !mDisallowSelectionPrint && (isSelection || mPrt->mIsIFrameSelected));
+ isSelection || mPrt->mIsIFrameSelected);
nsCOMPtr<nsIDeviceContextSpec> devspec
(do_CreateInstance("@mozilla.org/gfx/devicecontextspec;1", &rv));
@@ -1073,6 +1073,9 @@ nsPrintEngine::ShowPrintProgress(bool aIsForPrinting, bool& aDoNotify)
bool
nsPrintEngine::IsThereARangeSelection(nsIDOMWindow* aDOMWin)
{
+ if (mDisallowSelectionPrint)
+ return false;
+
nsCOMPtr<nsIPresShell> presShell;
if (aDOMWin) {
nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(aDOMWin));
Please sign in to comment.
Something went wrong with that request. Please try again.