Bug 1499702 - Clean up break statements in EventQueue::CoalesceEvents(), r=surkov
authorMarco Zehe <mzehe@mozilla.com>
Thu, 18 Oct 2018 07:06:45 +0000
changeset 490213 320f407a7677d7cef64f6e2213fc2e1449511da1
parent 490212 2dd8df3604ef3a4130daea876a25efe6db16536f
child 490214 aa851fc2ed73e31c338e9a1ba8f8538b0845d219
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerssurkov
bugs1499702
milestone64.0a1
Bug 1499702 - Clean up break statements in EventQueue::CoalesceEvents(), r=surkov Differential Revision: https://phabricator.services.mozilla.com/D8971
accessible/base/EventQueue.cpp
--- a/accessible/base/EventQueue.cpp
+++ b/accessible/base/EventQueue.cpp
@@ -106,17 +106,18 @@ EventQueue::CoalesceEvents()
       for (uint32_t index = tail - 1; index < tail; index--) {
         AccEvent* accEvent = mEvents[index];
         if (accEvent->mEventType == tailEvent->mEventType &&
           accEvent->mEventRule == tailEvent->mEventRule) {
           accEvent->mEventRule = AccEvent::eDoNotEmit;
           return;
         }
       }
-    } break; // case eCoalesceOfSameType
+      break; // case eCoalesceOfSameType
+    }
 
     case AccEvent::eCoalesceSelectionChange:
     {
       AccSelChangeEvent* tailSelChangeEvent = downcast_accEvent(tailEvent);
       for (uint32_t index = tail - 1; index < tail; index--) {
         AccEvent* thisEvent = mEvents[index];
         if (thisEvent->mEventRule == tailEvent->mEventRule) {
           AccSelChangeEvent* thisSelChangeEvent =
@@ -124,18 +125,18 @@ EventQueue::CoalesceEvents()
 
           // Coalesce selection change events within same control.
           if (tailSelChangeEvent->mWidget == thisSelChangeEvent->mWidget) {
             CoalesceSelChangeEvents(tailSelChangeEvent, thisSelChangeEvent, index);
             return;
           }
         }
       }
-
-    } break; // eCoalesceSelectionChange
+      break; // eCoalesceSelectionChange
+    }
 
     case AccEvent::eCoalesceStateChange:
     {
       // If state change event is duped then ignore previous event. If state
       // change event is opposite to previous event then no event is emitted
       // (accessible state wasn't changed).
       for (uint32_t index = tail - 1; index < tail; index--) {
         AccEvent* thisEvent = mEvents[index];
@@ -167,32 +168,34 @@ EventQueue::CoalesceEvents()
           AccTextSelChangeEvent* thisTSCEvent = downcast_accEvent(thisEvent);
           AccTextSelChangeEvent* tailTSCEvent = downcast_accEvent(tailEvent);
           if (thisTSCEvent->mSel == tailTSCEvent->mSel ||
               thisEvent->mAccessible == tailEvent->mAccessible)
             thisEvent->mEventRule = AccEvent::eDoNotEmit;
         }
 
       }
-    } break; // eCoalesceTextSelChange
+      break; // eCoalesceTextSelChange
+    }
 
     case AccEvent::eRemoveDupes:
     {
       // Check for repeat events, coalesce newly appended event by more older
       // event.
       for (uint32_t index = tail - 1; index < tail; index--) {
         AccEvent* accEvent = mEvents[index];
         if (accEvent->mEventType == tailEvent->mEventType &&
           accEvent->mEventRule == tailEvent->mEventRule &&
           accEvent->mAccessible == tailEvent->mAccessible) {
           tailEvent->mEventRule = AccEvent::eDoNotEmit;
           return;
         }
       }
-    } break; // case eRemoveDupes
+      break; // case eRemoveDupes
+    }
 
     default:
       break; // case eAllowDupes, eDoNotEmit
   } // switch
 }
 
 void
 EventQueue::CoalesceSelChangeEvents(AccSelChangeEvent* aTailEvent,