mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 339659, Make .eventPhase to work with event retargeting, r=bz+enndeakin, sr=bz
This commit is contained in:
parent
6807655ab6
commit
922d2b6489
@ -270,21 +270,15 @@ nsDOMEvent::SetTrusted(PRBool aTrusted)
|
||||
NS_IMETHODIMP
|
||||
nsDOMEvent::GetEventPhase(PRUint16* aEventPhase)
|
||||
{
|
||||
if (mEvent->flags & NS_EVENT_FLAG_CAPTURE) {
|
||||
if (mEvent->flags & NS_EVENT_FLAG_BUBBLE) {
|
||||
*aEventPhase = nsIDOMEvent::AT_TARGET;
|
||||
}
|
||||
else {
|
||||
*aEventPhase = nsIDOMEvent::CAPTURING_PHASE;
|
||||
}
|
||||
}
|
||||
else if (mEvent->flags & NS_EVENT_FLAG_BUBBLE) {
|
||||
if (mEvent->currentTarget == mEvent->target) {
|
||||
*aEventPhase = nsIDOMEvent::AT_TARGET;
|
||||
} else if (mEvent->flags & NS_EVENT_FLAG_CAPTURE) {
|
||||
*aEventPhase = nsIDOMEvent::CAPTURING_PHASE;
|
||||
} else if (mEvent->flags & NS_EVENT_FLAG_BUBBLE) {
|
||||
*aEventPhase = nsIDOMEvent::BUBBLING_PHASE;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
*aEventPhase = 0;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1057,6 +1057,9 @@
|
||||
]]></handler>
|
||||
<handler event="click" button="0" phase="target">
|
||||
<![CDATA[
|
||||
if (event.target != event.originalTarget)
|
||||
return;
|
||||
|
||||
var tree = this.parentNode.parentNode;
|
||||
var column = tree.columns.getColumnFor(this);
|
||||
tree.view.cycleHeader(column);
|
||||
|
@ -1024,6 +1024,9 @@
|
||||
]]></handler>
|
||||
<handler event="click" button="0" phase="target">
|
||||
<![CDATA[
|
||||
if (event.target != event.originalTarget)
|
||||
return;
|
||||
|
||||
var tree = this.parentNode.parentNode;
|
||||
var column = tree.columns.getColumnFor(this);
|
||||
tree.view.cycleHeader(column);
|
||||
|
Loading…
x
Reference in New Issue
Block a user