mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 910978 part.14 Implement nsUIEvent::AssignUIEventData() r=smaug
This commit is contained in:
parent
92eeafbf0c
commit
28c40b5168
@ -675,7 +675,7 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
{
|
||||
nsUIEvent* oldUIEvent = static_cast<nsUIEvent*>(mEvent);
|
||||
nsUIEvent* uiEvent = new nsUIEvent(false, msg, oldUIEvent->detail);
|
||||
uiEvent->AssignEventData(*oldUIEvent, true);
|
||||
uiEvent->AssignUIEventData(*oldUIEvent, true);
|
||||
newEvent = uiEvent;
|
||||
break;
|
||||
}
|
||||
@ -693,7 +693,7 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
nsUIEvent* oldUIEvent = static_cast<nsUIEvent*>(mEvent);
|
||||
nsUIEvent* uiEvent = new nsUIEvent(false, msg, 0);
|
||||
uiEvent->eventStructType = NS_SMIL_TIME_EVENT;
|
||||
uiEvent->AssignGUIEventData(*oldUIEvent, true);
|
||||
uiEvent->AssignUIEventData(*oldUIEvent, true);
|
||||
newEvent = uiEvent;
|
||||
break;
|
||||
}
|
||||
|
@ -1883,6 +1883,13 @@ public:
|
||||
}
|
||||
|
||||
int32_t detail;
|
||||
|
||||
void AssignUIEventData(const nsUIEvent& aEvent, bool aCopyTargets)
|
||||
{
|
||||
AssignGUIEventData(aEvent, aCopyTargets);
|
||||
|
||||
// detail must have been initialized with the constructor.
|
||||
}
|
||||
};
|
||||
|
||||
class nsFocusEvent : public nsUIEvent
|
||||
|
@ -404,6 +404,17 @@ const kTests = [
|
||||
},
|
||||
todoMismatch: [ ],
|
||||
},
|
||||
{ description: "nsUIEvent (DOMActivate)",
|
||||
targetID: "button", eventType: "DOMActivate",
|
||||
dispatchEvent: function () {
|
||||
synthesizeMouseAtCenter(document.getElementById(this.targetID),
|
||||
{ button: 0, shiftKey: true });
|
||||
},
|
||||
canRun: function () {
|
||||
return true;
|
||||
},
|
||||
todoMismatch: [],
|
||||
},
|
||||
];
|
||||
|
||||
function doTest(aTest)
|
||||
|
Loading…
Reference in New Issue
Block a user