Bug 1005089, let touch.target be null, r=bz

This commit is contained in:
Olli Pettay 2014-05-05 13:48:50 +03:00
parent bc5da91951
commit a51cf37454
5 changed files with 17 additions and 17 deletions

View File

@ -90,7 +90,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Touch)
NS_IMPL_CYCLE_COLLECTING_RELEASE(Touch)
EventTarget*
Touch::Target() const
Touch::GetTarget() const
{
nsCOMPtr<nsIContent> content = do_QueryInterface(mTarget);
if (content && content->ChromeOnlyAccess() &&

View File

@ -62,7 +62,7 @@ public:
// WebIDL
int32_t Identifier() const { return mIdentifier; }
EventTarget* Target() const;
EventTarget* GetTarget() const;
int32_t ScreenX() const { return mScreenPoint.x; }
int32_t ScreenY() const { return mScreenPoint.y; }
int32_t ClientX() const { return mClientPoint.x; }

View File

@ -1980,7 +1980,7 @@ TabChild::RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
}
if (aEvent.message == NS_TOUCH_START && localEvent.touches.Length() > 0) {
mActiveElementManager->SetTargetElement(localEvent.touches[0]->Target());
mActiveElementManager->SetTargetElement(localEvent.touches[0]->GetTarget());
}
nsCOMPtr<nsPIDOMWindow> outerWindow = do_GetInterface(WebNavigation());

View File

@ -12,16 +12,16 @@
[Func="mozilla::dom::Touch::PrefEnabled"]
interface Touch {
readonly attribute long identifier;
readonly attribute EventTarget target;
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute long pageX;
readonly attribute long pageY;
readonly attribute long radiusX;
readonly attribute long radiusY;
readonly attribute float rotationAngle;
readonly attribute float force;
readonly attribute long identifier;
readonly attribute EventTarget? target;
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute long pageX;
readonly attribute long pageY;
readonly attribute long radiusX;
readonly attribute long radiusY;
readonly attribute float rotationAngle;
readonly attribute float force;
};

View File

@ -6336,7 +6336,7 @@ FindAnyTarget(const uint32_t& aKey, nsRefPtr<dom::Touch>& aData,
void* aAnyTarget)
{
if (aData) {
dom::EventTarget* target = aData->Target();
dom::EventTarget* target = aData->GetTarget();
if (target) {
nsCOMPtr<nsIContent>* content =
static_cast<nsCOMPtr<nsIContent>*>(aAnyTarget);
@ -6878,7 +6878,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
}
nsCOMPtr<nsIContent> content =
do_QueryInterface(oldTouch->Target());
do_QueryInterface(oldTouch->GetTarget());
if (!content) {
break;
}