--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1224,17 +1224,17 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalW
if (gRefCnt == 1) {
Preferences::AddIntVarCache(&gMinTimeoutValue,
"dom.min_timeout_value",
DEFAULT_MIN_TIMEOUT_VALUE);
Preferences::AddIntVarCache(&gMinBackgroundTimeoutValue,
"dom.min_background_timeout_value",
DEFAULT_MIN_BACKGROUND_TIMEOUT_VALUE);
- Preferences::AddBoolVarCache(&sIdleObserversAPIFuzzTimeDisabled,
+ Preferences::AddBoolVarCache(&sIdleObserversAPIFuzzTimeDisabled,
"dom.idle-observers-api.fuzz_time.disabled",
false);
}
if (gDumpFile == nullptr) {
const nsAdoptingCString& fname =
Preferences::GetCString("browser.dom.window.dump.file");
if (!fname.IsEmpty()) {
@@ -2067,17 +2067,17 @@ nsGlobalWindow::WouldReuseInnerWindow(ns
if (!mDoc || !aNewDocument) {
return false;
}
if (!mDoc->IsInitialDocument()) {
return false;
}
-
+
NS_ASSERTION(NS_IsAboutBlank(mDoc->GetDocumentURI()),
"How'd this happen?");
// Great, we're the original document, check for one of the other
// conditions.
if (mDoc == aNewDocument) {
return true;
@@ -4357,17 +4357,17 @@ nsGlobalWindow::GetControllersOuter(Erro
// Add in the default controller
nsCOMPtr<nsIController> controller = do_CreateInstance(
NS_WINDOWCONTROLLER_CONTRACTID, &rv);
if (NS_FAILED(rv)) {
aError.Throw(rv);
return nullptr;
}
-
+
mControllers->InsertControllerAt(0, controller);
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller);
if (!controllerContext) {
aError.Throw(NS_ERROR_FAILURE);
return nullptr;
}
controllerContext->SetCommandContext(static_cast<nsIDOMWindow*>(this));
@@ -4968,17 +4968,17 @@ nsGlobalWindow::SetOuterSize(int32_t aLe
}
int32_t lengthDevPixels = CSSToDevIntPixels(aLengthCSSPixels);
if (aIsWidth) {
width = lengthDevPixels;
} else {
height = lengthDevPixels;
}
- aError = treeOwnerAsWin->SetSize(width, height, true);
+ aError = treeOwnerAsWin->SetSize(width, height, true);
}
void
nsGlobalWindow::SetOuterWidthOuter(int32_t aOuterWidth, ErrorResult& aError, bool aCallerIsChrome)
{
MOZ_RELEASE_ASSERT(IsOuterWindow());
SetOuterSize(aOuterWidth, true, aError, aCallerIsChrome);
@@ -6413,18 +6413,18 @@ nsGlobalWindow::AlertOrConfirm(bool aAle
// Before bringing up the window, unsuppress painting and flush
// pending reflows.
EnsureReflowFlushAndPaint();
nsAutoString title;
MakeScriptDialogTitle(title);
- // Remove non-terminating null characters from the
- // string. See bug #310037.
+ // Remove non-terminating null characters from the
+ // string. See bug #310037.
nsAutoString final;
nsContentUtils::StripNullChars(aMessage, final);
nsresult rv;
nsCOMPtr<nsIPromptFactory> promptFac =
do_GetService("@mozilla.org/prompter;1", &rv);
if (NS_FAILED(rv)) {
aError.Throw(rv);
@@ -6530,19 +6530,19 @@ nsGlobalWindow::PromptOuter(const nsAStr
nsAutoPopupStatePusher popupStatePusher(openAbused, true);
// Before bringing up the window, unsuppress painting and flush
// pending reflows.
EnsureReflowFlushAndPaint();
nsAutoString title;
MakeScriptDialogTitle(title);
-
- // Remove non-terminating null characters from the
- // string. See bug #310037.
+
+ // Remove non-terminating null characters from the
+ // string. See bug #310037.
nsAutoString fixedMessage, fixedInitial;
nsContentUtils::StripNullChars(aMessage, fixedMessage);
nsContentUtils::StripNullChars(aInitial, fixedInitial);
nsresult rv;
nsCOMPtr<nsIPromptFactory> promptFac =
do_GetService("@mozilla.org/prompter;1", &rv);
if (NS_FAILED(rv)) {
@@ -6899,21 +6899,21 @@ nsGlobalWindow::PrintOuter(ErrorResult&
if (ShouldPromptToBlockDialogs() && !ConfirmDialogIfNeeded()) {
aError.Throw(NS_ERROR_NOT_AVAILABLE);
return;
}
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint;
if (NS_SUCCEEDED(GetInterface(NS_GET_IID(nsIWebBrowserPrint),
getter_AddRefs(webBrowserPrint)))) {
- nsAutoSyncOperation sync(GetCurrentInnerWindowInternal() ?
+ nsAutoSyncOperation sync(GetCurrentInnerWindowInternal() ?
GetCurrentInnerWindowInternal()->mDoc :
nullptr);
- nsCOMPtr<nsIPrintSettingsService> printSettingsService =
+ nsCOMPtr<nsIPrintSettingsService> printSettingsService =
do_GetService("@mozilla.org/gfx/printsettings-service;1");
nsCOMPtr<nsIPrintSettings> printSettings;
if (printSettingsService) {
bool printSettingsAreGlobal =
Preferences::GetBool("print.use_global_printsettings", false);
if (printSettingsAreGlobal) {
@@ -6921,18 +6921,18 @@ nsGlobalWindow::PrintOuter(ErrorResult&
nsXPIDLString printerName;
printSettings->GetPrinterName(getter_Copies(printerName));
if (printerName.IsEmpty()) {
printSettingsService->GetDefaultPrinterName(getter_Copies(printerName));
printSettings->SetPrinterName(printerName);
}
printSettingsService->InitPrintSettingsFromPrinter(printerName, printSettings);
- printSettingsService->InitPrintSettingsFromPrefs(printSettings,
- true,
+ printSettingsService->InitPrintSettingsFromPrefs(printSettings,
+ true,
nsIPrintSettings::kInitSaveAll);
} else {
printSettingsService->GetNewPrintSettings(getter_AddRefs(printSettings));
}
EnterModalState();
webBrowserPrint->Print(printSettings, nullptr);
LeaveModalState();
@@ -7027,17 +7027,17 @@ nsGlobalWindow::MoveByOuter(int32_t aXDi
return;
}
// mild abuse of a "size" object so we don't need more helper functions
nsIntSize cssPos(DevToCSSIntPixels(nsIntSize(x, y)));
cssPos.width += aXDif;
cssPos.height += aYDif;
-
+
CheckSecurityLeftAndTop(&cssPos.width, &cssPos.height, aCallerIsChrome);
nsIntSize newDevPos(CSSToDevIntPixels(cssPos));
aError = treeOwnerAsWin->SetPosition(newDevPos.width, newDevPos.height);
}
void
@@ -7084,17 +7084,17 @@ nsGlobalWindow::ResizeToOuter(int32_t aW
return;
}
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin = GetTreeOwnerWindow();
if (!treeOwnerAsWin) {
aError.Throw(NS_ERROR_FAILURE);
return;
}
-
+
nsIntSize cssSize(aWidth, aHeight);
CheckSecurityWidthAndHeight(&cssSize.width, &cssSize.height, aCallerIsChrome);
nsIntSize devSz(CSSToDevIntPixels(cssSize));
aError = treeOwnerAsWin->SetSize(devSz.width, devSz.height, true);
}
@@ -7557,17 +7557,17 @@ nsGlobalWindow::PopupWhitelisted()
* Returns a value from the PopupControlState enum.
*/
PopupControlState
nsGlobalWindow::RevisePopupAbuseLevel(PopupControlState aControl)
{
MOZ_ASSERT(IsOuterWindow());
NS_ASSERTION(mDocShell, "Must have docshell");
-
+
if (mDocShell->ItemType() != nsIDocShellTreeItem::typeContent) {
return openAllowed;
}
PopupControlState abuse = aControl;
switch (abuse) {
case openControlled:
case openAbused:
@@ -9042,17 +9042,17 @@ nsGlobalWindow::FindOuter(const nsAStrin
// as the search root, but uses focus to set the current search
// frame. If we're being called from JS (as here), this window
// should be the current search frame.
nsCOMPtr<nsIWebBrowserFindInFrames> framesFinder(do_QueryInterface(finder));
if (framesFinder) {
framesFinder->SetRootSearchFrame(this); // paranoia
framesFinder->SetCurrentSearchFrame(this);
}
-
+
// The Find API does not accept empty strings. Launch the Find Dialog.
if (aString.IsEmpty() || aShowDialog) {
// See if the find dialog is already up using nsIWindowMediator
nsCOMPtr<nsIWindowMediator> windowMediator =
do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
nsCOMPtr<nsIDOMWindow> findDialog;
@@ -9629,17 +9629,17 @@ nsGlobalWindow::GetKeyboardIndicators(bo
bool
nsGlobalWindow::TakeFocus(bool aFocus, uint32_t aFocusMethod)
{
FORWARD_TO_INNER(TakeFocus, (aFocus, aFocusMethod), false);
if (mCleanedUp) {
return false;
}
-
+
if (aFocus)
mFocusMethod = aFocusMethod & FOCUSMETHOD_MASK;
if (mHasFocus != aFocus) {
mHasFocus = aFocus;
UpdateCanvasFocus(true, mFocusedNode);
}
@@ -12174,17 +12174,17 @@ nsresult nsGlobalWindow::ResetTimersForN
NS_ASSERTION(firingTime < timeout->mWhen,
"Our firing time should strictly decrease!");
TimeDuration delay = firingTime - now;
timeout->mWhen = firingTime;
// Since we reset mWhen we need to move |timeout| to the right
// place in the list so that it remains sorted by mWhen.
-
+
// Get the pointer to the next timeout now, before we move the
// current timeout in the list.
nsTimeout* nextTimeout = timeout->getNext();
// It is safe to remove and re-insert because mWhen is now
// strictly smaller than it used to be, so we know we'll insert
// |timeout| before nextTimeout.
NS_ASSERTION(!nextTimeout ||
@@ -12534,22 +12534,22 @@ nsGlobalWindow::SuspendTimeouts(uint32_t
TimeStamp now = TimeStamp::Now();
for (nsTimeout *t = mTimeouts.getFirst(); t; t = t->getNext()) {
// Set mTimeRemaining to be the time remaining for this timer.
if (t->mWhen > now)
t->mTimeRemaining = t->mWhen - now;
else
t->mTimeRemaining = TimeDuration(0);
-
+
// Drop the XPCOM timer; we'll reschedule when restoring the state.
if (t->mTimer) {
t->mTimer->Cancel();
t->mTimer = nullptr;
-
+
// Drop the reference that the timer's closure had on this timeout, we'll
// add it back in ResumeTimeouts. Note that it shouldn't matter that we're
// passing null for the context, since this shouldn't actually release this
// timeout.
t->Release();
}
}