Bug 820197 - Fix build warnings in accessible. r=surkov

This commit is contained in:
Usurelu Catalin 2012-12-16 19:50:11 -05:00
parent b5e9a2a186
commit 249069a64b
2 changed files with 6 additions and 7 deletions

View File

@ -107,7 +107,7 @@ NotificationController::Shutdown()
void
NotificationController::QueueEvent(AccEvent* aEvent)
{
NS_ASSERTION(aEvent->mAccessible && aEvent->mAccessible->IsApplication() ||
NS_ASSERTION((aEvent->mAccessible && aEvent->mAccessible->IsApplication()) ||
aEvent->GetDocAccessible() == mDocument,
"Queued event belongs to another document!");
@ -317,8 +317,8 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
void
NotificationController::CoalesceEvents()
{
uint32_t numQueuedEvents = mEvents.Length();
int32_t tail = numQueuedEvents - 1;
NS_ASSERTION(mEvents.Length(), "There should be at least one pending event!");
uint32_t tail = mEvents.Length() - 1;
AccEvent* tailEvent = mEvents[tail];
switch(tailEvent->mEventRule) {
@ -394,8 +394,7 @@ NotificationController::CoalesceEvents()
case AccEvent::eCoalesceSelectionChange:
{
AccSelChangeEvent* tailSelChangeEvent = downcast_accEvent(tailEvent);
int32_t index = tail - 1;
for (; index >= 0; index--) {
for (uint32_t index = tail - 1; index < tail; index--) {
AccEvent* thisEvent = mEvents[index];
if (thisEvent->mEventRule == tailEvent->mEventRule) {
AccSelChangeEvent* thisSelChangeEvent =
@ -508,7 +507,7 @@ NotificationController::CoalesceReorderEvents(AccEvent* aTailEvent)
void
NotificationController::CoalesceSelChangeEvents(AccSelChangeEvent* aTailEvent,
AccSelChangeEvent* aThisEvent,
int32_t aThisIndex)
uint32_t aThisIndex)
{
aTailEvent->mPreceedingCount = aThisEvent->mPreceedingCount + 1;

View File

@ -214,7 +214,7 @@ private:
*/
void CoalesceSelChangeEvents(AccSelChangeEvent* aTailEvent,
AccSelChangeEvent* aThisEvent,
int32_t aThisIndex);
uint32_t aThisIndex);
/**
* Coalesce text change events caused by sibling hide events.