mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 499008, part 3, remove nsIDOMNSEvent::tmpRealOriginalTarget, r=smaug
This commit is contained in:
parent
cc12e59fdf
commit
4450a27928
@ -180,8 +180,7 @@ nsDOMEvent::InitPresContextData(nsPresContext* aPresContext)
|
||||
// Get the explicit original target (if it's anonymous make it null)
|
||||
{
|
||||
nsCOMPtr<nsIContent> content = GetTargetFromFrame();
|
||||
mTmpRealOriginalTarget = do_QueryInterface(content);
|
||||
mExplicitOriginalTarget = mTmpRealOriginalTarget;
|
||||
mExplicitOriginalTarget = do_QueryInterface(content);
|
||||
if (content && content->IsInAnonymousSubtree()) {
|
||||
mExplicitOriginalTarget = nsnull;
|
||||
}
|
||||
@ -237,10 +236,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDOMEvent)
|
||||
}
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mPresContext);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mTmpRealOriginalTarget)
|
||||
// Always set mExplicitOriginalTarget to null, when
|
||||
// mTmpRealOriginalTarget doesn't point to any object!
|
||||
tmp->mExplicitOriginalTarget = nsnull;
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mExplicitOriginalTarget);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDOMEvent)
|
||||
@ -275,7 +271,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDOMEvent)
|
||||
}
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_MEMBER(mPresContext.get(), nsPresContext)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mTmpRealOriginalTarget)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mExplicitOriginalTarget)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
// nsIDOMEventInterface
|
||||
@ -355,18 +351,6 @@ nsDOMEvent::GetExplicitOriginalTarget(nsIDOMEventTarget** aRealEventTarget)
|
||||
return GetTarget(aRealEventTarget);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMEvent::GetTmpRealOriginalTarget(nsIDOMEventTarget** aRealEventTarget)
|
||||
{
|
||||
if (mTmpRealOriginalTarget) {
|
||||
*aRealEventTarget = mTmpRealOriginalTarget;
|
||||
NS_ADDREF(*aRealEventTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return GetOriginalTarget(aRealEventTarget);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMEvent::GetOriginalTarget(nsIDOMEventTarget** aOriginalTarget)
|
||||
{
|
||||
|
@ -267,8 +267,7 @@ protected:
|
||||
|
||||
nsEvent* mEvent;
|
||||
nsRefPtr<nsPresContext> mPresContext;
|
||||
nsCOMPtr<nsIDOMEventTarget> mTmpRealOriginalTarget;
|
||||
nsIDOMEventTarget* mExplicitOriginalTarget;
|
||||
nsCOMPtr<nsIDOMEventTarget> mExplicitOriginalTarget;
|
||||
nsString mCachedType;
|
||||
bool mEventIsInternal;
|
||||
bool mPrivateDataDuplicated;
|
||||
|
@ -44,7 +44,7 @@
|
||||
#endif
|
||||
%}
|
||||
|
||||
[scriptable, uuid(9be8096b-f795-4045-9664-0c275f36fe5b)]
|
||||
[scriptable, uuid(07F905C1-9170-4103-86CA-766374DA149A)]
|
||||
interface nsIDOMNSEvent : nsISupports
|
||||
{
|
||||
const long MOUSEDOWN = 0x00000001;
|
||||
@ -97,12 +97,6 @@ interface nsIDOMNSEvent : nsISupports
|
||||
* contain anonymous content.
|
||||
*/
|
||||
readonly attribute nsIDOMEventTarget explicitOriginalTarget;
|
||||
/* XXX This is TEMPORARY.
|
||||
* The original target, without any retargeting (like textnode retargeting).
|
||||
* This really needs to be in .originalTarget, but this is a less risky way of
|
||||
* fixing it.
|
||||
*/
|
||||
[noscript] readonly attribute nsIDOMEventTarget tmpRealOriginalTarget;
|
||||
|
||||
/**
|
||||
* @deprecated Use nsIDOMEvent::stopPropagation.
|
||||
|
@ -152,12 +152,6 @@ NS_IMETHODIMP nsSmartCardEvent::GetExplicitOriginalTarget(nsIDOMEventTarget * *a
|
||||
return mNSEvent->GetExplicitOriginalTarget(aTarget);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSmartCardEvent::GetTmpRealOriginalTarget(nsIDOMEventTarget * *aTarget)
|
||||
{
|
||||
NS_ASSERTION(mNSEvent, "SmartCardEvent called without Init");
|
||||
return mNSEvent->GetTmpRealOriginalTarget(aTarget);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSmartCardEvent::PreventBubble(void)
|
||||
{
|
||||
NS_ASSERTION(mNSEvent, "SmartCardEvent called without Init");
|
||||
|
Loading…
Reference in New Issue
Block a user