From e6fb1d5091ac94ec39c8322ff86316978b3eec46 Mon Sep 17 00:00:00 2001 From: Jan Keromnes Date: Tue, 27 Jun 2017 17:23:00 -0400 Subject: [PATCH] Bug 1376628 - Don't use 'else' after 'break' or 'return' in dom/base/ (clang-tidy: readability-else-after-return). r=ehsan --- dom/base/nsDOMWindowUtils.cpp | 3 ++- dom/base/nsGlobalWindow.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 66ebdcb15cfc..991edefb53a4 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2716,7 +2716,8 @@ nsDOMWindowUtils::ZoomToFocusedInput() while (currentFrame) { if (currentFrame == rootFrame) { break; - } else if (currentFrame == scrolledFrame) { + } + if (currentFrame == scrolledFrame) { // we are in the rootScrollFrame so this element is not fixed isFixedPos = false; break; diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 5a8abf510b03..86408a400c92 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -10757,7 +10757,9 @@ void nsGlobalWindow::SetIsBackground(bool aIsBackground) inner->StopGamepadHaptics(); } return; - } else if (inner) { + } + + if (inner) { inner->SyncGamepadState(); } }