Bug 630811 part.2 Replace nsInputEvent::isShift, nsInputEvent::isControl, nsInputEvent::isAlt and nsInputEvent::isMeta r=smaug

This commit is contained in:
Masayuki Nakano 2012-04-25 12:00:02 +09:00
parent e93419bd4b
commit e089b336f8
29 changed files with 169 additions and 271 deletions

View File

@ -4642,7 +4642,7 @@ nsContentUtils::GetAccelKeyCandidates(nsIDOMKeyEvent* aDOMKeyEvent,
} }
PRUint32 len = nativeKeyEvent->alternativeCharCodes.Length(); PRUint32 len = nativeKeyEvent->alternativeCharCodes.Length();
if (!nativeKeyEvent->isShift) { if (!nativeKeyEvent->IsShift()) {
for (PRUint32 i = 0; i < len; ++i) { for (PRUint32 i = 0; i < len; ++i) {
PRUint32 ch = PRUint32 ch =
nativeKeyEvent->alternativeCharCodes[i].mUnshiftedCharCode; nativeKeyEvent->alternativeCharCodes[i].mUnshiftedCharCode;

View File

@ -3944,10 +3944,7 @@ nsGenericElement::DispatchClickEvent(nsPresContext* aPresContext,
event.pressure = pressure; event.pressure = pressure;
event.clickCount = clickCount; event.clickCount = clickCount;
event.inputSource = inputSource; event.inputSource = inputSource;
event.isShift = aSourceEvent->isShift; event.modifiers = aSourceEvent->modifiers;
event.isControl = aSourceEvent->isControl;
event.isAlt = aSourceEvent->isAlt;
event.isMeta = aSourceEvent->isMeta;
event.flags |= aFlags; // Be careful not to overwrite existing flags! event.flags |= aFlags; // Be careful not to overwrite existing flags!
return DispatchEvent(aPresContext, &event, aTarget, aFullDispatch, aStatus); return DispatchEvent(aPresContext, &event, aTarget, aFullDispatch, aStatus);
@ -5988,8 +5985,8 @@ nsGenericElement::PostHandleEventForLinks(nsEventChainPostVisitor& aVisitor)
case NS_MOUSE_CLICK: case NS_MOUSE_CLICK:
if (NS_IS_MOUSE_LEFT_CLICK(aVisitor.mEvent)) { if (NS_IS_MOUSE_LEFT_CLICK(aVisitor.mEvent)) {
nsInputEvent* inputEvent = static_cast<nsInputEvent*>(aVisitor.mEvent); nsInputEvent* inputEvent = static_cast<nsInputEvent*>(aVisitor.mEvent);
if (inputEvent->isControl || inputEvent->isMeta || if (inputEvent->IsControl() || inputEvent->IsMeta() ||
inputEvent->isAlt ||inputEvent->isShift) { inputEvent->IsAlt() ||inputEvent->IsShift()) {
break; break;
} }

View File

@ -357,13 +357,13 @@ GetBasePrefKeyForMouseWheel(nsMouseScrollEvent* aEvent, nsACString& aPref)
if (aEvent->scrollFlags & nsMouseScrollEvent::kIsHorizontal) { if (aEvent->scrollFlags & nsMouseScrollEvent::kIsHorizontal) {
aPref.Append(horizscroll); aPref.Append(horizscroll);
} }
if (aEvent->isShift) { if (aEvent->IsShift()) {
aPref.Append(withshift); aPref.Append(withshift);
} else if (aEvent->isControl) { } else if (aEvent->IsControl()) {
aPref.Append(withcontrol); aPref.Append(withcontrol);
} else if (aEvent->isAlt) { } else if (aEvent->IsAlt()) {
aPref.Append(withalt); aPref.Append(withalt);
} else if (aEvent->isMeta) { } else if (aEvent->IsMeta()) {
aPref.Append(withmetakey); aPref.Append(withmetakey);
} else { } else {
aPref.Append(withno); aPref.Append(withno);
@ -1198,13 +1198,13 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent; nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
PRInt32 modifierMask = 0; PRInt32 modifierMask = 0;
if (keyEvent->isShift) if (keyEvent->IsShift())
modifierMask |= NS_MODIFIER_SHIFT; modifierMask |= NS_MODIFIER_SHIFT;
if (keyEvent->isControl) if (keyEvent->IsControl())
modifierMask |= NS_MODIFIER_CONTROL; modifierMask |= NS_MODIFIER_CONTROL;
if (keyEvent->isAlt) if (keyEvent->IsAlt())
modifierMask |= NS_MODIFIER_ALT; modifierMask |= NS_MODIFIER_ALT;
if (keyEvent->isMeta) if (keyEvent->IsMeta())
modifierMask |= NS_MODIFIER_META; modifierMask |= NS_MODIFIER_META;
// Prevent keyboard scrolling while an accesskey modifier is in use. // Prevent keyboard scrolling while an accesskey modifier is in use.
@ -2004,10 +2004,6 @@ nsEventStateManager::BeginTrackingDragGesture(nsPresContext* aPresContext,
getter_AddRefs(mGestureDownContent)); getter_AddRefs(mGestureDownContent));
mGestureDownFrameOwner = inDownFrame->GetContent(); mGestureDownFrameOwner = inDownFrame->GetContent();
mGestureDownShift = inDownEvent->isShift;
mGestureDownControl = inDownEvent->isControl;
mGestureDownAlt = inDownEvent->isAlt;
mGestureDownMeta = inDownEvent->isMeta;
mGestureModifiers = inDownEvent->modifiers; mGestureModifiers = inDownEvent->modifiers;
mGestureDownButtons = inDownEvent->buttons; mGestureDownButtons = inDownEvent->buttons;
@ -2042,10 +2038,6 @@ nsEventStateManager::FillInEventFromGestureDown(nsMouseEvent* aEvent)
// different // different
nsIntPoint tmpPoint = aEvent->widget->WidgetToScreenOffset(); nsIntPoint tmpPoint = aEvent->widget->WidgetToScreenOffset();
aEvent->refPoint = mGestureDownPoint - tmpPoint; aEvent->refPoint = mGestureDownPoint - tmpPoint;
aEvent->isShift = mGestureDownShift;
aEvent->isControl = mGestureDownControl;
aEvent->isAlt = mGestureDownAlt;
aEvent->isMeta = mGestureDownMeta;
aEvent->modifiers = mGestureModifiers; aEvent->modifiers = mGestureModifiers;
aEvent->buttons = mGestureDownButtons; aEvent->buttons = mGestureDownButtons;
} }
@ -2218,8 +2210,9 @@ nsEventStateManager::DetermineDragTarget(nsPresContext* aPresContext,
// occurred, and aSelectionTarget is the node to use when a selection is used // occurred, and aSelectionTarget is the node to use when a selection is used
bool canDrag; bool canDrag;
nsCOMPtr<nsIContent> dragDataNode; nsCOMPtr<nsIContent> dragDataNode;
bool wasAlt = (mGestureModifiers & widget::MODIFIER_ALT) != 0;
nsresult rv = nsContentAreaDragDrop::GetDragData(window, mGestureDownContent, nsresult rv = nsContentAreaDragDrop::GetDragData(window, mGestureDownContent,
aSelectionTarget, mGestureDownAlt, aSelectionTarget, wasAlt,
aDataTransfer, &canDrag, aSelection, aDataTransfer, &canDrag, aSelection,
getter_AddRefs(dragDataNode)); getter_AddRefs(dragDataNode));
if (NS_FAILED(rv) || !canDrag) if (NS_FAILED(rv) || !canDrag)
@ -2577,10 +2570,6 @@ nsEventStateManager::SendLineScrollEvent(nsIFrame* aTargetFrame,
event.refPoint = aEvent->refPoint; event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget; event.widget = aEvent->widget;
event.time = aEvent->time; event.time = aEvent->time;
event.isShift = aEvent->isShift;
event.isControl = aEvent->isControl;
event.isAlt = aEvent->isAlt;
event.isMeta = aEvent->isMeta;
event.modifiers = aEvent->modifiers; event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons; event.buttons = aEvent->buttons;
event.scrollFlags = aEvent->scrollFlags; event.scrollFlags = aEvent->scrollFlags;
@ -2614,10 +2603,6 @@ nsEventStateManager::SendPixelScrollEvent(nsIFrame* aTargetFrame,
event.refPoint = aEvent->refPoint; event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget; event.widget = aEvent->widget;
event.time = aEvent->time; event.time = aEvent->time;
event.isShift = aEvent->isShift;
event.isControl = aEvent->isControl;
event.isAlt = aEvent->isAlt;
event.isMeta = aEvent->isMeta;
event.modifiers = aEvent->modifiers; event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons; event.buttons = aEvent->buttons;
event.scrollFlags = aEvent->scrollFlags; event.scrollFlags = aEvent->scrollFlags;
@ -3415,10 +3400,6 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
event.refPoint += mouseEvent->widget->WidgetToScreenOffset(); event.refPoint += mouseEvent->widget->WidgetToScreenOffset();
} }
event.refPoint -= widget->WidgetToScreenOffset(); event.refPoint -= widget->WidgetToScreenOffset();
event.isShift = mouseEvent->isShift;
event.isControl = mouseEvent->isControl;
event.isAlt = mouseEvent->isAlt;
event.isMeta = mouseEvent->isMeta;
event.modifiers = mouseEvent->modifiers; event.modifiers = mouseEvent->modifiers;
event.buttons = mouseEvent->buttons; event.buttons = mouseEvent->buttons;
event.inputSource = mouseEvent->inputSource; event.inputSource = mouseEvent->inputSource;
@ -3447,7 +3428,7 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
if (nsEventStatus_eConsumeNoDefault != *aStatus) { if (nsEventStatus_eConsumeNoDefault != *aStatus) {
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent; nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
//This is to prevent keyboard scrolling while alt modifier in use. //This is to prevent keyboard scrolling while alt modifier in use.
if (!keyEvent->isAlt) { if (!keyEvent->IsAlt()) {
switch(keyEvent->keyCode) { switch(keyEvent->keyCode) {
case NS_VK_TAB: case NS_VK_TAB:
case NS_VK_F6: case NS_VK_F6:
@ -3455,10 +3436,10 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
nsIFocusManager* fm = nsFocusManager::GetFocusManager(); nsIFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && mDocument) { if (fm && mDocument) {
// Shift focus forward or back depending on shift key // Shift focus forward or back depending on shift key
bool isDocMove = ((nsInputEvent*)aEvent)->isControl || bool isDocMove = ((nsInputEvent*)aEvent)->IsControl() ||
(keyEvent->keyCode == NS_VK_F6); (keyEvent->keyCode == NS_VK_F6);
PRUint32 dir = PRUint32 dir =
static_cast<nsInputEvent*>(aEvent)->isShift ? static_cast<nsInputEvent*>(aEvent)->IsShift() ?
(isDocMove ? static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_BACKWARDDOC) : (isDocMove ? static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_BACKWARDDOC) :
static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_BACKWARD)) : static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_BACKWARD)) :
(isDocMove ? static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_FORWARDDOC) : (isDocMove ? static_cast<PRUint32>(nsIFocusManager::MOVEFOCUS_FORWARDDOC) :
@ -3842,10 +3823,6 @@ nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, PRUint32 aMessage,
nsMouseEvent event(NS_IS_TRUSTED_EVENT(aEvent), aMessage, aEvent->widget, nsMouseEvent event(NS_IS_TRUSTED_EVENT(aEvent), aMessage, aEvent->widget,
nsMouseEvent::eReal); nsMouseEvent::eReal);
event.refPoint = aEvent->refPoint; event.refPoint = aEvent->refPoint;
event.isShift = ((nsMouseEvent*)aEvent)->isShift;
event.isControl = ((nsMouseEvent*)aEvent)->isControl;
event.isAlt = ((nsMouseEvent*)aEvent)->isAlt;
event.isMeta = ((nsMouseEvent*)aEvent)->isMeta;
event.modifiers = ((nsMouseEvent*)aEvent)->modifiers; event.modifiers = ((nsMouseEvent*)aEvent)->modifiers;
event.buttons = ((nsMouseEvent*)aEvent)->buttons; event.buttons = ((nsMouseEvent*)aEvent)->buttons;
event.pluginEvent = ((nsMouseEvent*)aEvent)->pluginEvent; event.pluginEvent = ((nsMouseEvent*)aEvent)->pluginEvent;
@ -4257,10 +4234,6 @@ nsEventStateManager::FireDragEnterOrExit(nsPresContext* aPresContext,
nsEventStatus status = nsEventStatus_eIgnore; nsEventStatus status = nsEventStatus_eIgnore;
nsDragEvent event(NS_IS_TRUSTED_EVENT(aEvent), aMsg, aEvent->widget); nsDragEvent event(NS_IS_TRUSTED_EVENT(aEvent), aMsg, aEvent->widget);
event.refPoint = aEvent->refPoint; event.refPoint = aEvent->refPoint;
event.isShift = ((nsMouseEvent*)aEvent)->isShift;
event.isControl = ((nsMouseEvent*)aEvent)->isControl;
event.isAlt = ((nsMouseEvent*)aEvent)->isAlt;
event.isMeta = ((nsMouseEvent*)aEvent)->isMeta;
event.modifiers = ((nsMouseEvent*)aEvent)->modifiers; event.modifiers = ((nsMouseEvent*)aEvent)->modifiers;
event.buttons = ((nsMouseEvent*)aEvent)->buttons; event.buttons = ((nsMouseEvent*)aEvent)->buttons;
event.relatedTarget = aRelatedTarget; event.relatedTarget = aRelatedTarget;
@ -4421,10 +4394,6 @@ nsEventStateManager::CheckForAndDispatchClick(nsPresContext* aPresContext,
nsMouseEvent::eReal); nsMouseEvent::eReal);
event.refPoint = aEvent->refPoint; event.refPoint = aEvent->refPoint;
event.clickCount = aEvent->clickCount; event.clickCount = aEvent->clickCount;
event.isShift = aEvent->isShift;
event.isControl = aEvent->isControl;
event.isAlt = aEvent->isAlt;
event.isMeta = aEvent->isMeta;
event.modifiers = aEvent->modifiers; event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons; event.buttons = aEvent->buttons;
event.time = aEvent->time; event.time = aEvent->time;
@ -4444,10 +4413,6 @@ nsEventStateManager::CheckForAndDispatchClick(nsPresContext* aPresContext,
aEvent->widget, nsMouseEvent::eReal); aEvent->widget, nsMouseEvent::eReal);
event2.refPoint = aEvent->refPoint; event2.refPoint = aEvent->refPoint;
event2.clickCount = aEvent->clickCount; event2.clickCount = aEvent->clickCount;
event2.isShift = aEvent->isShift;
event2.isControl = aEvent->isControl;
event2.isAlt = aEvent->isAlt;
event2.isMeta = aEvent->isMeta;
event2.modifiers = aEvent->modifiers; event2.modifiers = aEvent->modifiers;
event2.buttons = aEvent->buttons; event2.buttons = aEvent->buttons;
event2.flags |= flags; event2.flags |= flags;
@ -5048,10 +5013,6 @@ nsEventStateManager::DoQueryScrollTargetInfo(nsQueryContentEvent* aEvent,
aEvent->mInput.mMouseScrollEvent->message, aEvent->mInput.mMouseScrollEvent->message,
aEvent->mInput.mMouseScrollEvent->widget); aEvent->mInput.mMouseScrollEvent->widget);
msEvent.isShift = aEvent->mInput.mMouseScrollEvent->isShift;
msEvent.isControl = aEvent->mInput.mMouseScrollEvent->isControl;
msEvent.isAlt = aEvent->mInput.mMouseScrollEvent->isAlt;
msEvent.isMeta = aEvent->mInput.mMouseScrollEvent->isMeta;
msEvent.modifiers = aEvent->mInput.mMouseScrollEvent->modifiers; msEvent.modifiers = aEvent->mInput.mMouseScrollEvent->modifiers;
msEvent.buttons = aEvent->mInput.mMouseScrollEvent->buttons; msEvent.buttons = aEvent->mInput.mMouseScrollEvent->buttons;

View File

@ -506,10 +506,6 @@ private:
// an <area> of an image map this is the image. (bug 289667) // an <area> of an image map this is the image. (bug 289667)
nsCOMPtr<nsIContent> mGestureDownFrameOwner; nsCOMPtr<nsIContent> mGestureDownFrameOwner;
// State of keys when the original gesture-down happened // State of keys when the original gesture-down happened
bool mGestureDownShift;
bool mGestureDownControl;
bool mGestureDownAlt;
bool mGestureDownMeta;
mozilla::widget::Modifiers mGestureModifiers; mozilla::widget::Modifiers mGestureModifiers;
PRUint16 mGestureDownButtons; PRUint16 mGestureDownButtons;

View File

@ -2136,8 +2136,8 @@ nsHTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
} // switch } // switch
} }
if (aVisitor.mEvent->message == NS_KEY_PRESS && if (aVisitor.mEvent->message == NS_KEY_PRESS &&
mType == NS_FORM_INPUT_RADIO && !keyEvent->isAlt && mType == NS_FORM_INPUT_RADIO && !keyEvent->IsAlt() &&
!keyEvent->isControl && !keyEvent->isMeta) { !keyEvent->IsControl() && !keyEvent->IsMeta()) {
bool isMovingBack = false; bool isMovingBack = false;
switch (keyEvent->keyCode) { switch (keyEvent->keyCode) {
case NS_VK_UP: case NS_VK_UP:

View File

@ -228,8 +228,8 @@ nsHTMLLabelElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
// have a kbd modifier (which adjusts a selection), or if it's a // have a kbd modifier (which adjusts a selection), or if it's a
// double click (we already forwarded the first click event). // double click (we already forwarded the first click event).
if (dragSelect || event->clickCount > 1 || if (dragSelect || event->clickCount > 1 ||
event->isShift || event->isControl || event->isAlt || event->IsShift() || event->IsControl() || event->IsAlt() ||
event->isMeta) { event->IsMeta()) {
break; break;
} }

View File

@ -1666,10 +1666,10 @@ nsXULElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
NS_IS_TRUSTED_EVENT(aVisitor.mEvent), NS_IS_TRUSTED_EVENT(aVisitor.mEvent),
aVisitor.mDOMEvent, aVisitor.mDOMEvent,
nsnull, nsnull,
orig->isControl, orig->IsControl(),
orig->isAlt, orig->IsAlt(),
orig->isShift, orig->IsShift(),
orig->isMeta); orig->IsMeta());
} else { } else {
NS_WARNING("A XUL element is attached to a command that doesn't exist!\n"); NS_WARNING("A XUL element is attached to a command that doesn't exist!\n");
} }

View File

@ -2123,10 +2123,10 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)
static unsigned int XInputEventState(const nsInputEvent& anEvent) static unsigned int XInputEventState(const nsInputEvent& anEvent)
{ {
unsigned int state = 0; unsigned int state = 0;
if (anEvent.isShift) state |= ShiftMask; if (anEvent.IsShift()) state |= ShiftMask;
if (anEvent.isControl) state |= ControlMask; if (anEvent.IsControl()) state |= ControlMask;
if (anEvent.isAlt) state |= Mod1Mask; if (anEvent.IsAlt()) state |= Mod1Mask;
if (anEvent.isMeta) state |= Mod4Mask; if (anEvent.IsMeta()) state |= Mod4Mask;
return state; return state;
} }
#endif #endif

View File

@ -2558,13 +2558,13 @@ PluginInstanceChild::AnswerHandleKeyEvent(const nsKeyEvent& aKeyEvent,
AssertPluginThread(); AssertPluginThread();
#if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6) #if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6)
Qt::KeyboardModifiers modifier; Qt::KeyboardModifiers modifier;
if (aKeyEvent.isShift) if (aKeyEvent.IsShift())
modifier |= Qt::ShiftModifier; modifier |= Qt::ShiftModifier;
if (aKeyEvent.isControl) if (aKeyEvent.IsControl())
modifier |= Qt::ControlModifier; modifier |= Qt::ControlModifier;
if (aKeyEvent.isAlt) if (aKeyEvent.IsAlt())
modifier |= Qt::AltModifier; modifier |= Qt::AltModifier;
if (aKeyEvent.isMeta) if (aKeyEvent.IsMeta())
modifier |= Qt::MetaModifier; modifier |= Qt::MetaModifier;
QEvent::Type type; QEvent::Type type;

View File

@ -5078,8 +5078,8 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
aKeyEvent->PreventDefault(); // consumed aKeyEvent->PreventDefault(); // consumed
return NS_OK; return NS_OK;
case nsIDOMKeyEvent::DOM_VK_BACK_SPACE: case nsIDOMKeyEvent::DOM_VK_BACK_SPACE:
if (nativeKeyEvent->isControl || nativeKeyEvent->isAlt || if (nativeKeyEvent->IsControl() || nativeKeyEvent->IsAlt() ||
nativeKeyEvent->isMeta) { nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
DeleteSelection(nsIEditor::ePrevious); DeleteSelection(nsIEditor::ePrevious);
@ -5089,8 +5089,8 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
// on certain platforms (such as windows) the shift key // on certain platforms (such as windows) the shift key
// modifies what delete does (cmd_cut in this case). // modifies what delete does (cmd_cut in this case).
// bailing here to allow the keybindings to do the cut. // bailing here to allow the keybindings to do the cut.
if (nativeKeyEvent->isShift || nativeKeyEvent->isControl || if (nativeKeyEvent->IsShift() || nativeKeyEvent->IsControl() ||
nativeKeyEvent->isAlt || nativeKeyEvent->isMeta) { nativeKeyEvent->IsAlt() || nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
DeleteSelection(nsIEditor::eNext); DeleteSelection(nsIEditor::eNext);

View File

@ -646,8 +646,8 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
return NS_OK; // let it be used for focus switching return NS_OK; // let it be used for focus switching
} }
if (nativeKeyEvent->isControl || nativeKeyEvent->isAlt || if (nativeKeyEvent->IsControl() || nativeKeyEvent->IsAlt() ||
nativeKeyEvent->isMeta) { nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
@ -674,12 +674,12 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
bool handled = false; bool handled = false;
if (nsHTMLEditUtils::IsTableElement(blockParent)) { if (nsHTMLEditUtils::IsTableElement(blockParent)) {
rv = TabInTable(nativeKeyEvent->isShift, &handled); rv = TabInTable(nativeKeyEvent->IsShift(), &handled);
if (handled) { if (handled) {
ScrollSelectionIntoView(false); ScrollSelectionIntoView(false);
} }
} else if (nsHTMLEditUtils::IsListItem(blockParent)) { } else if (nsHTMLEditUtils::IsListItem(blockParent)) {
rv = Indent(nativeKeyEvent->isShift ? rv = Indent(nativeKeyEvent->IsShift() ?
NS_LITERAL_STRING("outdent") : NS_LITERAL_STRING("outdent") :
NS_LITERAL_STRING("indent")); NS_LITERAL_STRING("indent"));
handled = true; handled = true;
@ -688,7 +688,7 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
if (handled) { if (handled) {
return aKeyEvent->PreventDefault(); // consumed return aKeyEvent->PreventDefault(); // consumed
} }
if (nativeKeyEvent->isShift) { if (nativeKeyEvent->IsShift()) {
return NS_OK; // don't type text for shift tabs return NS_OK; // don't type text for shift tabs
} }
aKeyEvent->PreventDefault(); aKeyEvent->PreventDefault();
@ -696,12 +696,12 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
} }
case nsIDOMKeyEvent::DOM_VK_RETURN: case nsIDOMKeyEvent::DOM_VK_RETURN:
case nsIDOMKeyEvent::DOM_VK_ENTER: case nsIDOMKeyEvent::DOM_VK_ENTER:
if (nativeKeyEvent->isControl || nativeKeyEvent->isAlt || if (nativeKeyEvent->IsControl() || nativeKeyEvent->IsAlt() ||
nativeKeyEvent->isMeta) { nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
aKeyEvent->PreventDefault(); // consumed aKeyEvent->PreventDefault(); // consumed
if (nativeKeyEvent->isShift && !IsPlaintextEditor()) { if (nativeKeyEvent->IsShift() && !IsPlaintextEditor()) {
// only inserts a br node // only inserts a br node
return TypedText(EmptyString(), eTypedBR); return TypedText(EmptyString(), eTypedBR);
} }
@ -711,8 +711,8 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
// NOTE: On some keyboard layout, some characters are inputted with Control // NOTE: On some keyboard layout, some characters are inputted with Control
// key or Alt key, but at that time, widget sets FALSE to these keys. // key or Alt key, but at that time, widget sets FALSE to these keys.
if (nativeKeyEvent->charCode == 0 || nativeKeyEvent->isControl || if (nativeKeyEvent->charCode == 0 || nativeKeyEvent->IsControl() ||
nativeKeyEvent->isAlt || nativeKeyEvent->isMeta) { nativeKeyEvent->IsAlt() || nativeKeyEvent->IsMeta()) {
// we don't PreventDefault() here or keybindings like control-x won't work // we don't PreventDefault() here or keybindings like control-x won't work
return NS_OK; return NS_OK;
} }

View File

@ -390,8 +390,8 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
return NS_OK; // let it be used for focus switching return NS_OK; // let it be used for focus switching
} }
if (nativeKeyEvent->isShift || nativeKeyEvent->isControl || if (nativeKeyEvent->IsShift() || nativeKeyEvent->IsControl() ||
nativeKeyEvent->isAlt || nativeKeyEvent->isMeta) { nativeKeyEvent->IsAlt() || nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
@ -401,8 +401,8 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
} }
case nsIDOMKeyEvent::DOM_VK_RETURN: case nsIDOMKeyEvent::DOM_VK_RETURN:
case nsIDOMKeyEvent::DOM_VK_ENTER: case nsIDOMKeyEvent::DOM_VK_ENTER:
if (IsSingleLineEditor() || nativeKeyEvent->isControl || if (IsSingleLineEditor() || nativeKeyEvent->IsControl() ||
nativeKeyEvent->isAlt || nativeKeyEvent->isMeta) { nativeKeyEvent->IsAlt() || nativeKeyEvent->IsMeta()) {
return NS_OK; return NS_OK;
} }
aKeyEvent->PreventDefault(); aKeyEvent->PreventDefault();
@ -411,8 +411,8 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
// NOTE: On some keyboard layout, some characters are inputted with Control // NOTE: On some keyboard layout, some characters are inputted with Control
// key or Alt key, but at that time, widget sets FALSE to these keys. // key or Alt key, but at that time, widget sets FALSE to these keys.
if (nativeKeyEvent->charCode == 0 || nativeKeyEvent->isControl || if (nativeKeyEvent->charCode == 0 || nativeKeyEvent->IsControl() ||
nativeKeyEvent->isAlt || nativeKeyEvent->isMeta) { nativeKeyEvent->IsAlt() || nativeKeyEvent->IsMeta()) {
// we don't PreventDefault() here or keybindings like control-x won't work // we don't PreventDefault() here or keybindings like control-x won't work
return NS_OK; return NS_OK;
} }

View File

@ -5321,7 +5321,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
nsMouseEvent::eSynthesized); nsMouseEvent::eSynthesized);
event.refPoint = refpoint.ToNearestPixels(viewAPD); event.refPoint = refpoint.ToNearestPixels(viewAPD);
event.time = PR_IntervalNow(); event.time = PR_IntervalNow();
// XXX set event.isShift, event.isControl, event.isAlt, event.isMeta ? // XXX set event.modifiers ?
// XXX mnakano I think that we should get the latest information from widget. // XXX mnakano I think that we should get the latest information from widget.
nsCOMPtr<nsIPresShell> shell = pointVM->GetPresShell(); nsCOMPtr<nsIPresShell> shell = pointVM->GetPresShell();
@ -5713,10 +5713,6 @@ EvictTouchPoint(nsCOMPtr<nsIDOMTouch>& aTouch)
return; return;
} }
nsTouchEvent event(true, NS_TOUCH_END, widget); nsTouchEvent event(true, NS_TOUCH_END, widget);
event.isShift = false;
event.isControl = false;
event.isAlt = false;
event.isMeta = false;
event.widget = widget; event.widget = widget;
event.time = PR_IntervalNow(); event.time = PR_IntervalNow();
event.touches.AppendElement(aTouch); event.touches.AppendElement(aTouch);
@ -6544,7 +6540,7 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsEventStatus* aStatus)
!AdjustContextMenuKeyEvent(me)) { !AdjustContextMenuKeyEvent(me)) {
return NS_OK; return NS_OK;
} }
if (me->isShift) if (me->IsShift())
aEvent->flags |= NS_EVENT_FLAG_ONLY_CHROME_DISPATCH | aEvent->flags |= NS_EVENT_FLAG_ONLY_CHROME_DISPATCH |
NS_EVENT_RETARGET_TO_NON_NATIVE_ANONYMOUS; NS_EVENT_RETARGET_TO_NON_NATIVE_ANONYMOUS;
} }

View File

@ -700,10 +700,7 @@ protected:
{ {
mEvent->time = aEvent->time; mEvent->time = aEvent->time;
mEvent->refPoint = aEvent->refPoint; mEvent->refPoint = aEvent->refPoint;
mEvent->isShift = aEvent->isShift; mEvent->modifiers = aEvent->modifiers;
mEvent->isControl = aEvent->isControl;
mEvent->isAlt = aEvent->isAlt;
mEvent->isMeta = aEvent->isMeta;
} }
nsDelayedInputEvent() nsDelayedInputEvent()

View File

@ -2281,16 +2281,16 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection *aFrameSelection,
(aMouseEvent->message == NS_MOUSE_MOVE || (aMouseEvent->message == NS_MOUSE_MOVE ||
(aMouseEvent->message == NS_MOUSE_BUTTON_UP && (aMouseEvent->message == NS_MOUSE_BUTTON_UP &&
aMouseEvent->button == nsMouseEvent::eLeftButton) || aMouseEvent->button == nsMouseEvent::eLeftButton) ||
aMouseEvent->isShift); aMouseEvent->IsShift());
if (!doTableSelection) if (!doTableSelection)
{ {
// In Browser, special 'table selection' key must be pressed for table selection // In Browser, special 'table selection' key must be pressed for table selection
// or when just Shift is pressed and we're already in table/cell selection mode // or when just Shift is pressed and we're already in table/cell selection mode
#ifdef XP_MACOSX #ifdef XP_MACOSX
doTableSelection = aMouseEvent->isMeta || (aMouseEvent->isShift && selectingTableCells); doTableSelection = aMouseEvent->IsMeta() || (aMouseEvent->IsShift() && selectingTableCells);
#else #else
doTableSelection = aMouseEvent->isControl || (aMouseEvent->isShift && selectingTableCells); doTableSelection = aMouseEvent->IsControl() || (aMouseEvent->IsShift() && selectingTableCells);
#endif #endif
} }
if (!doTableSelection) if (!doTableSelection)
@ -2476,7 +2476,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL; isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
nsInputEvent* keyEvent = (nsInputEvent*)aEvent; nsInputEvent* keyEvent = (nsInputEvent*)aEvent;
if (!keyEvent->isAlt) { if (!keyEvent->IsAlt()) {
for (nsIContent* content = mContent; content; for (nsIContent* content = mContent; content;
content = content->GetParent()) { content = content->GetParent()) {
@ -2537,11 +2537,11 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
nsMouseEvent *me = (nsMouseEvent *)aEvent; nsMouseEvent *me = (nsMouseEvent *)aEvent;
#ifdef XP_MACOSX #ifdef XP_MACOSX
if (me->isControl) if (me->IsControl())
return NS_OK;//short circuit. hard coded for mac due to time restraints. return NS_OK;//short circuit. hard coded for mac due to time restraints.
bool control = me->isMeta; bool control = me->IsMeta();
#else #else
bool control = me->isControl; bool control = me->IsControl();
#endif #endif
nsRefPtr<nsFrameSelection> fc = const_cast<nsFrameSelection*>(frameselection); nsRefPtr<nsFrameSelection> fc = const_cast<nsFrameSelection*>(frameselection);
@ -2634,7 +2634,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
// Do not touch any nsFrame members after this point without adding // Do not touch any nsFrame members after this point without adding
// weakFrame checks. // weakFrame checks.
rv = fc->HandleClick(offsets.content, offsets.StartOffset(), rv = fc->HandleClick(offsets.content, offsets.StartOffset(),
offsets.EndOffset(), me->isShift, control, offsets.EndOffset(), me->IsShift(), control,
offsets.associateWithNext); offsets.associateWithNext);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
@ -2643,7 +2643,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
if (offsets.offset != offsets.secondaryOffset) if (offsets.offset != offsets.secondaryOffset)
fc->MaintainSelection(); fc->MaintainSelection();
if (isEditor && !me->isShift && if (isEditor && !me->IsShift() &&
(offsets.EndOffset() - offsets.StartOffset()) == 1) (offsets.EndOffset() - offsets.StartOffset()) == 1)
{ {
// A single node is selected and we aren't extending an existing // A single node is selected and we aren't extending an existing
@ -2912,7 +2912,7 @@ HandleFrameSelection(nsFrameSelection* aFrameSelection,
rv = aFrameSelection->HandleClick(aOffsets.content, rv = aFrameSelection->HandleClick(aOffsets.content,
aOffsets.StartOffset(), aOffsets.StartOffset(),
aOffsets.EndOffset(), aOffsets.EndOffset(),
me->isShift, false, me->IsShift(), false,
aOffsets.associateWithNext); aOffsets.associateWithNext);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return rv; return rv;

View File

@ -1881,7 +1881,7 @@ printf(" * TakeFocus - moving into new cell\n");
// XXXX We need to REALLY get the current key shift state // XXXX We need to REALLY get the current key shift state
// (we'd need to add event listener -- let's not bother for now) // (we'd need to add event listener -- let's not bother for now)
event.isShift = false; //aContinueSelection; event.modifiers &= ~widget::MODIFIER_SHIFT; //aContinueSelection;
if (parent) if (parent)
{ {
mCellParent = cellparent; mCellParent = cellparent;
@ -2427,7 +2427,7 @@ printf("HandleTableSelection: Dragged into a new cell\n");
// Hold down shift, then start selecting in one direction // Hold down shift, then start selecting in one direction
// If next cell dragged into is in same row, select entire row, // If next cell dragged into is in same row, select entire row,
// if next cell is in same column, select entire column // if next cell is in same column, select entire column
if (mStartSelectedCell && aMouseEvent->isShift) if (mStartSelectedCell && aMouseEvent->IsShift())
{ {
result = GetCellIndexes(mStartSelectedCell, startRowIndex, startColIndex); result = GetCellIndexes(mStartSelectedCell, startRowIndex, startColIndex);
if (NS_FAILED(result)) return result; if (NS_FAILED(result)) return result;
@ -2564,7 +2564,7 @@ printf("HandleTableSelection: Mouse UP event. mDragSelectingCells=%d, mStartSele
if (NS_FAILED(result)) if (NS_FAILED(result))
return result; return result;
if (rangeCount > 0 && aMouseEvent->isShift && if (rangeCount > 0 && aMouseEvent->IsShift() &&
mAppendStartSelectedCell && mAppendStartSelectedCell != childContent) mAppendStartSelectedCell && mAppendStartSelectedCell != childContent)
{ {
// Shift key is down: append a block selection // Shift key is down: append a block selection
@ -2583,9 +2583,9 @@ printf("HandleTableSelection: Mouse UP event. mDragSelectingCells=%d, mStartSele
// else stop table selection mode // else stop table selection mode
bool doMouseUpAction = false; bool doMouseUpAction = false;
#ifdef XP_MACOSX #ifdef XP_MACOSX
doMouseUpAction = aMouseEvent->isMeta; doMouseUpAction = aMouseEvent->IsMeta();
#else #else
doMouseUpAction = aMouseEvent->isControl; doMouseUpAction = aMouseEvent->IsControl();
#endif #endif
if (!doMouseUpAction) if (!doMouseUpAction)
{ {

View File

@ -766,7 +766,7 @@ protected:
nsIntPoint mCachedMousePoint; nsIntPoint mCachedMousePoint;
// cached modifiers // cached modifiers
PRInt8 mCachedModifiers; mozilla::widget::Modifiers mCachedModifiers;
// set to the currently active menu bar, if any // set to the currently active menu bar, if any
nsMenuBarFrame* mActiveMenuBar; nsMenuBarFrame* mActiveMenuBar;

View File

@ -161,10 +161,10 @@ nsButtonBoxFrame::DoMouseClick(nsGUIEvent* aEvent, bool aTrustEvent)
bool isAlt = false; bool isAlt = false;
bool isMeta = false; bool isMeta = false;
if(aEvent) { if(aEvent) {
isShift = ((nsInputEvent*)(aEvent))->isShift; isShift = ((nsInputEvent*)(aEvent))->IsShift();
isControl = ((nsInputEvent*)(aEvent))->isControl; isControl = ((nsInputEvent*)(aEvent))->IsControl();
isAlt = ((nsInputEvent*)(aEvent))->isAlt; isAlt = ((nsInputEvent*)(aEvent))->IsAlt();
isMeta = ((nsInputEvent*)(aEvent))->isMeta; isMeta = ((nsInputEvent*)(aEvent))->IsMeta();
} }
// Have the content handle the event, propagating it according to normal DOM rules. // Have the content handle the event, propagating it according to normal DOM rules.

View File

@ -453,15 +453,15 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
PRUint32 keyCode = keyEvent->keyCode; PRUint32 keyCode = keyEvent->keyCode;
#ifdef XP_MACOSX #ifdef XP_MACOSX
// On mac, open menulist on either up/down arrow or space (w/o Cmd pressed) // On mac, open menulist on either up/down arrow or space (w/o Cmd pressed)
if (!IsOpen() && ((keyEvent->charCode == NS_VK_SPACE && !keyEvent->isMeta) || if (!IsOpen() && ((keyEvent->charCode == NS_VK_SPACE && !keyEvent->IsMeta()) ||
(keyCode == NS_VK_UP || keyCode == NS_VK_DOWN))) { (keyCode == NS_VK_UP || keyCode == NS_VK_DOWN))) {
*aEventStatus = nsEventStatus_eConsumeNoDefault; *aEventStatus = nsEventStatus_eConsumeNoDefault;
OpenMenu(false); OpenMenu(false);
} }
#else #else
// On other platforms, toggle menulist on unmodified F4 or Alt arrow // On other platforms, toggle menulist on unmodified F4 or Alt arrow
if ((keyCode == NS_VK_F4 && !keyEvent->isAlt) || if ((keyCode == NS_VK_F4 && !keyEvent->IsAlt()) ||
((keyCode == NS_VK_UP || keyCode == NS_VK_DOWN) && keyEvent->isAlt)) { ((keyCode == NS_VK_UP || keyCode == NS_VK_DOWN) && keyEvent->IsAlt())) {
*aEventStatus = nsEventStatus_eConsumeNoDefault; *aEventStatus = nsEventStatus_eConsumeNoDefault;
ToggleMenuState(); ToggleMenuState();
} }
@ -1266,10 +1266,10 @@ nsMenuFrame::CreateMenuCommandEvent(nsGUIEvent *aEvent, bool aFlipChecked)
bool shift = false, control = false, alt = false, meta = false; bool shift = false, control = false, alt = false, meta = false;
if (aEvent && (aEvent->eventStructType == NS_MOUSE_EVENT || if (aEvent && (aEvent->eventStructType == NS_MOUSE_EVENT ||
aEvent->eventStructType == NS_KEY_EVENT)) { aEvent->eventStructType == NS_KEY_EVENT)) {
shift = static_cast<nsInputEvent *>(aEvent)->isShift; shift = static_cast<nsInputEvent *>(aEvent)->IsShift();
control = static_cast<nsInputEvent *>(aEvent)->isControl; control = static_cast<nsInputEvent *>(aEvent)->IsControl();
alt = static_cast<nsInputEvent *>(aEvent)->isAlt; alt = static_cast<nsInputEvent *>(aEvent)->IsAlt();
meta = static_cast<nsInputEvent *>(aEvent)->isMeta; meta = static_cast<nsInputEvent *>(aEvent)->IsMeta();
} }
// Because the command event is firing asynchronously, a flag is needed to // Because the command event is firing asynchronously, a flag is needed to

View File

@ -548,9 +548,9 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
nsMouseEvent::eLeftButton && nsMouseEvent::eLeftButton &&
#ifdef XP_MACOSX #ifdef XP_MACOSX
// On Mac the option key inverts the scroll-to-here preference. // On Mac the option key inverts the scroll-to-here preference.
(static_cast<nsMouseEvent*>(aEvent)->isAlt != GetScrollToClick())) || (static_cast<nsMouseEvent*>(aEvent)->IsAlt() != GetScrollToClick())) ||
#else #else
(static_cast<nsMouseEvent*>(aEvent)->isShift != GetScrollToClick())) || (static_cast<nsMouseEvent*>(aEvent)->IsShift() != GetScrollToClick())) ||
#endif #endif
(gMiddlePref && aEvent->message == NS_MOUSE_BUTTON_DOWN && (gMiddlePref && aEvent->message == NS_MOUSE_BUTTON_DOWN &&
static_cast<nsMouseEvent*>(aEvent)->button == static_cast<nsMouseEvent*>(aEvent)->button ==
@ -1003,9 +1003,9 @@ nsSliderFrame::HandlePress(nsPresContext* aPresContext,
{ {
#ifdef XP_MACOSX #ifdef XP_MACOSX
// On Mac the option key inverts the scroll-to-here preference. // On Mac the option key inverts the scroll-to-here preference.
if (((nsMouseEvent *)aEvent)->isAlt != GetScrollToClick()) if (((nsMouseEvent *)aEvent)->IsAlt() != GetScrollToClick())
#else #else
if (((nsMouseEvent *)aEvent)->isShift != GetScrollToClick()) if (((nsMouseEvent *)aEvent)->IsShift() != GetScrollToClick())
#endif #endif
return NS_OK; return NS_OK;

View File

@ -72,11 +72,6 @@
using namespace mozilla; using namespace mozilla;
#define FLAG_ALT 0x01
#define FLAG_CONTROL 0x02
#define FLAG_SHIFT 0x04
#define FLAG_META 0x08
const nsNavigationDirection DirectionFromKeyCodeTable[2][6] = { const nsNavigationDirection DirectionFromKeyCodeTable[2][6] = {
{ {
eNavigationDirection_Last, // NS_VK_END eNavigationDirection_Last, // NS_VK_END
@ -480,19 +475,7 @@ nsXULPopupManager::InitTriggerEvent(nsIDOMEvent* aEvent, nsIContent* aPopup,
if (event) { if (event) {
if (event->eventStructType == NS_MOUSE_EVENT || if (event->eventStructType == NS_MOUSE_EVENT ||
event->eventStructType == NS_KEY_EVENT) { event->eventStructType == NS_KEY_EVENT) {
nsInputEvent* inputEvent = static_cast<nsInputEvent*>(event); mCachedModifiers = static_cast<nsInputEvent*>(event)->modifiers;
if (inputEvent->isAlt) {
mCachedModifiers |= FLAG_ALT;
}
if (inputEvent->isControl) {
mCachedModifiers |= FLAG_CONTROL;
}
if (inputEvent->isShift) {
mCachedModifiers |= FLAG_SHIFT;
}
if (inputEvent->isMeta) {
mCachedModifiers |= FLAG_META;
}
} }
nsIDocument* doc = aPopup->GetCurrentDoc(); nsIDocument* doc = aPopup->GetCurrentDoc();
if (doc) { if (doc) {
@ -1200,12 +1183,7 @@ nsXULPopupManager::FirePopupShowingEvent(nsIContent* aPopup,
} }
event.refPoint = mCachedMousePoint; event.refPoint = mCachedMousePoint;
event.modifiers = mCachedModifiers;
event.isAlt = !!(mCachedModifiers & FLAG_ALT);
event.isControl = !!(mCachedModifiers & FLAG_CONTROL);
event.isShift = !!(mCachedModifiers & FLAG_SHIFT);
event.isMeta = !!(mCachedModifiers & FLAG_META);
nsEventDispatcher::Dispatch(popup, presContext, &event, nsnull, &status); nsEventDispatcher::Dispatch(popup, presContext, &event, nsnull, &status);
mCachedMousePoint = nsIntPoint(0, 0); mCachedMousePoint = nsIntPoint(0, 0);

View File

@ -1462,10 +1462,7 @@ nsWindow::DispatchMultitouchEvent(nsTouchEvent &event, AndroidGeckoEvent *ae)
{ {
nsIntPoint offset = WidgetToScreenOffset(); nsIntPoint offset = WidgetToScreenOffset();
event.isShift = false; event.modifiers = 0;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
event.time = ae->Time(); event.time = ae->Time();
int action = ae->Action() & AndroidMotionEvent::ACTION_MASK; int action = ae->Action() & AndroidMotionEvent::ACTION_MASK;
@ -1580,10 +1577,7 @@ nsWindow::DispatchGestureEvent(PRUint32 msg, PRUint32 direction, double delta,
{ {
nsSimpleGestureEvent event(true, msg, this, direction, delta); nsSimpleGestureEvent event(true, msg, this, direction, delta);
event.isShift = false; event.modifiers = 0;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
event.time = time; event.time = time;
event.refPoint = refPoint; event.refPoint = refPoint;
@ -1597,10 +1591,7 @@ nsWindow::DispatchMotionEvent(nsInputEvent &event, AndroidGeckoEvent *ae,
{ {
nsIntPoint offset = WidgetToScreenOffset(); nsIntPoint offset = WidgetToScreenOffset();
event.isShift = false; event.modifiers = 0;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
event.time = ae->Time(); event.time = ae->Time();
// XXX possibly bound the range of event.refPoint here. // XXX possibly bound the range of event.refPoint here.
@ -1762,10 +1753,10 @@ nsWindow::InitKeyEvent(nsKeyEvent& event, AndroidGeckoEvent& key,
event.pluginEvent = pluginEvent; event.pluginEvent = pluginEvent;
} }
event.isShift = key.IsShiftPressed(); event.InitBasicModifiers(gMenu,
event.isControl = gMenu; key.IsAltPressed(),
event.isAlt = key.IsAltPressed(); key.IsShiftPressed(),
event.isMeta = false; false);
event.time = key.Time(); event.time = key.Time();
if (gMenu) if (gMenu)
@ -1893,7 +1884,7 @@ nsWindow::OnKeyEvent(AndroidGeckoEvent *ae)
pressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT; pressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
} }
#ifdef DEBUG_ANDROID_WIDGET #ifdef DEBUG_ANDROID_WIDGET
__android_log_print(ANDROID_LOG_INFO, "Gecko", "Dispatching key pressEvent with keyCode %d charCode %d shift %d alt %d sym/ctrl %d metamask %d", pressEvent.keyCode, pressEvent.charCode, pressEvent.isShift, pressEvent.isAlt, pressEvent.isControl, ae->MetaState()); __android_log_print(ANDROID_LOG_INFO, "Gecko", "Dispatching key pressEvent with keyCode %d charCode %d shift %d alt %d sym/ctrl %d metamask %d", pressEvent.keyCode, pressEvent.charCode, pressEvent.IsShift(), pressEvent.IsAlt(), pressEvent.IsControl(), ae->MetaState());
#endif #endif
DispatchEvent(&pressEvent); DispatchEvent(&pressEvent);
} }

View File

@ -148,10 +148,6 @@ sendMouseEvent(PRUint32 msg, uint64_t timeMs, int x, int y)
event.refPoint.x = x; event.refPoint.x = x;
event.refPoint.y = y; event.refPoint.y = y;
event.time = timeMs; event.time = timeMs;
event.isShift = false;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
event.button = nsMouseEvent::eLeftButton; event.button = nsMouseEvent::eLeftButton;
if (msg != NS_MOUSE_MOVE) if (msg != NS_MOUSE_MOVE)
event.clickCount = 1; event.clickCount = 1;
@ -199,10 +195,6 @@ sendTouchEvent(UserInputData& data)
nsTouchEvent event(true, msg, NULL); nsTouchEvent event(true, msg, NULL);
event.time = data.timeMs; event.time = data.timeMs;
event.isShift = false;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
int32_t i; int32_t i;
if (msg == NS_TOUCH_END) { if (msg == NS_TOUCH_END) {

View File

@ -296,7 +296,7 @@ nsNativeKeyBindings::KeyPress(const nsNativeKeyEvent& aEvent,
} }
for (PRUint32 i = 0; i < nativeKeyEvent->alternativeCharCodes.Length(); ++i) { for (PRUint32 i = 0; i < nativeKeyEvent->alternativeCharCodes.Length(); ++i) {
PRUint32 ch = nativeKeyEvent->isShift ? PRUint32 ch = nativeKeyEvent->IsShift() ?
nativeKeyEvent->alternativeCharCodes[i].mShiftedCharCode : nativeKeyEvent->alternativeCharCodes[i].mShiftedCharCode :
nativeKeyEvent->alternativeCharCodes[i].mUnshiftedCharCode; nativeKeyEvent->alternativeCharCodes[i].mUnshiftedCharCode;
if (ch && ch != aEvent.charCode) { if (ch && ch != aEvent.charCode) {

View File

@ -6099,10 +6099,12 @@ get_inner_gdk_window (GdkWindow *aWindow,
static inline bool static inline bool
is_context_menu_key(const nsKeyEvent& aKeyEvent) is_context_menu_key(const nsKeyEvent& aKeyEvent)
{ {
return ((aKeyEvent.keyCode == NS_VK_F10 && aKeyEvent.isShift && return ((aKeyEvent.keyCode == NS_VK_F10 && aKeyEvent.IsShift() &&
!aKeyEvent.isControl && !aKeyEvent.isMeta && !aKeyEvent.isAlt) || !aKeyEvent.IsControl() && !aKeyEvent.IsMeta() &&
(aKeyEvent.keyCode == NS_VK_CONTEXT_MENU && !aKeyEvent.isShift && !aKeyEvent.IsAlt()) ||
!aKeyEvent.isControl && !aKeyEvent.isMeta && !aKeyEvent.isAlt)); (aKeyEvent.keyCode == NS_VK_CONTEXT_MENU && !aKeyEvent.IsShift() &&
!aKeyEvent.IsControl() && !aKeyEvent.IsMeta() &&
!aKeyEvent.IsAlt()));
} }
static int static int

View File

@ -2145,14 +2145,10 @@ bool nsWindow::OnMouseChord(MPARAM mp1, MPARAM mp2)
event.keyCode = NS_VK_INSERT; event.keyCode = NS_VK_INSERT;
if (isCopy) { if (isCopy) {
event.isShift = false; event.modifiers = widget::MODIFIER_CONTROL;
event.isControl = true;
} else { } else {
event.isShift = true; event.modifiers = widget::MODIFIER_SHIFT;
event.isControl = false;
} }
event.isAlt = false;
event.isMeta = false;
event.eventStructType = NS_KEY_EVENT; event.eventStructType = NS_KEY_EVENT;
event.charCode = 0; event.charCode = 0;
@ -2160,13 +2156,13 @@ bool nsWindow::OnMouseChord(MPARAM mp1, MPARAM mp2)
if (SHORT1FROMMP(mp1) & (KC_VIRTUALKEY | KC_KEYUP | KC_LONEKEY)) { if (SHORT1FROMMP(mp1) & (KC_VIRTUALKEY | KC_KEYUP | KC_LONEKEY)) {
USHORT usVKey = SHORT2FROMMP(mp2); USHORT usVKey = SHORT2FROMMP(mp2);
if (usVKey == VK_SHIFT) { if (usVKey == VK_SHIFT) {
event.isShift = true; event.modifiers |= widget::MODIFIER_SHIFT;
} }
if (usVKey == VK_CTRL) { if (usVKey == VK_CTRL) {
event.isControl = true; event.modifiers |= widget::MODIFIER_CONTROL;
} }
if (usVKey == VK_ALTGRAF || usVKey == VK_ALT) { if (usVKey == VK_ALTGRAF || usVKey == VK_ALT) {
event.isAlt = true; event.modifiers |= widget::MODIFIER_ALT;
} }
} }
@ -2462,10 +2458,8 @@ bool nsWindow::DispatchKeyEvent(MPARAM mp1, MPARAM mp2)
this); this);
InitEvent(event, &point); InitEvent(event, &point);
event.keyCode = WMChar2KeyCode(mp1, mp2); event.keyCode = WMChar2KeyCode(mp1, mp2);
event.isShift = (fsFlags & KC_SHIFT) ? true : false; event.InitBasicModifiers(fsFlags & KC_CTRL, fsFlags & KC_ALT,
event.isControl = (fsFlags & KC_CTRL) ? true : false; fsFlags & KC_SHIFT, false);
event.isAlt = (fsFlags & KC_ALT) ? true : false;
event.isMeta = false;
event.charCode = 0; event.charCode = 0;
// Check for a scroll mouse event vs. a keyboard event. The way we know // Check for a scroll mouse event vs. a keyboard event. The way we know
@ -2522,15 +2516,15 @@ bool nsWindow::DispatchKeyEvent(MPARAM mp1, MPARAM mp2)
pressEvent.charCode = outbuf[0]; pressEvent.charCode = outbuf[0];
if (pressEvent.isControl && !(fsFlags & (KC_VIRTUALKEY | KC_DEADKEY))) { if (pressEvent.IsControl() && !(fsFlags & (KC_VIRTUALKEY | KC_DEADKEY))) {
if (!pressEvent.isShift && (pressEvent.charCode >= 'A' && pressEvent.charCode <= 'Z')) { if (!pressEvent.IsShift() && (pressEvent.charCode >= 'A' && pressEvent.charCode <= 'Z')) {
pressEvent.charCode = tolower(pressEvent.charCode); pressEvent.charCode = tolower(pressEvent.charCode);
} }
if (pressEvent.isShift && (pressEvent.charCode >= 'a' && pressEvent.charCode <= 'z')) { if (pressEvent.IsShift() && (pressEvent.charCode >= 'a' && pressEvent.charCode <= 'z')) {
pressEvent.charCode = toupper(pressEvent.charCode); pressEvent.charCode = toupper(pressEvent.charCode);
} }
pressEvent.keyCode = 0; pressEvent.keyCode = 0;
} else if (!pressEvent.isControl && !pressEvent.isAlt && pressEvent.charCode != 0) { } else if (!pressEvent.IsControl() && !pressEvent.IsAlt() && pressEvent.charCode != 0) {
if (!(fsFlags & KC_VIRTUALKEY) || // not virtual key if (!(fsFlags & KC_VIRTUALKEY) || // not virtual key
((fsFlags & KC_CHAR) && !pressEvent.keyCode)) { ((fsFlags & KC_CHAR) && !pressEvent.keyCode)) {
pressEvent.keyCode = 0; pressEvent.keyCode = 0;
@ -2799,10 +2793,9 @@ bool nsWindow::DispatchDragDropEvent(PRUint32 aMsg)
nsDragEvent event(true, aMsg, this); nsDragEvent event(true, aMsg, this);
InitEvent(event); InitEvent(event);
event.isShift = isKeyDown(VK_SHIFT); event.InitBasicModifiers(isKeyDown(VK_CTRL),
event.isControl = isKeyDown(VK_CTRL); isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF),
event.isAlt = isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF); isKeyDown(VK_SHIFT), false);
event.isMeta = false;
return DispatchWindowEvent(&event); return DispatchWindowEvent(&event);
} }
@ -2875,9 +2868,9 @@ bool nsWindow::DispatchMouseEvent(PRUint32 aEventType, MPARAM mp1, MPARAM mp2,
} }
InitEvent(event, nsnull); InitEvent(event, nsnull);
event.isShift = isKeyDown(VK_SHIFT); event.InitBasicModifiers(isKeyDown(VK_CTRL),
event.isControl = isKeyDown(VK_CTRL); isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF),
event.isAlt = isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF); isKeyDown(VK_SHIFT), false);
} else { } else {
POINTL ptl; POINTL ptl;
if (aEventType == NS_CONTEXTMENU && aIsContextMenuKey) { if (aEventType == NS_CONTEXTMENU && aIsContextMenuKey) {
@ -2892,11 +2885,9 @@ bool nsWindow::DispatchMouseEvent(PRUint32 aEventType, MPARAM mp1, MPARAM mp2,
InitEvent(event, &pt); InitEvent(event, &pt);
USHORT usFlags = SHORT2FROMMP(mp2); USHORT usFlags = SHORT2FROMMP(mp2);
event.isShift = (usFlags & KC_SHIFT) ? true : false; event.InitBasicModifiers(usFlags & KC_CTRL, usFlags & KC_ALT,
event.isControl = (usFlags & KC_CTRL) ? true : false; usFlags & KC_SHIFT, false);
event.isAlt = (usFlags & KC_ALT) ? true : false;
} }
event.isMeta = false;
// Dblclicks are used to set the click count, then changed to mousedowns // Dblclicks are used to set the click count, then changed to mousedowns
if (aEventType == NS_MOUSE_DOUBLECLICK && if (aEventType == NS_MOUSE_DOUBLECLICK &&
@ -3010,10 +3001,9 @@ bool nsWindow::DispatchScrollEvent(ULONG msg, MPARAM mp1, MPARAM mp2)
nsMouseScrollEvent scrollEvent(true, NS_MOUSE_SCROLL, this); nsMouseScrollEvent scrollEvent(true, NS_MOUSE_SCROLL, this);
InitEvent(scrollEvent); InitEvent(scrollEvent);
scrollEvent.isShift = isKeyDown(VK_SHIFT); scrollEvent.InitBasicModifiers(isKeyDown(VK_CTRL),
scrollEvent.isControl = isKeyDown(VK_CTRL); isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF),
scrollEvent.isAlt = isKeyDown(VK_ALT) || isKeyDown(VK_ALTGRAF); isKeyDown(VK_SHIFT), false);
scrollEvent.isMeta = false;
scrollEvent.scrollFlags = (msg == WM_HSCROLL) ? scrollEvent.scrollFlags = (msg == WM_HSCROLL) ?
nsMouseScrollEvent::kIsHorizontal : nsMouseScrollEvent::kIsHorizontal :
nsMouseScrollEvent::kIsVertical; nsMouseScrollEvent::kIsVertical;

View File

@ -213,15 +213,14 @@ isContextMenuKeyEvent(const QKeyEvent *qe)
static void static void
InitKeyEvent(nsKeyEvent &aEvent, QKeyEvent *aQEvent) InitKeyEvent(nsKeyEvent &aEvent, QKeyEvent *aQEvent)
{ {
aEvent.isShift = (aQEvent->modifiers() & Qt::ShiftModifier) ? true : false; aEvent.InitBasicModifiers(aQEvent->modifiers() & Qt::ControlModifier,
aEvent.isControl = (aQEvent->modifiers() & Qt::ControlModifier) ? true : false; aQEvent->modifiers() & Qt::AltModifier,
aEvent.isAlt = (aQEvent->modifiers() & Qt::AltModifier) ? true : false; aQEvent->modifiers() & Qt::ShiftModifier,
aEvent.isMeta = (aQEvent->modifiers() & Qt::MetaModifier) ? true : false; aQEvent->modifiers() & Qt::MetaModifier);
aEvent.time = 0; aEvent.time = 0;
if (sAltGrModifier) { if (sAltGrModifier) {
aEvent.isControl = true; aEvent.modifiers |= (widget::MODIFIER_CONTROL | widget::MODIFIER_ALT);
aEvent.isAlt = true;
} }
// The transformations above and in qt for the keyval are not invertible // The transformations above and in qt for the keyval are not invertible
@ -1354,10 +1353,10 @@ nsWindow::InitButtonEvent(nsMouseEvent &aMoveEvent,
aMoveEvent.refPoint.x = nscoord(aEvent->pos().x()); aMoveEvent.refPoint.x = nscoord(aEvent->pos().x());
aMoveEvent.refPoint.y = nscoord(aEvent->pos().y()); aMoveEvent.refPoint.y = nscoord(aEvent->pos().y());
aMoveEvent.isShift = ((aEvent->modifiers() & Qt::ShiftModifier) != 0); aMoveEvent.InitBasicModifiers(aEvent->modifiers() & Qt::ControlModifier,
aMoveEvent.isControl = ((aEvent->modifiers() & Qt::ControlModifier) != 0); aEvent->modifiers() & Qt::AltModifier,
aMoveEvent.isAlt = ((aEvent->modifiers() & Qt::AltModifier) != 0); aEvent->modifiers() & Qt::ShiftModifier,
aMoveEvent.isMeta = ((aEvent->modifiers() & Qt::MetaModifier) != 0); aEvent->modifiers() & Qt::MetaModifier);
aMoveEvent.clickCount = aClickCount; aMoveEvent.clickCount = aClickCount;
} }
@ -1758,9 +1757,9 @@ nsWindow::OnKeyPressEvent(QKeyEvent *aEvent)
// At that time, we need to reset the modifiers // At that time, we need to reset the modifiers
// because nsEditor will not accept a key event // because nsEditor will not accept a key event
// for text input if one or more modifiers are set. // for text input if one or more modifiers are set.
event.isControl = false; event.modifiers &= ~(widget::MODIFIER_CONTROL |
event.isAlt = false; widget::MODIFIER_ALT |
event.isMeta = false; widget::MODIFIER_META);
} }
KeySym keysym = NoSymbol; KeySym keysym = NoSymbol;
@ -1994,10 +1993,10 @@ nsWindow::OnScrollEvent(QGraphicsSceneWheelEvent *aEvent)
event.refPoint.x = nscoord(aEvent->scenePos().x()); event.refPoint.x = nscoord(aEvent->scenePos().x());
event.refPoint.y = nscoord(aEvent->scenePos().y()); event.refPoint.y = nscoord(aEvent->scenePos().y());
event.isShift = aEvent->modifiers() & Qt::ShiftModifier; event.InitBasicModifiers(aEvent->modifiers() & Qt::ControlModifier,
event.isControl = aEvent->modifiers() & Qt::ControlModifier; aEvent->modifiers() & Qt::AltModifier,
event.isAlt = aEvent->modifiers() & Qt::AltModifier; aEvent->modifiers() & Qt::ShiftModifier,
event.isMeta = aEvent->modifiers() & Qt::MetaModifier; aEvent->modifiers() & Qt::MetaModifier);
event.time = 0; event.time = 0;
return DispatchEvent(&event); return DispatchEvent(&event);
@ -2142,10 +2141,10 @@ nsWindow::DispatchGestureEvent(PRUint32 aMsg, PRUint32 aDirection,
Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers(); Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers();
mozGesture.isShift = (modifiers & Qt::ShiftModifier) ? true : false; mozGesture.InitBasicModifiers(modifiers & Qt::ControlModifier,
mozGesture.isControl = (modifiers & Qt::ControlModifier) ? true : false; modifiers & Qt::AltModifier,
mozGesture.isMeta = false; modifiers & Qt::ShiftModifier,
mozGesture.isAlt = (modifiers & Qt::AltModifier) ? true : false; false);
mozGesture.button = 0; mozGesture.button = 0;
mozGesture.time = 0; mozGesture.time = 0;
@ -2603,10 +2602,12 @@ initialize_prefs(void)
inline bool inline bool
is_context_menu_key(const nsKeyEvent& aKeyEvent) is_context_menu_key(const nsKeyEvent& aKeyEvent)
{ {
return ((aKeyEvent.keyCode == NS_VK_F10 && aKeyEvent.isShift && return ((aKeyEvent.keyCode == NS_VK_F10 && aKeyEvent.IsShift() &&
!aKeyEvent.isControl && !aKeyEvent.isMeta && !aKeyEvent.isAlt) || !aKeyEvent.IsControl() && !aKeyEvent.IsMeta() &&
(aKeyEvent.keyCode == NS_VK_CONTEXT_MENU && !aKeyEvent.isShift && !aKeyEvent.IsAlt()) ||
!aKeyEvent.isControl && !aKeyEvent.isMeta && !aKeyEvent.isAlt)); (aKeyEvent.keyCode == NS_VK_CONTEXT_MENU && !aKeyEvent.IsShift() &&
!aKeyEvent.IsControl() && !aKeyEvent.IsMeta() &&
!aKeyEvent.IsAlt()));
} }
void void
@ -2614,10 +2615,7 @@ key_event_to_context_menu_event(nsMouseEvent &aEvent,
QKeyEvent *aGdkEvent) QKeyEvent *aGdkEvent)
{ {
aEvent.refPoint = nsIntPoint(0, 0); aEvent.refPoint = nsIntPoint(0, 0);
aEvent.isShift = false; aEvent.modifiers = 0;
aEvent.isControl = false;
aEvent.isAlt = false;
aEvent.isMeta = false;
aEvent.time = 0; aEvent.time = 0;
aEvent.clickCount = 1; aEvent.clickCount = 1;
} }

View File

@ -419,10 +419,10 @@ private:
event.refPoint.x = nscoord(mMoveEvent.pos.x()); event.refPoint.x = nscoord(mMoveEvent.pos.x());
event.refPoint.y = nscoord(mMoveEvent.pos.y()); event.refPoint.y = nscoord(mMoveEvent.pos.y());
event.isShift = ((mMoveEvent.modifiers & Qt::ShiftModifier) != 0); event.InitBasicModifiers(mMoveEvent.modifiers & Qt::ControlModifier,
event.isControl = ((mMoveEvent.modifiers & Qt::ControlModifier) != 0); mMoveEvent.modifiers & Qt::AltModifier,
event.isAlt = ((mMoveEvent.modifiers & Qt::AltModifier) != 0); mMoveEvent.modifiers & Qt::ShiftModifier,
event.isMeta = ((mMoveEvent.modifiers & Qt::MetaModifier) != 0); mMoveEvent.modifiers & Qt::MetaModifier);
event.clickCount = 0; event.clickCount = 0;
DispatchEvent(&event); DispatchEvent(&event);

View File

@ -795,10 +795,10 @@ MouseScrollHandler::HandleScrollMessageAsMouseWheelMessage(nsWindow* aWindow,
aWindow, (aMessage == MOZ_WM_VSCROLL) ? "V" : "H", aWindow, (aMessage == MOZ_WM_VSCROLL) ? "V" : "H",
aWParam, aLParam, scrollEvent.refPoint.x, scrollEvent.refPoint.y, aWParam, aLParam, scrollEvent.refPoint.x, scrollEvent.refPoint.y,
scrollEvent.delta, scrollEvent.scrollFlags, scrollEvent.delta, scrollEvent.scrollFlags,
GetBoolName(scrollEvent.isShift), GetBoolName(scrollEvent.IsShift()),
GetBoolName(scrollEvent.isControl), GetBoolName(scrollEvent.IsControl()),
GetBoolName(scrollEvent.isAlt), GetBoolName(scrollEvent.IsAlt()),
GetBoolName(scrollEvent.isMeta))); GetBoolName(scrollEvent.IsMeta())));
DispatchEvent(aWindow, scrollEvent); DispatchEvent(aWindow, scrollEvent);
} }
@ -966,10 +966,10 @@ MouseScrollHandler::LastEventInfo::InitMouseScrollEvent(
"isMeta: %s }, mRemainingDeltaForScroll: %d", "isMeta: %s }, mRemainingDeltaForScroll: %d",
aWindow, aMouseScrollEvent.refPoint.x, aMouseScrollEvent.refPoint.y, aWindow, aMouseScrollEvent.refPoint.x, aMouseScrollEvent.refPoint.y,
aMouseScrollEvent.delta, aMouseScrollEvent.scrollFlags, aMouseScrollEvent.delta, aMouseScrollEvent.scrollFlags,
GetBoolName(aMouseScrollEvent.isShift), GetBoolName(aMouseScrollEvent.IsShift()),
GetBoolName(aMouseScrollEvent.isControl), GetBoolName(aMouseScrollEvent.IsControl()),
GetBoolName(aMouseScrollEvent.isAlt), GetBoolName(aMouseScrollEvent.IsAlt()),
GetBoolName(aMouseScrollEvent.isMeta), mRemainingDeltaForScroll)); GetBoolName(aMouseScrollEvent.IsMeta()), mRemainingDeltaForScroll));
return (aMouseScrollEvent.delta != 0); return (aMouseScrollEvent.delta != 0);
} }
@ -1036,10 +1036,10 @@ MouseScrollHandler::LastEventInfo::InitMousePixelScrollEvent(
"isMeta: %s }, mRemainingDeltaForScroll: %d", "isMeta: %s }, mRemainingDeltaForScroll: %d",
aWindow, aPixelScrollEvent.refPoint.x, aPixelScrollEvent.refPoint.y, aWindow, aPixelScrollEvent.refPoint.x, aPixelScrollEvent.refPoint.y,
aPixelScrollEvent.delta, aPixelScrollEvent.scrollFlags, aPixelScrollEvent.delta, aPixelScrollEvent.scrollFlags,
GetBoolName(aPixelScrollEvent.isShift), GetBoolName(aPixelScrollEvent.IsShift()),
GetBoolName(aPixelScrollEvent.isControl), GetBoolName(aPixelScrollEvent.IsControl()),
GetBoolName(aPixelScrollEvent.isAlt), GetBoolName(aPixelScrollEvent.IsAlt()),
GetBoolName(aPixelScrollEvent.isMeta), mRemainingDeltaForPixel)); GetBoolName(aPixelScrollEvent.IsMeta()), mRemainingDeltaForPixel));
return (aPixelScrollEvent.delta != 0); return (aPixelScrollEvent.delta != 0);
} }