mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1005089, let touch.target be null, r=bz
This commit is contained in:
parent
bc5da91951
commit
a51cf37454
@ -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() &&
|
||||
|
@ -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; }
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user