Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align with with Mozilla C++ coding style. Differential Revision: https://phabricator.services.mozilla.com/D195040
This commit is contained in:
@@ -353,7 +353,9 @@ void EventQueue::ProcessEventQueue() {
|
|||||||
AccEvent* event = events[idx];
|
AccEvent* event = events[idx];
|
||||||
uint32_t eventType = event->mEventType;
|
uint32_t eventType = event->mEventType;
|
||||||
LocalAccessible* target = event->GetAccessible();
|
LocalAccessible* target = event->GetAccessible();
|
||||||
if (!target || target->IsDefunct()) continue;
|
if (!target || target->IsDefunct()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Collect select changes
|
// Collect select changes
|
||||||
if (IPCAccessibilityActive()) {
|
if (IPCAccessibilityActive()) {
|
||||||
@@ -418,7 +420,9 @@ void EventQueue::ProcessEventQueue() {
|
|||||||
|
|
||||||
nsEventShell::FireEvent(event);
|
nsEventShell::FireEvent(event);
|
||||||
|
|
||||||
if (!mDocument) return;
|
if (!mDocument) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDocument && IPCAccessibilityActive() &&
|
if (mDocument && IPCAccessibilityActive() &&
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ NotificationController::NotificationController(DocAccessible* aDocument,
|
|||||||
|
|
||||||
NotificationController::~NotificationController() {
|
NotificationController::~NotificationController() {
|
||||||
NS_ASSERTION(!mDocument, "Controller wasn't shutdown properly!");
|
NS_ASSERTION(!mDocument, "Controller wasn't shutdown properly!");
|
||||||
if (mDocument) Shutdown();
|
if (mDocument) {
|
||||||
|
Shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -54,7 +56,9 @@ NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE(NotificationController)
|
|||||||
NS_IMPL_CYCLE_COLLECTION_CLASS(NotificationController)
|
NS_IMPL_CYCLE_COLLECTION_CLASS(NotificationController)
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(NotificationController)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(NotificationController)
|
||||||
if (tmp->mDocument) tmp->Shutdown();
|
if (tmp->mDocument) {
|
||||||
|
tmp->Shutdown();
|
||||||
|
}
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(NotificationController)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(NotificationController)
|
||||||
@@ -856,7 +860,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
|||||||
nsTArray<RefPtr<DocAccessible>> newChildDocs;
|
nsTArray<RefPtr<DocAccessible>> newChildDocs;
|
||||||
for (uint32_t idx = 0; idx < hangingDocCnt; idx++) {
|
for (uint32_t idx = 0; idx < hangingDocCnt; idx++) {
|
||||||
DocAccessible* childDoc = mHangingChildDocuments[idx];
|
DocAccessible* childDoc = mHangingChildDocuments[idx];
|
||||||
if (childDoc->IsDefunct()) continue;
|
if (childDoc->IsDefunct()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (IPCAccessibilityActive() && !mDocument->IPCDoc()) {
|
if (IPCAccessibilityActive() && !mDocument->IPCDoc()) {
|
||||||
childDoc->Shutdown();
|
childDoc->Shutdown();
|
||||||
@@ -895,12 +901,16 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
|||||||
uint32_t childDocCnt = mDocument->ChildDocumentCount(), childDocIdx = 0;
|
uint32_t childDocCnt = mDocument->ChildDocumentCount(), childDocIdx = 0;
|
||||||
for (; childDocIdx < childDocCnt; childDocIdx++) {
|
for (; childDocIdx < childDocCnt; childDocIdx++) {
|
||||||
DocAccessible* childDoc = mDocument->GetChildDocumentAt(childDocIdx);
|
DocAccessible* childDoc = mDocument->GetChildDocumentAt(childDocIdx);
|
||||||
if (!childDoc->HasLoadState(DocAccessible::eCompletelyLoaded)) break;
|
if (!childDoc->HasLoadState(DocAccessible::eCompletelyLoaded)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (childDocIdx == childDocCnt) {
|
if (childDocIdx == childDocCnt) {
|
||||||
mDocument->ProcessLoad();
|
mDocument->ProcessLoad();
|
||||||
if (!mDocument) return;
|
if (!mDocument) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -930,7 +940,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
|||||||
uint32_t notificationCount = notifications.Length();
|
uint32_t notificationCount = notifications.Length();
|
||||||
for (uint32_t idx = 0; idx < notificationCount; idx++) {
|
for (uint32_t idx = 0; idx < notificationCount; idx++) {
|
||||||
notifications[idx]->Process();
|
notifications[idx]->Process();
|
||||||
if (!mDocument) return;
|
if (!mDocument) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ipc::ProcessChild::ExpectingShutdown()) {
|
if (ipc::ProcessChild::ExpectingShutdown()) {
|
||||||
@@ -1010,7 +1022,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mObservingState = eRefreshObserving;
|
mObservingState = eRefreshObserving;
|
||||||
if (!mDocument) return;
|
if (!mDocument) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Stop further processing if there are no new notifications of any kind or
|
// Stop further processing if there are no new notifications of any kind or
|
||||||
// events and document load is processed.
|
// events and document load is processed.
|
||||||
|
|||||||
Reference in New Issue
Block a user