mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 895274 part.64 Rename NS_FORM_RESET to eFormReset r=smaug
This commit is contained in:
parent
167dc4aade
commit
5bb3e1799f
@ -811,7 +811,7 @@ nsIContent::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
|||||||
case NS_FORM_SELECTED:
|
case NS_FORM_SELECTED:
|
||||||
case NS_FORM_CHANGE:
|
case NS_FORM_CHANGE:
|
||||||
case eLoad:
|
case eLoad:
|
||||||
case NS_FORM_RESET:
|
case eFormReset:
|
||||||
case eResize:
|
case eResize:
|
||||||
case eScroll:
|
case eScroll:
|
||||||
stopEvent = true;
|
stopEvent = true;
|
||||||
|
@ -858,7 +858,7 @@ Event::GetEventPopupControlState(WidgetEvent* aEvent, nsIDOMEvent* aDOMEvent)
|
|||||||
abuse = openControlled;
|
abuse = openControlled;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_FORM_RESET :
|
case eFormReset:
|
||||||
if (PopupAllowedForEvent("reset")) {
|
if (PopupAllowedForEvent("reset")) {
|
||||||
abuse = openControlled;
|
abuse = openControlled;
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ EVENT(ratechange,
|
|||||||
EventNameType_HTML,
|
EventNameType_HTML,
|
||||||
eBasicEventClass)
|
eBasicEventClass)
|
||||||
EVENT(reset,
|
EVENT(reset,
|
||||||
NS_FORM_RESET,
|
eFormReset,
|
||||||
EventNameType_HTMLXUL,
|
EventNameType_HTMLXUL,
|
||||||
eBasicEventClass)
|
eBasicEventClass)
|
||||||
EVENT(seeked,
|
EVENT(seeked,
|
||||||
|
@ -370,7 +370,7 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||||||
if (mForm && (mType == NS_FORM_BUTTON_SUBMIT ||
|
if (mForm && (mType == NS_FORM_BUTTON_SUBMIT ||
|
||||||
mType == NS_FORM_BUTTON_RESET)) {
|
mType == NS_FORM_BUTTON_RESET)) {
|
||||||
InternalFormEvent event(true,
|
InternalFormEvent event(true,
|
||||||
(mType == NS_FORM_BUTTON_RESET) ? NS_FORM_RESET : eFormSubmit);
|
(mType == NS_FORM_BUTTON_RESET) ? eFormReset : eFormSubmit);
|
||||||
event.originator = this;
|
event.originator = this;
|
||||||
nsEventStatus status = nsEventStatus_eIgnore;
|
nsEventStatus status = nsEventStatus_eIgnore;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ HTMLFormElement::Submit()
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
HTMLFormElement::Reset()
|
HTMLFormElement::Reset()
|
||||||
{
|
{
|
||||||
InternalFormEvent event(true, NS_FORM_RESET);
|
InternalFormEvent event(true, eFormReset);
|
||||||
EventDispatcher::Dispatch(static_cast<nsIContent*>(this), nullptr, &event);
|
EventDispatcher::Dispatch(static_cast<nsIContent*>(this), nullptr, &event);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -504,8 +504,7 @@ HTMLFormElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
|||||||
// that means that if there are scripted submissions, the
|
// that means that if there are scripted submissions, the
|
||||||
// latest one will be deferred until after the exit point of the handler.
|
// latest one will be deferred until after the exit point of the handler.
|
||||||
mDeferSubmission = true;
|
mDeferSubmission = true;
|
||||||
}
|
} else if (msg == eFormReset) {
|
||||||
else if (msg == NS_FORM_RESET) {
|
|
||||||
if (mGeneratingReset) {
|
if (mGeneratingReset) {
|
||||||
aVisitor.mCanHandle = false;
|
aVisitor.mCanHandle = false;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -523,7 +522,7 @@ HTMLFormElement::WillHandleEvent(EventChainPostVisitor& aVisitor)
|
|||||||
// received a submit event we do *not* want to handle the submit event
|
// received a submit event we do *not* want to handle the submit event
|
||||||
// for this form too.
|
// for this form too.
|
||||||
if ((aVisitor.mEvent->mMessage == eFormSubmit ||
|
if ((aVisitor.mEvent->mMessage == eFormSubmit ||
|
||||||
aVisitor.mEvent->mMessage == NS_FORM_RESET) &&
|
aVisitor.mEvent->mMessage == eFormReset) &&
|
||||||
aVisitor.mEvent->mFlags.mInBubblingPhase &&
|
aVisitor.mEvent->mFlags.mInBubblingPhase &&
|
||||||
aVisitor.mEvent->originalTarget != static_cast<nsIContent*>(this)) {
|
aVisitor.mEvent->originalTarget != static_cast<nsIContent*>(this)) {
|
||||||
aVisitor.mEvent->mFlags.mPropagationStopped = true;
|
aVisitor.mEvent->mFlags.mPropagationStopped = true;
|
||||||
@ -543,7 +542,7 @@ HTMLFormElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||||||
|
|
||||||
if (aVisitor.mEventStatus == nsEventStatus_eIgnore) {
|
if (aVisitor.mEventStatus == nsEventStatus_eIgnore) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case NS_FORM_RESET:
|
case eFormReset:
|
||||||
case eFormSubmit: {
|
case eFormSubmit: {
|
||||||
if (mPendingSubmission && msg == eFormSubmit) {
|
if (mPendingSubmission && msg == eFormSubmit) {
|
||||||
// tell the form to forget a possible pending submission.
|
// tell the form to forget a possible pending submission.
|
||||||
@ -571,8 +570,7 @@ HTMLFormElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||||||
|
|
||||||
if (msg == eFormSubmit) {
|
if (msg == eFormSubmit) {
|
||||||
mGeneratingSubmit = false;
|
mGeneratingSubmit = false;
|
||||||
}
|
} else if (msg == eFormReset) {
|
||||||
else if (msg == NS_FORM_RESET) {
|
|
||||||
mGeneratingReset = false;
|
mGeneratingReset = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -592,7 +590,7 @@ HTMLFormElement::DoSubmitOrReset(WidgetEvent* aEvent,
|
|||||||
// JBK Don't get form frames anymore - bug 34297
|
// JBK Don't get form frames anymore - bug 34297
|
||||||
|
|
||||||
// Submit or Reset the form
|
// Submit or Reset the form
|
||||||
if (NS_FORM_RESET == aMessage) {
|
if (eFormReset == aMessage) {
|
||||||
return DoReset();
|
return DoReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4015,7 +4015,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||||||
case NS_FORM_INPUT_IMAGE:
|
case NS_FORM_INPUT_IMAGE:
|
||||||
if (mForm) {
|
if (mForm) {
|
||||||
InternalFormEvent event(true,
|
InternalFormEvent event(true,
|
||||||
(mType == NS_FORM_INPUT_RESET) ? NS_FORM_RESET : eFormSubmit);
|
(mType == NS_FORM_INPUT_RESET) ? eFormReset : eFormSubmit);
|
||||||
event.originator = this;
|
event.originator = this;
|
||||||
nsEventStatus status = nsEventStatus_eIgnore;
|
nsEventStatus status = nsEventStatus_eIgnore;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ NS_EVENT_MESSAGE(eReadyStateChange, eStreamEventFirst + 8)
|
|||||||
|
|
||||||
NS_EVENT_MESSAGE(eFormEventFirst, 1200)
|
NS_EVENT_MESSAGE(eFormEventFirst, 1200)
|
||||||
NS_EVENT_MESSAGE(eFormSubmit, eFormEventFirst)
|
NS_EVENT_MESSAGE(eFormSubmit, eFormEventFirst)
|
||||||
NS_EVENT_MESSAGE(NS_FORM_RESET, eFormEventFirst + 1)
|
NS_EVENT_MESSAGE(eFormReset, eFormEventFirst + 1)
|
||||||
NS_EVENT_MESSAGE(NS_FORM_CHANGE, eFormEventFirst + 2)
|
NS_EVENT_MESSAGE(NS_FORM_CHANGE, eFormEventFirst + 2)
|
||||||
NS_EVENT_MESSAGE(NS_FORM_SELECTED, eFormEventFirst + 3)
|
NS_EVENT_MESSAGE(NS_FORM_SELECTED, eFormEventFirst + 3)
|
||||||
NS_EVENT_MESSAGE(NS_FORM_INVALID, eFormEventFirst + 4)
|
NS_EVENT_MESSAGE(NS_FORM_INVALID, eFormEventFirst + 4)
|
||||||
|
@ -2641,7 +2641,7 @@ case _value: eventName.AssignLiteral(_name) ; break
|
|||||||
_ASSIGN_eventName(NS_FOCUS_CONTENT,"NS_FOCUS_CONTENT");
|
_ASSIGN_eventName(NS_FOCUS_CONTENT,"NS_FOCUS_CONTENT");
|
||||||
_ASSIGN_eventName(NS_FORM_SELECTED,"NS_FORM_SELECTED");
|
_ASSIGN_eventName(NS_FORM_SELECTED,"NS_FORM_SELECTED");
|
||||||
_ASSIGN_eventName(NS_FORM_CHANGE,"NS_FORM_CHANGE");
|
_ASSIGN_eventName(NS_FORM_CHANGE,"NS_FORM_CHANGE");
|
||||||
_ASSIGN_eventName(NS_FORM_RESET,"NS_FORM_RESET");
|
_ASSIGN_eventName(eFormReset,"eFormReset");
|
||||||
_ASSIGN_eventName(eFormSubmit,"eFormSubmit");
|
_ASSIGN_eventName(eFormSubmit,"eFormSubmit");
|
||||||
_ASSIGN_eventName(eImageAbort,"eImageAbort");
|
_ASSIGN_eventName(eImageAbort,"eImageAbort");
|
||||||
_ASSIGN_eventName(eLoadError,"eLoadError");
|
_ASSIGN_eventName(eLoadError,"eLoadError");
|
||||||
|
Loading…
Reference in New Issue
Block a user