mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 910978 part.1 Implement nsScriptErrorEvent::AssignScriptErrorEventData() r=smaug
This commit is contained in:
parent
dbd118e0fe
commit
d0e6aba193
@ -587,8 +587,7 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
nsScriptErrorEvent* oldScriptErrorEvent =
|
||||
static_cast<nsScriptErrorEvent*>(mEvent);
|
||||
nsScriptErrorEvent* scriptErrorEvent = new nsScriptErrorEvent(false, msg);
|
||||
scriptErrorEvent->AssignEventData(*oldScriptErrorEvent, true);
|
||||
scriptErrorEvent->lineNr = oldScriptErrorEvent->lineNr;
|
||||
scriptErrorEvent->AssignScriptErrorEventData(*oldScriptErrorEvent, true);
|
||||
newEvent = scriptErrorEvent;
|
||||
break;
|
||||
}
|
||||
|
@ -768,6 +768,20 @@ public:
|
||||
int32_t lineNr;
|
||||
const PRUnichar* errorMsg;
|
||||
const PRUnichar* fileName;
|
||||
|
||||
// XXX Not tested by test_assign_event_data.html
|
||||
void AssignScriptErrorEventData(const nsScriptErrorEvent& aEvent,
|
||||
bool aCopyTargets)
|
||||
{
|
||||
AssignEventData(aEvent, aCopyTargets);
|
||||
|
||||
lineNr = aEvent.lineNr;
|
||||
|
||||
// We don't copy errorMsg and fileName. If it's necessary, perhaps, this
|
||||
// should duplicate the characters and free them at destructing.
|
||||
errorMsg = nullptr;
|
||||
fileName = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -49,6 +49,17 @@ const NATIVE_CONTROL_RIGHT = 0x0800;
|
||||
const NATIVE_META_RIGHT = 0x8000;
|
||||
|
||||
const kTests = [
|
||||
{ description: "nsScriptErrorEvent",
|
||||
targetID: "input-text", eventType: "error",
|
||||
dispatchEvent: function () {
|
||||
return;
|
||||
},
|
||||
canRun: function () {
|
||||
todo(false, "nsScriptErrorEvent isn't tested");
|
||||
return false;
|
||||
},
|
||||
todoMismatch: [],
|
||||
},
|
||||
{ description: "nsKeyEvent (keydown of 'a' key without modifiers)",
|
||||
targetID: "input-text", eventType: "keydown",
|
||||
dispatchEvent: function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user