mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1323400 - Part 1: Mark Touch::Equals as a const method; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D18232 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7f0a1d33d8
commit
0518b15392
@ -180,7 +180,7 @@ void Touch::SetTouchTarget(EventTarget* aTarget) {
|
||||
mTarget = aTarget;
|
||||
}
|
||||
|
||||
bool Touch::Equals(Touch* aTouch) {
|
||||
bool Touch::Equals(Touch* aTouch) const {
|
||||
return mRefPoint == aTouch->mRefPoint && mForce == aTouch->mForce &&
|
||||
mRotationAngle == aTouch->mRotationAngle &&
|
||||
mRadius.x == aTouch->mRadius.x && mRadius.y == aTouch->mRadius.y;
|
||||
|
@ -48,7 +48,7 @@ class Touch final : public nsISupports,
|
||||
// Note, this sets both mOriginalTarget and mTarget.
|
||||
void SetTouchTarget(EventTarget* aTarget);
|
||||
|
||||
bool Equals(Touch* aTouch);
|
||||
bool Equals(Touch* aTouch) const;
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
@ -273,8 +273,8 @@ bool TouchManager::PreHandleEvent(WidgetEvent* aEvent, nsEventStatus* aStatus,
|
||||
touches.RemoveElementAt(i);
|
||||
continue;
|
||||
}
|
||||
RefPtr<Touch> oldTouch = info.mTouch;
|
||||
if (!touch->Equals(oldTouch)) {
|
||||
const RefPtr<Touch> oldTouch = info.mTouch;
|
||||
if (!oldTouch->Equals(touch)) {
|
||||
touch->mChanged = true;
|
||||
haveChanged = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user