mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 1347073 Get rid of UIEvent.isChar since it's not initialized properly on most platforms and the other browsers don't support this r=smaug
UIEvent.isChar is not supported by the other browsers and the value isn't initialized any platforms except on macOS. So, the value isn't useful and we have no reason to keep it. MozReview-Commit-ID: 4BLpo88gSZj --HG-- extra : rebase_source : ca950f8cb618a0cadc99ba4c80b5a8df94a20f27
This commit is contained in:
parent
85f46a7ab4
commit
87d8470a52
@ -35,7 +35,6 @@
|
||||
/** @type {number} */ Event.prototype.clientY;
|
||||
/** @type {boolean} */ Event.prototype.ctrlKey;
|
||||
/** @type {EventTarget} */ Event.prototype.explicitOriginalTarget;
|
||||
/** @type {boolean} */ Event.prototype.isChar;
|
||||
/** @type {number} */ Event.prototype.keyCode;
|
||||
/** @type {number} */ Event.prototype.layerX;
|
||||
/** @type {number} */ Event.prototype.layerY;
|
||||
|
@ -329,20 +329,6 @@ UIEvent::GetLayerY(int32_t* aLayerY)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
UIEvent::GetIsChar(bool* aIsChar)
|
||||
{
|
||||
*aIsChar = IsChar();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
UIEvent::IsChar() const
|
||||
{
|
||||
WidgetKeyboardEvent* keyEvent = mEvent->AsKeyboardEvent();
|
||||
return keyEvent ? keyEvent->mIsChar : false;
|
||||
}
|
||||
|
||||
mozilla::dom::Event*
|
||||
UIEvent::AsEvent(void)
|
||||
{
|
||||
|
@ -93,8 +93,6 @@ public:
|
||||
|
||||
int32_t RangeOffset() const;
|
||||
|
||||
bool IsChar() const;
|
||||
|
||||
protected:
|
||||
~UIEvent() {}
|
||||
|
||||
|
@ -49,7 +49,5 @@ interface nsIDOMUIEvent : nsISupports
|
||||
readonly attribute nsIDOMNode rangeParent;
|
||||
readonly attribute long rangeOffset;
|
||||
|
||||
readonly attribute boolean isChar;
|
||||
|
||||
[notxpcom, nostdcall] EventPtr AsEvent();
|
||||
};
|
||||
|
@ -34,7 +34,6 @@ partial interface UIEvent {
|
||||
readonly attribute unsigned long which;
|
||||
readonly attribute Node? rangeParent;
|
||||
readonly attribute long rangeOffset;
|
||||
readonly attribute boolean isChar;
|
||||
};
|
||||
|
||||
dictionary UIEventInit : EventInit
|
||||
|
@ -126,7 +126,6 @@ protected:
|
||||
, mKeyNameIndex(KEY_NAME_INDEX_Unidentified)
|
||||
, mCodeNameIndex(CODE_NAME_INDEX_UNKNOWN)
|
||||
, mInputMethodAppState(eNotHandled)
|
||||
, mIsChar(false)
|
||||
, mIsRepeat(false)
|
||||
, mIsComposing(false)
|
||||
, mIsReserved(false)
|
||||
@ -155,7 +154,6 @@ public:
|
||||
, mKeyNameIndex(KEY_NAME_INDEX_Unidentified)
|
||||
, mCodeNameIndex(CODE_NAME_INDEX_UNKNOWN)
|
||||
, mInputMethodAppState(eNotHandled)
|
||||
, mIsChar(false)
|
||||
, mIsRepeat(false)
|
||||
, mIsComposing(false)
|
||||
, mIsReserved(false)
|
||||
@ -268,8 +266,6 @@ public:
|
||||
};
|
||||
InputMethodAppState mInputMethodAppState;
|
||||
|
||||
// Indicates whether the event signifies a printable character
|
||||
bool mIsChar;
|
||||
// Indicates whether the event is generated by auto repeat or not.
|
||||
// if this is keyup event, always false.
|
||||
bool mIsRepeat;
|
||||
@ -392,7 +388,6 @@ public:
|
||||
mPseudoCharCode = aEvent.mPseudoCharCode;
|
||||
mLocation = aEvent.mLocation;
|
||||
mAlternativeCharCodes = aEvent.mAlternativeCharCodes;
|
||||
mIsChar = aEvent.mIsChar;
|
||||
mIsRepeat = aEvent.mIsRepeat;
|
||||
mIsComposing = aEvent.mIsComposing;
|
||||
mIsReserved = aEvent.mIsReserved;
|
||||
|
@ -942,7 +942,6 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
||||
}
|
||||
|
||||
aKeyEvent.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
aKeyEvent.mIsChar = false; // XXX not used in XP level
|
||||
|
||||
UInt32 kbType = GetKbdType();
|
||||
UInt32 nativeKeyCode = [aNativeKeyEvent keyCode];
|
||||
@ -1126,8 +1125,6 @@ TISInputSourceWrapper::WillDispatchKeyboardEvent(
|
||||
uint32_t charCode =
|
||||
insertStringForCharCode.IsEmpty() ? 0 : insertStringForCharCode[0];
|
||||
aKeyEvent.SetCharCode(charCode);
|
||||
// this is not a special key XXX not used in XP
|
||||
aKeyEvent.mIsChar = (aKeyEvent.mMessage == eKeyPress);
|
||||
|
||||
MOZ_LOG(gLog, LogLevel::Info,
|
||||
("%p TISInputSourceWrapper::WillDispatchKeyboardEvent, "
|
||||
@ -2317,7 +2314,6 @@ TextInputHandler::InsertText(NSAttributedString* aAttrString,
|
||||
// string? If it wants to delete the specified range, should we
|
||||
// dispatch an eContentCommandDelete event instead? Because this
|
||||
// must not be caused by a key operation, a part of IME's processing.
|
||||
keypressEvent.mIsChar = IsPrintableChar(str.CharAt(0));
|
||||
|
||||
// Don't set other modifiers from the current event, because here in
|
||||
// -insertText: they've already been taken into account in creating
|
||||
|
@ -302,7 +302,6 @@ KeyEventDispatcher::DispatchKeyEventInternal(EventMessage aEventMessage)
|
||||
if (!event.mCharCode) {
|
||||
event.mKeyCode = mDOMKeyCode;
|
||||
}
|
||||
event.mIsChar = !!event.mCharCode;
|
||||
event.mIsRepeat = IsRepeat();
|
||||
event.mKeyNameIndex = mDOMKeyNameIndex;
|
||||
if (mDOMPrintableKeyValue) {
|
||||
|
@ -421,7 +421,6 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
||||
WriteParam(aMsg, aParam.mCharCode);
|
||||
WriteParam(aMsg, aParam.mPseudoCharCode);
|
||||
WriteParam(aMsg, aParam.mAlternativeCharCodes);
|
||||
WriteParam(aMsg, aParam.mIsChar);
|
||||
WriteParam(aMsg, aParam.mIsRepeat);
|
||||
WriteParam(aMsg, aParam.mIsReserved);
|
||||
WriteParam(aMsg, aParam.mAccessKeyForwardedToChild);
|
||||
@ -457,7 +456,6 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
||||
ReadParam(aMsg, aIter, &aResult->mCharCode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mPseudoCharCode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mAlternativeCharCodes) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mIsChar) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mIsReserved) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mAccessKeyForwardedToChild) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user