Bug 960871 part.3 Remove WidgetTextEvent::isChar since it's always false on all platforms r=smaug

This commit is contained in:
Masayuki Nakano 2014-10-07 19:01:47 +09:00
parent aafe327f6d
commit c3e6df2ad3
3 changed files with 1 additions and 15 deletions

View File

@ -344,11 +344,7 @@ bool
UIEvent::IsChar() const
{
WidgetKeyboardEvent* keyEvent = mEvent->AsKeyboardEvent();
if (keyEvent) {
return keyEvent->isChar;
}
WidgetTextEvent* textEvent = mEvent->AsTextEvent();
return textEvent ? textEvent->isChar : false;
return keyEvent ? keyEvent->isChar : false;
}
NS_IMETHODIMP

View File

@ -213,7 +213,6 @@ private:
WidgetTextEvent()
: mSeqno(kLatestSeqno)
, isChar(false)
{
}
@ -226,7 +225,6 @@ public:
WidgetTextEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget)
: WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eTextEventClass)
, mSeqno(kLatestSeqno)
, isChar(false)
{
}
@ -243,10 +241,6 @@ public:
// The composition string or the commit string.
nsString mData;
// Indicates whether the event signifies printable text.
// XXX This is not a standard, and most platforms don't set this properly.
// So, perhaps, we can get rid of this.
bool isChar;
nsRefPtr<TextRangeArray> mRanges;
@ -254,8 +248,6 @@ public:
{
AssignGUIEventData(aEvent, aCopyTargets);
isChar = aEvent.isChar;
// Currently, we don't need to copy the other members because they are
// for internal use only (not available from JS).
}

View File

@ -451,7 +451,6 @@ struct ParamTraits<mozilla::WidgetTextEvent>
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
WriteParam(aMsg, aParam.mSeqno);
WriteParam(aMsg, aParam.mData);
WriteParam(aMsg, aParam.isChar);
bool hasRanges = !!aParam.mRanges;
WriteParam(aMsg, hasRanges);
if (hasRanges) {
@ -466,7 +465,6 @@ struct ParamTraits<mozilla::WidgetTextEvent>
static_cast<mozilla::WidgetGUIEvent*>(aResult)) ||
!ReadParam(aMsg, aIter, &aResult->mSeqno) ||
!ReadParam(aMsg, aIter, &aResult->mData) ||
!ReadParam(aMsg, aIter, &aResult->isChar) ||
!ReadParam(aMsg, aIter, &hasRanges)) {
return false;
}