Bug 1338086 - Remove useless else blocks in order to reduce complexity in dom/browser-element/ r?baku
MozReview-Commit-ID: GOhpMjzT0m0
--- a/dom/browser-element/BrowserElementParent.cpp
+++ b/dom/browser-element/BrowserElementParent.cpp
@@ -165,17 +165,18 @@ BrowserElementParent::DispatchOpenWindow
DispatchCustomDOMEvent(aOpenerFrameElement,
NS_LITERAL_STRING("mozbrowseropenwindow"),
cx,
val, &status);
if (dispatchSucceeded) {
if (aPopupFrameElement->IsInUncomposedDoc()) {
return BrowserElementParent::OPEN_WINDOW_ADDED;
- } else if (status == nsEventStatus_eConsumeNoDefault) {
+ }
+ if (status == nsEventStatus_eConsumeNoDefault) {
// If the frame was not added to a document, report to callers whether
// preventDefault was called on or not
return BrowserElementParent::OPEN_WINDOW_CANCELLED;
}
}
return BrowserElementParent::OPEN_WINDOW_IGNORED;
}