Bug 1571567 - Fix no-fallthrough errors in /browser. r=MattN,k88hudson

Differential Revision: https://phabricator.services.mozilla.com/D40745
This commit is contained in:
Jared Wein
2019-08-08 15:18:49 +00:00
parent e4a54b42e1
commit a559a71435
12 changed files with 13 additions and 6 deletions

View File

@@ -119,6 +119,7 @@ class LinkHandlerChild extends ActorChild {
case "apple-touch-icon-precomposed": case "apple-touch-icon-precomposed":
case "fluid-icon": case "fluid-icon":
isRichIcon = true; isRichIcon = true;
// fall through
case "icon": case "icon":
if (iconAdded || link.hasAttribute("mask")) { if (iconAdded || link.hasAttribute("mask")) {
// Masked icons are not supported yet. // Masked icons are not supported yet.

View File

@@ -494,8 +494,8 @@ class PluginChild extends JSWindowActorChild {
"openPluginUpdatePage", "openPluginUpdatePage",
pluginTag.id pluginTag.id
); );
/* FALLTHRU */
/* FALLTHRU */
case "PluginVulnerableNoUpdate": case "PluginVulnerableNoUpdate":
case "PluginClickToPlay": case "PluginClickToPlay":
this._handleClickToPlayEvent(pluginElement); this._handleClickToPlayEvent(pluginElement);

View File

@@ -155,8 +155,7 @@ var StarUI = {
break; break;
} }
this._isComposing = true; this._isComposing = true;
// Explicit fall-through, during composition, panel shouldn't be // Explicit fall-through, during composition, panel shouldn't be hidden automatically.
// hidden automatically.
case "input": case "input":
// Might have edited some text without keyboard events nor composition // Might have edited some text without keyboard events nor composition
// events. Fall-through to cancel auto close in such case. // events. Fall-through to cancel auto close in such case.

View File

@@ -6058,6 +6058,7 @@ var CombinedStopReload = {
if (event.button == 0 && !this.stop.disabled) { if (event.button == 0 && !this.stop.disabled) {
this._stopClicked = true; this._stopClicked = true;
} }
break;
case "animationend": { case "animationend": {
if ( if (
event.target.classList.contains("toolbarbutton-animatable-image") && event.target.classList.contains("toolbarbutton-animatable-image") &&

View File

@@ -1733,6 +1733,7 @@
if (relatedTarget && relatedTarget.ownerDocument == document) { if (relatedTarget && relatedTarget.ownerDocument == document) {
break; break;
} }
// fall through
case "mousemove": case "mousemove":
if (document.getElementById("tabContextMenu").state != "open") { if (document.getElementById("tabContextMenu").state != "open") {
this._unlockTabSizing(); this._unlockTabSizing();

View File

@@ -1778,8 +1778,8 @@ var PanelView = class extends AssociatedToNode {
if (!button || !button.classList.contains("subviewbutton-nav")) { if (!button || !button.classList.contains("subviewbutton-nav")) {
break; break;
} }
// Fall-through...
} }
// Fall-through...
case "Space": case "Space":
case "NumpadEnter": case "NumpadEnter":
case "Enter": { case "Enter": {

View File

@@ -551,7 +551,7 @@ function DiscoveryStream(prevState = INITIAL_STATE.DiscoveryStream, action) {
switch (action.type) { switch (action.type) {
case at.DISCOVERY_STREAM_CONFIG_CHANGE: case at.DISCOVERY_STREAM_CONFIG_CHANGE:
// The reason this is a separate action is so it doesn't trigger a listener update on init // Fall through to a separate action is so it doesn't trigger a listener update on init
case at.DISCOVERY_STREAM_CONFIG_SETUP: case at.DISCOVERY_STREAM_CONFIG_SETUP:
return { ...prevState, config: action.data || {} }; return { ...prevState, config: action.data || {} };
case at.DISCOVERY_STREAM_LAYOUT_UPDATE: case at.DISCOVERY_STREAM_LAYOUT_UPDATE:

View File

@@ -1875,6 +1875,7 @@ class _ASRouter {
target, target,
action.data && action.data.trigger action.data && action.data.trigger
); );
break;
case "BLOCK_MESSAGE_BY_ID": case "BLOCK_MESSAGE_BY_ID":
await this.blockMessageById(action.data.id); await this.blockMessageById(action.data.id);
// Block the message but don't dismiss it in case the action taken has // Block the message but don't dismiss it in case the action taken has

View File

@@ -2173,6 +2173,7 @@ this.PlacesPanelview = class extends PlacesViewBase {
if (event.button != 1) { if (event.button != 1) {
break; break;
} }
// fall through
case "command": case "command":
this._onCommand(event); this._onCommand(event);
break; break;

View File

@@ -3183,6 +3183,7 @@ class HandlerInfoWrapper {
if (this instanceof InternalHandlerInfoWrapper) { if (this instanceof InternalHandlerInfoWrapper) {
return "ask"; return "ask";
} }
break;
case kActionUsePlugin: case kActionUsePlugin:
return "plugin"; return "plugin";
@@ -3201,10 +3202,10 @@ class HandlerInfoWrapper {
if (gMainPane.isValidHandlerApp(preferredApp)) { if (gMainPane.isValidHandlerApp(preferredApp)) {
return gMainPane._getIconURLForHandlerApp(preferredApp); return gMainPane._getIconURLForHandlerApp(preferredApp);
} }
// Explicit fall-through
// This should never happen, but if preferredAction is set to some weird // This should never happen, but if preferredAction is set to some weird
// value, then fall back to the generic application icon. // value, then fall back to the generic application icon.
// Explicit fall-through
default: default:
return ICON_URL_APP; return ICON_URL_APP;
} }

View File

@@ -208,6 +208,7 @@ var ContentSearch = {
if (data != "init-complete") { if (data != "init-complete") {
break; break;
} }
// fall through
case "nsPref:changed": case "nsPref:changed":
case "browser-search-engine-modified": case "browser-search-engine-modified":
this._eventQueue.push({ this._eventQueue.push({

View File

@@ -185,6 +185,7 @@ class TabsPanel extends TabsListBase {
event.target.tab.toggleMuteAudio(); event.target.tab.toggleMuteAudio();
break; break;
} }
// fall through
default: default:
super.handleEvent(event); super.handleEvent(event);
break; break;