Bug 1091979 - Fix -Wswitch warning in widget/cocoa/nsChildView.mm. r=smichaud

This commit is contained in:
Chris Peterson 2014-10-29 21:29:28 -07:00
Родитель c9f9232e9a
Коммит 1dab5b882b
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -124,7 +124,7 @@ extern "C" {
// defined in nsMenuBarX.mm
extern NSMenu* sApplicationMenu; // Application menu shared by all menubars
bool gChildViewMethodsSwizzled = false;
static bool gChildViewMethodsSwizzled = false;
extern nsISupportsArray *gDraggedTransferables;
@ -4752,7 +4752,6 @@ NSEvent* gLastDragMouseDownEvent = nil;
mUsingOMTCompositor = aUseOMTC;
}
// Returning NO from this method only disallows ordering on mousedown - in order
// to prevent it for mouseup too, we need to call [NSApp preventWindowOrdering]
// when handling the mousedown event.
@ -5544,14 +5543,18 @@ static int32_t RoundUp(double aDouble)
case NSOtherMouseDragged:
if ([aMouseEvent subtype] == NSTabletPointEventSubtype) {
mouseEvent->pressure = [aMouseEvent pressure];
MOZ_ASSERT(mouseEvent->pressure >= 0.0 && mouseEvent->pressure <= 1.0);
}
break;
default:
// Don't check other NSEvents for pressure.
break;
}
NS_OBJC_END_TRY_ABORT_BLOCK;
}
#pragma mark -
// NSTextInput implementation