Bug 1404147 Make string index and lengths unsigned to resolve signed/unsigned comparison warning r?jimm
MozReview-Commit-ID: Cpo5Gd1puzd
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -4730,18 +4730,18 @@ TSFTextStore::RecordCompositionStartActi
}
return RecordCompositionStartAction(aComposition, start, length,
aPreserveSelection);
}
HRESULT
TSFTextStore::RecordCompositionStartAction(ITfCompositionView* aComposition,
- LONG aStart,
- LONG aLength,
+ ULONG aStart,
+ ULONG aLength,
bool aPreserveSelection)
{
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
("0x%p TSFTextStore::RecordCompositionStartAction("
"aComposition=0x%p, aStart=%d, aLength=%d, aPreserveSelection=%s), "
"mComposition.mView=0x%p",
this, aComposition, aStart, aLength, GetBoolName(aPreserveSelection),
mComposition.mView.get()));
--- a/widget/windows/TSFTextStore.h
+++ b/widget/windows/TSFTextStore.h
@@ -309,18 +309,18 @@ protected:
ITfRange* aNewRange);
// Following methods record composing action(s) to mPendingActions.
// They will be flushed FlushPendingActions().
HRESULT RecordCompositionStartAction(ITfCompositionView* aCompositionView,
ITfRange* aRange,
bool aPreserveSelection);
HRESULT RecordCompositionStartAction(ITfCompositionView* aComposition,
- LONG aStart,
- LONG aLength,
+ ULONG aStart,
+ ULONG aLength,
bool aPreserveSelection);
HRESULT RecordCompositionUpdateAction();
HRESULT RecordCompositionEndAction();
// DispatchEvent() dispatches the event and if it may not be handled
// synchronously, this makes the instance not notify TSF of pending
// notifications until next notification from content.
void DispatchEvent(WidgetGUIEvent& aEvent);
@@ -687,17 +687,17 @@ protected:
* composition immediately before (e.g., see InsertTextAtSelectionInternal()).
*
* @param aStart The inserted offset you expected.
* @param aLength The inserted text length you expected.
* @return true if the last pending actions are
* COMPOSITION_START and COMPOSITION_END and
* aStart and aLength match their information.
*/
- bool WasTextInsertedWithoutCompositionAt(LONG aStart, LONG aLength) const
+ bool WasTextInsertedWithoutCompositionAt(ULONG aStart, ULONG aLength) const
{
if (mPendingActions.Length() < 2) {
return false;
}
const PendingAction& pendingLastAction = mPendingActions.LastElement();
if (pendingLastAction.mType != PendingAction::COMPOSITION_END ||
pendingLastAction.mData.Length() != aLength) {
return false;