зеркало из https://github.com/mozilla/pjs.git
oops, this wasn't supposed to go on the trunk. backing out.
This commit is contained in:
Родитель
8cfeadc0a0
Коммит
55d74e870b
|
@ -629,16 +629,6 @@ NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsRootAccessible::FormChange(nsIDOMEvent* aEvent)
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsRootAccessible::FormInput(nsIDOMEvent* aEvent)
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------- nsIDOMXULListener Methods (8) ---------------
|
// ------- nsIDOMXULListener Methods (8) ---------------
|
||||||
|
|
||||||
NS_IMETHODIMP nsRootAccessible::PopupShowing(nsIDOMEvent* aEvent) { return NS_OK; }
|
NS_IMETHODIMP nsRootAccessible::PopupShowing(nsIDOMEvent* aEvent) { return NS_OK; }
|
||||||
|
|
|
@ -81,8 +81,6 @@ class nsRootAccessible : public nsDocAccessibleWrap,
|
||||||
NS_IMETHOD Change(nsIDOMEvent* aEvent);
|
NS_IMETHOD Change(nsIDOMEvent* aEvent);
|
||||||
NS_IMETHOD Select(nsIDOMEvent* aEvent);
|
NS_IMETHOD Select(nsIDOMEvent* aEvent);
|
||||||
NS_IMETHOD Input(nsIDOMEvent* aEvent);
|
NS_IMETHOD Input(nsIDOMEvent* aEvent);
|
||||||
NS_IMETHOD FormChange(nsIDOMEvent* aEvent);
|
|
||||||
NS_IMETHOD FormInput(nsIDOMEvent* aEvent);
|
|
||||||
|
|
||||||
// ----- nsIDOMXULListener ---------------------------
|
// ----- nsIDOMXULListener ---------------------------
|
||||||
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
|
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
|
||||||
|
|
|
@ -67,9 +67,8 @@ static const char* const sEventNames[] = {
|
||||||
"mousedown", "mouseup", "click", "dblclick", "mouseover",
|
"mousedown", "mouseup", "click", "dblclick", "mouseover",
|
||||||
"mouseout", "mousemove", "contextmenu", "keydown", "keyup", "keypress",
|
"mouseout", "mousemove", "contextmenu", "keydown", "keyup", "keypress",
|
||||||
"focus", "blur", "load", "beforeunload", "unload", "abort", "error",
|
"focus", "blur", "load", "beforeunload", "unload", "abort", "error",
|
||||||
"submit", "reset", "change", "input", "formchange", "forminput", "select",
|
"submit", "reset", "change", "select", "input", "paint" ,"text",
|
||||||
"paint" ,"text", "popupshowing", "popupshown", "popuphiding", "popuphidden",
|
"popupshowing", "popupshown", "popuphiding", "popuphidden", "close", "command", "broadcast", "commandupdate",
|
||||||
"close", "command", "broadcast", "commandupdate",
|
|
||||||
"dragenter", "dragover", "dragexit", "dragdrop", "draggesture", "resize",
|
"dragenter", "dragover", "dragexit", "dragdrop", "draggesture", "resize",
|
||||||
"scroll","overflow", "underflow", "overflowchanged",
|
"scroll","overflow", "underflow", "overflowchanged",
|
||||||
"DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved",
|
"DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved",
|
||||||
|
@ -1162,12 +1161,6 @@ nsDOMEvent::SetEventType(const nsAString& aEventTypeArg)
|
||||||
mEvent->message = NS_FORM_RESET;
|
mEvent->message = NS_FORM_RESET;
|
||||||
else if (atom == nsLayoutAtoms::onchange)
|
else if (atom == nsLayoutAtoms::onchange)
|
||||||
mEvent->message = NS_FORM_CHANGE;
|
mEvent->message = NS_FORM_CHANGE;
|
||||||
else if (atom == nsLayoutAtoms::oninput)
|
|
||||||
mEvent->message = NS_FORM_INPUT;
|
|
||||||
else if (atom == nsLayoutAtoms::onformchange)
|
|
||||||
mEvent->message = NS_FORM_FORMCHANGE;
|
|
||||||
else if (atom == nsLayoutAtoms::onforminput)
|
|
||||||
mEvent->message = NS_FORM_FORMINPUT;
|
|
||||||
else if (atom == nsLayoutAtoms::onselect)
|
else if (atom == nsLayoutAtoms::onselect)
|
||||||
mEvent->message = NS_FORM_SELECTED;
|
mEvent->message = NS_FORM_SELECTED;
|
||||||
else if (atom == nsLayoutAtoms::onload)
|
else if (atom == nsLayoutAtoms::onload)
|
||||||
|
@ -1486,14 +1479,10 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType)
|
||||||
return sEventNames[eDOMEvents_reset];
|
return sEventNames[eDOMEvents_reset];
|
||||||
case NS_FORM_CHANGE:
|
case NS_FORM_CHANGE:
|
||||||
return sEventNames[eDOMEvents_change];
|
return sEventNames[eDOMEvents_change];
|
||||||
case NS_FORM_INPUT:
|
|
||||||
return sEventNames[eDOMEvents_input];
|
|
||||||
case NS_FORM_FORMCHANGE:
|
|
||||||
return sEventNames[eDOMEvents_formchange];
|
|
||||||
case NS_FORM_FORMINPUT:
|
|
||||||
return sEventNames[eDOMEvents_forminput];
|
|
||||||
case NS_FORM_SELECTED:
|
case NS_FORM_SELECTED:
|
||||||
return sEventNames[eDOMEvents_select];
|
return sEventNames[eDOMEvents_select];
|
||||||
|
case NS_FORM_INPUT:
|
||||||
|
return sEventNames[eDOMEvents_input];
|
||||||
case NS_PAINT:
|
case NS_PAINT:
|
||||||
return sEventNames[eDOMEvents_paint];
|
return sEventNames[eDOMEvents_paint];
|
||||||
case NS_RESIZE_EVENT:
|
case NS_RESIZE_EVENT:
|
||||||
|
|
|
@ -92,10 +92,8 @@ public:
|
||||||
eDOMEvents_submit,
|
eDOMEvents_submit,
|
||||||
eDOMEvents_reset,
|
eDOMEvents_reset,
|
||||||
eDOMEvents_change,
|
eDOMEvents_change,
|
||||||
eDOMEvents_input,
|
|
||||||
eDOMEvents_formchange,
|
|
||||||
eDOMEvents_forminput,
|
|
||||||
eDOMEvents_select,
|
eDOMEvents_select,
|
||||||
|
eDOMEvents_input,
|
||||||
eDOMEvents_paint,
|
eDOMEvents_paint,
|
||||||
eDOMEvents_text,
|
eDOMEvents_text,
|
||||||
eDOMEvents_popupShowing,
|
eDOMEvents_popupShowing,
|
||||||
|
|
|
@ -221,9 +221,7 @@ static const EventDispatchData sFormEvents[] = {
|
||||||
{NS_FORM_RESET, HANDLER(&nsIDOMFormListener::Reset), NS_EVENT_BITS_FORM_RESET},
|
{NS_FORM_RESET, HANDLER(&nsIDOMFormListener::Reset), NS_EVENT_BITS_FORM_RESET},
|
||||||
{NS_FORM_CHANGE, HANDLER(&nsIDOMFormListener::Change),NS_EVENT_BITS_FORM_CHANGE},
|
{NS_FORM_CHANGE, HANDLER(&nsIDOMFormListener::Change),NS_EVENT_BITS_FORM_CHANGE},
|
||||||
{NS_FORM_SELECTED,HANDLER(&nsIDOMFormListener::Select),NS_EVENT_BITS_FORM_SELECT},
|
{NS_FORM_SELECTED,HANDLER(&nsIDOMFormListener::Select),NS_EVENT_BITS_FORM_SELECT},
|
||||||
{NS_FORM_INPUT, HANDLER(&nsIDOMFormListener::Input), NS_EVENT_BITS_FORM_INPUT},
|
{NS_FORM_INPUT, HANDLER(&nsIDOMFormListener::Input), NS_EVENT_BITS_FORM_INPUT}
|
||||||
{NS_FORM_FORMCHANGE, HANDLER(&nsIDOMFormListener::FormChange), NS_EVENT_BITS_FORM_FORMCHANGE},
|
|
||||||
{NS_FORM_FORMINPUT, HANDLER(&nsIDOMFormListener::FormInput), NS_EVENT_BITS_FORM_FORMINPUT}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const EventDispatchData sLoadEvents[] = {
|
static const EventDispatchData sLoadEvents[] = {
|
||||||
|
@ -855,14 +853,6 @@ nsEventListenerManager::GetIdentifiersForType(nsIAtom* aType,
|
||||||
*aArrayType = eEventArrayType_Form;
|
*aArrayType = eEventArrayType_Form;
|
||||||
*aFlags = NS_EVENT_BITS_FORM_INPUT;
|
*aFlags = NS_EVENT_BITS_FORM_INPUT;
|
||||||
}
|
}
|
||||||
else if (aType == nsLayoutAtoms::onformchange) {
|
|
||||||
*aArrayType = eEventArrayType_Form;
|
|
||||||
*aFlags = NS_EVENT_BITS_FORM_FORMCHANGE;
|
|
||||||
}
|
|
||||||
else if (aType == nsLayoutAtoms::onforminput) {
|
|
||||||
*aArrayType = eEventArrayType_Form;
|
|
||||||
*aFlags = NS_EVENT_BITS_FORM_FORMINPUT;
|
|
||||||
}
|
|
||||||
else if (aType == nsLayoutAtoms::onload) {
|
else if (aType == nsLayoutAtoms::onload) {
|
||||||
*aArrayType = eEventArrayType_Load;
|
*aArrayType = eEventArrayType_Load;
|
||||||
*aFlags = NS_EVENT_BITS_LOAD_LOAD;
|
*aFlags = NS_EVENT_BITS_LOAD_LOAD;
|
||||||
|
|
|
@ -285,14 +285,12 @@ protected:
|
||||||
#define NS_EVENT_BITS_FOCUS_BLUR 0x02
|
#define NS_EVENT_BITS_FOCUS_BLUR 0x02
|
||||||
|
|
||||||
//nsIDOMFormListener
|
//nsIDOMFormListener
|
||||||
#define NS_EVENT_BITS_FORM_NONE 0x00
|
#define NS_EVENT_BITS_FORM_NONE 0x00
|
||||||
#define NS_EVENT_BITS_FORM_SUBMIT 0x01
|
#define NS_EVENT_BITS_FORM_SUBMIT 0x01
|
||||||
#define NS_EVENT_BITS_FORM_RESET 0x02
|
#define NS_EVENT_BITS_FORM_RESET 0x02
|
||||||
#define NS_EVENT_BITS_FORM_CHANGE 0x04
|
#define NS_EVENT_BITS_FORM_CHANGE 0x04
|
||||||
#define NS_EVENT_BITS_FORM_SELECT 0x08
|
#define NS_EVENT_BITS_FORM_SELECT 0x08
|
||||||
#define NS_EVENT_BITS_FORM_INPUT 0x10
|
#define NS_EVENT_BITS_FORM_INPUT 0x10
|
||||||
#define NS_EVENT_BITS_FORM_FORMCHANGE 0x11
|
|
||||||
#define NS_EVENT_BITS_FORM_FORMINPUT 0x12
|
|
||||||
|
|
||||||
//nsIDOMLoadListener
|
//nsIDOMLoadListener
|
||||||
#define NS_EVENT_BITS_LOAD_NONE 0x00
|
#define NS_EVENT_BITS_LOAD_NONE 0x00
|
||||||
|
|
|
@ -184,16 +184,6 @@ public:
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD GetActionURL(nsIURI** aActionURL) = 0;
|
NS_IMETHOD GetActionURL(nsIURI** aActionURL) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Fire the Web Forms 2 formchange event on all form controls.
|
|
||||||
*/
|
|
||||||
virtual void FireFormChangeEvent() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fire the Web Forms 2 forminput event on all form controls.
|
|
||||||
*/
|
|
||||||
virtual void FireFormInputEvent() = 0;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsIForm_h___ */
|
#endif /* nsIForm_h___ */
|
||||||
|
|
|
@ -67,8 +67,6 @@ class nsIFormSubmission;
|
||||||
#define NS_FORM_SELECT 19
|
#define NS_FORM_SELECT 19
|
||||||
#define NS_FORM_TEXTAREA 20
|
#define NS_FORM_TEXTAREA 20
|
||||||
#define NS_FORM_OBJECT 21
|
#define NS_FORM_OBJECT 21
|
||||||
#define NS_FORM_OUTPUT 22
|
|
||||||
|
|
||||||
|
|
||||||
#define NS_IFORMCONTROL_IID \
|
#define NS_IFORMCONTROL_IID \
|
||||||
{ 0x282ff440, 0xcd7e, 0x11d1, \
|
{ 0x282ff440, 0xcd7e, 0x11d1, \
|
||||||
|
|
|
@ -105,7 +105,6 @@ CPPSRCS = \
|
||||||
nsHTMLObjectElement.cpp \
|
nsHTMLObjectElement.cpp \
|
||||||
nsHTMLOptionElement.cpp \
|
nsHTMLOptionElement.cpp \
|
||||||
nsHTMLOptGroupElement.cpp \
|
nsHTMLOptGroupElement.cpp \
|
||||||
nsHTMLOutputElement.cpp \
|
|
||||||
nsHTMLParagraphElement.cpp \
|
nsHTMLParagraphElement.cpp \
|
||||||
nsHTMLPreElement.cpp \
|
nsHTMLPreElement.cpp \
|
||||||
nsHTMLScriptElement.cpp \
|
nsHTMLScriptElement.cpp \
|
||||||
|
|
|
@ -1741,8 +1741,6 @@ PRBool nsGenericHTMLElement::IsEventName(nsIAtom* aName)
|
||||||
aName == nsLayoutAtoms::onabort ||
|
aName == nsLayoutAtoms::onabort ||
|
||||||
aName == nsLayoutAtoms::onerror ||
|
aName == nsLayoutAtoms::onerror ||
|
||||||
aName == nsLayoutAtoms::onfocus ||
|
aName == nsLayoutAtoms::onfocus ||
|
||||||
aName == nsLayoutAtoms::onformchange ||
|
|
||||||
aName == nsLayoutAtoms::onforminput ||
|
|
||||||
aName == nsLayoutAtoms::onblur ||
|
aName == nsLayoutAtoms::onblur ||
|
||||||
aName == nsLayoutAtoms::onsubmit ||
|
aName == nsLayoutAtoms::onsubmit ||
|
||||||
aName == nsLayoutAtoms::onreset ||
|
aName == nsLayoutAtoms::onreset ||
|
||||||
|
|
|
@ -1206,7 +1206,6 @@ NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedList)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Object)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(Object)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(OptGroup)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(OptGroup)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Option)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(Option)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Output)
|
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Paragraph)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(Paragraph)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Pre)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(Pre)
|
||||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Script)
|
NS_DECLARE_NS_NEW_HTML_ELEMENT(Script)
|
||||||
|
|
|
@ -141,8 +141,6 @@ public:
|
||||||
NS_IMETHOD FlushPendingSubmission();
|
NS_IMETHOD FlushPendingSubmission();
|
||||||
NS_IMETHOD ForgetPendingSubmission();
|
NS_IMETHOD ForgetPendingSubmission();
|
||||||
NS_IMETHOD GetActionURL(nsIURI** aActionURL);
|
NS_IMETHOD GetActionURL(nsIURI** aActionURL);
|
||||||
virtual void FireFormChangeEvent();
|
|
||||||
virtual void FireFormInputEvent();
|
|
||||||
|
|
||||||
// nsIRadioGroupContainer
|
// nsIRadioGroupContainer
|
||||||
NS_IMETHOD SetCurrentRadioButton(const nsAString& aName,
|
NS_IMETHOD SetCurrentRadioButton(const nsAString& aName,
|
||||||
|
@ -252,9 +250,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
nsresult NotifySubmitObservers(nsIURI* aActionURL, PRBool* aCancelSubmit);
|
nsresult NotifySubmitObservers(nsIURI* aActionURL, PRBool* aCancelSubmit);
|
||||||
|
|
||||||
// Helper to fire events on all form controls in this form
|
|
||||||
void FireEventOnControls(PRInt32 aEventType);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Data members
|
// Data members
|
||||||
//
|
//
|
||||||
|
@ -384,7 +379,6 @@ ShouldBeInElements(nsIFormControl* aFormControl)
|
||||||
case NS_FORM_TEXTAREA :
|
case NS_FORM_TEXTAREA :
|
||||||
case NS_FORM_FIELDSET :
|
case NS_FORM_FIELDSET :
|
||||||
case NS_FORM_OBJECT :
|
case NS_FORM_OBJECT :
|
||||||
case NS_FORM_OUTPUT :
|
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1303,43 +1297,6 @@ nsHTMLFormElement::GetActionURL(nsIURI** aActionURL)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsHTMLFormElement::FireEventOnControls(PRInt32 aEventType)
|
|
||||||
{
|
|
||||||
if (!mDocument) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIPresShell *shell = mDocument->GetShellAt(0);
|
|
||||||
|
|
||||||
if (!shell) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (PRInt32 i = mControls->mElements.Count()-1; i >= 0; i--) {
|
|
||||||
nsCOMPtr<nsIContent> f =
|
|
||||||
do_QueryInterface(NS_STATIC_CAST(nsIFormControl *,
|
|
||||||
mControls->mElements.ElementAt(i)));
|
|
||||||
nsEventStatus status = nsEventStatus_eIgnore;
|
|
||||||
nsGUIEvent event(aEventType);
|
|
||||||
|
|
||||||
shell->HandleEventWithTarget(&event, nsnull, f, NS_EVENT_FLAG_INIT,
|
|
||||||
&status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nsHTMLFormElement::FireFormChangeEvent()
|
|
||||||
{
|
|
||||||
FireEventOnControls(NS_FORM_FORMCHANGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nsHTMLFormElement::FireFormInputEvent()
|
|
||||||
{
|
|
||||||
FireEventOnControls(NS_FORM_FORMINPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsHTMLFormElement::GetEncoding(nsAString& aEncoding)
|
nsHTMLFormElement::GetEncoding(nsAString& aEncoding)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1364,20 +1364,11 @@ nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||||
PRInt32 oldType = mType;
|
PRInt32 oldType = mType;
|
||||||
|
|
||||||
// Try script event handlers first if its not a focus/blur event
|
// Try script event handlers first if its not a focus/blur event
|
||||||
// we dont want the doc to get these
|
//we dont want the doc to get these
|
||||||
rv = nsGenericHTMLFormElement::HandleDOMEvent(aPresContext, aEvent,
|
rv = nsGenericHTMLFormElement::HandleDOMEvent(aPresContext, aEvent,
|
||||||
aDOMEvent, aFlags,
|
aDOMEvent, aFlags,
|
||||||
aEventStatus);
|
aEventStatus);
|
||||||
|
|
||||||
if (aEvent->message == NS_FORM_INPUT &&
|
|
||||||
!(aFlags & NS_EVENT_FLAG_SYSTEM_EVENT)) {
|
|
||||||
if (mForm) {
|
|
||||||
mForm->FireFormInputEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ideally we would make the default action for click and space just dispatch
|
// Ideally we would make the default action for click and space just dispatch
|
||||||
// DOMActivate, and the default action for DOMActivate flip the checkbox/
|
// DOMActivate, and the default action for DOMActivate flip the checkbox/
|
||||||
// radio state and fire onchange. However, for backwards compatibility, we
|
// radio state and fire onchange. However, for backwards compatibility, we
|
||||||
|
|
|
@ -169,8 +169,6 @@ LAYOUT_ATOM(ondraggesture, "ondraggesture")
|
||||||
LAYOUT_ATOM(ondragover, "ondragover")
|
LAYOUT_ATOM(ondragover, "ondragover")
|
||||||
LAYOUT_ATOM(onerror, "onerror")
|
LAYOUT_ATOM(onerror, "onerror")
|
||||||
LAYOUT_ATOM(onfocus, "onfocus")
|
LAYOUT_ATOM(onfocus, "onfocus")
|
||||||
LAYOUT_ATOM(onformchange, "onformchange")
|
|
||||||
LAYOUT_ATOM(onforminput, "onforminput")
|
|
||||||
LAYOUT_ATOM(oninput, "oninput")
|
LAYOUT_ATOM(oninput, "oninput")
|
||||||
LAYOUT_ATOM(onkeydown, "onkeydown")
|
LAYOUT_ATOM(onkeydown, "onkeydown")
|
||||||
LAYOUT_ATOM(onkeypress, "onkeypress")
|
LAYOUT_ATOM(onkeypress, "onkeypress")
|
||||||
|
|
|
@ -90,9 +90,6 @@ public:
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD Input(nsIDOMEvent* aEvent) = 0;
|
NS_IMETHOD Input(nsIDOMEvent* aEvent) = 0;
|
||||||
|
|
||||||
NS_IMETHOD FormChange(nsIDOMEvent* aEvent) = 0;
|
|
||||||
|
|
||||||
NS_IMETHOD FormInput(nsIDOMEvent* aEvent) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // nsIDOMFormListener_h__
|
#endif // nsIDOMFormListener_h__
|
||||||
|
|
|
@ -54,8 +54,7 @@ DIRS = \
|
||||||
range \
|
range \
|
||||||
xbl \
|
xbl \
|
||||||
xpath \
|
xpath \
|
||||||
xul \
|
xul
|
||||||
webforms
|
|
||||||
|
|
||||||
ifdef MOZ_SVG
|
ifdef MOZ_SVG
|
||||||
DIRS += svg
|
DIRS += svg
|
||||||
|
|
|
@ -292,9 +292,6 @@ enum nsDOMClassInfoID {
|
||||||
eDOMClassInfo_SVGStyleElement_id,
|
eDOMClassInfo_SVGStyleElement_id,
|
||||||
#endif //MOZ_SVG
|
#endif //MOZ_SVG
|
||||||
|
|
||||||
// WebForms 2.0 classes
|
|
||||||
eDOMClassInfo_HTMLOutputElement_id,
|
|
||||||
|
|
||||||
// This one better be the last one in this list
|
// This one better be the last one in this list
|
||||||
eDOMClassInfoIDCount
|
eDOMClassInfoIDCount
|
||||||
};
|
};
|
||||||
|
|
|
@ -338,9 +338,6 @@
|
||||||
|
|
||||||
#include "nsIImageDocument.h"
|
#include "nsIImageDocument.h"
|
||||||
|
|
||||||
#include "nsIWebFormsOutputElement.h"
|
|
||||||
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
|
static NS_DEFINE_CID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
|
||||||
static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
||||||
|
|
||||||
|
@ -883,9 +880,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
ELEMENT_SCRIPTABLE_FLAGS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_DEFINE_CLASSINFO_DATA(HTMLOutputElement, nsHTMLElementSH,
|
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nsIXPConnect *nsDOMClassInfo::sXPConnect = nsnull;
|
nsIXPConnect *nsDOMClassInfo::sXPConnect = nsnull;
|
||||||
|
@ -934,9 +928,6 @@ jsval nsDOMClassInfo::sOnblur_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOnsubmit_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnsubmit_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOnreset_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnreset_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOnchange_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnchange_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOninput_id = JSVAL_VOID;
|
|
||||||
jsval nsDOMClassInfo::sOnformchange_id = JSVAL_VOID;
|
|
||||||
jsval nsDOMClassInfo::sOnforminput_id = JSVAL_VOID;
|
|
||||||
jsval nsDOMClassInfo::sOnselect_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnselect_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOnload_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnload_id = JSVAL_VOID;
|
||||||
jsval nsDOMClassInfo::sOnbeforeunload_id = JSVAL_VOID;
|
jsval nsDOMClassInfo::sOnbeforeunload_id = JSVAL_VOID;
|
||||||
|
@ -1042,9 +1033,6 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx)
|
||||||
SET_JSVAL_TO_STRING(sOnsubmit_id, cx, "onsubmit");
|
SET_JSVAL_TO_STRING(sOnsubmit_id, cx, "onsubmit");
|
||||||
SET_JSVAL_TO_STRING(sOnreset_id, cx, "onreset");
|
SET_JSVAL_TO_STRING(sOnreset_id, cx, "onreset");
|
||||||
SET_JSVAL_TO_STRING(sOnchange_id, cx, "onchange");
|
SET_JSVAL_TO_STRING(sOnchange_id, cx, "onchange");
|
||||||
SET_JSVAL_TO_STRING(sOninput_id, cx, "oninput");
|
|
||||||
SET_JSVAL_TO_STRING(sOnformchange_id, cx, "onformchange");
|
|
||||||
SET_JSVAL_TO_STRING(sOnforminput_id, cx, "onforminput");
|
|
||||||
SET_JSVAL_TO_STRING(sOnselect_id, cx, "onselect");
|
SET_JSVAL_TO_STRING(sOnselect_id, cx, "onselect");
|
||||||
SET_JSVAL_TO_STRING(sOnload_id, cx, "onload");
|
SET_JSVAL_TO_STRING(sOnload_id, cx, "onload");
|
||||||
SET_JSVAL_TO_STRING(sOnbeforeunload_id, cx, "onbeforeunload");
|
SET_JSVAL_TO_STRING(sOnbeforeunload_id, cx, "onbeforeunload");
|
||||||
|
@ -2366,11 +2354,6 @@ nsDOMClassInfo::Init()
|
||||||
|
|
||||||
#endif //MOZ_SVG
|
#endif //MOZ_SVG
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(HTMLOutputElement, nsIWebFormsOutputElement)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIWebFormsOutputElement)
|
|
||||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
|
||||||
DOM_CLASSINFO_MAP_END
|
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
{
|
{
|
||||||
PRUint32 i = sizeof(sClassInfoData) / sizeof(sClassInfoData[0]);
|
PRUint32 i = sizeof(sClassInfoData) / sizeof(sClassInfoData[0]);
|
||||||
|
@ -2950,9 +2933,6 @@ nsDOMClassInfo::ShutDown()
|
||||||
sOnsubmit_id = JSVAL_VOID;
|
sOnsubmit_id = JSVAL_VOID;
|
||||||
sOnreset_id = JSVAL_VOID;
|
sOnreset_id = JSVAL_VOID;
|
||||||
sOnchange_id = JSVAL_VOID;
|
sOnchange_id = JSVAL_VOID;
|
||||||
sOninput_id = JSVAL_VOID;
|
|
||||||
sOnformchange_id = JSVAL_VOID;
|
|
||||||
sOnforminput_id = JSVAL_VOID;
|
|
||||||
sOnselect_id = JSVAL_VOID;
|
sOnselect_id = JSVAL_VOID;
|
||||||
sOnload_id = JSVAL_VOID;
|
sOnload_id = JSVAL_VOID;
|
||||||
sOnbeforeunload_id = JSVAL_VOID;
|
sOnbeforeunload_id = JSVAL_VOID;
|
||||||
|
@ -4644,9 +4624,7 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar)
|
||||||
case 'e' :
|
case 'e' :
|
||||||
return id == sOnerror_id;
|
return id == sOnerror_id;
|
||||||
case 'f' :
|
case 'f' :
|
||||||
return (id == sOnfocus_id ||
|
return id == sOnfocus_id;
|
||||||
id == sOnformchange_id ||
|
|
||||||
id == sOnforminput_id);
|
|
||||||
case 'c' :
|
case 'c' :
|
||||||
return (id == sOnchange_id ||
|
return (id == sOnchange_id ||
|
||||||
id == sOnclick_id ||
|
id == sOnclick_id ||
|
||||||
|
|
|
@ -237,9 +237,6 @@ protected:
|
||||||
static jsval sOnsubmit_id;
|
static jsval sOnsubmit_id;
|
||||||
static jsval sOnreset_id;
|
static jsval sOnreset_id;
|
||||||
static jsval sOnchange_id;
|
static jsval sOnchange_id;
|
||||||
static jsval sOninput_id;
|
|
||||||
static jsval sOnformchange_id;
|
|
||||||
static jsval sOnforminput_id;
|
|
||||||
static jsval sOnselect_id;
|
static jsval sOnselect_id;
|
||||||
static jsval sOnload_id;
|
static jsval sOnload_id;
|
||||||
static jsval sOnbeforeunload_id;
|
static jsval sOnbeforeunload_id;
|
||||||
|
|
|
@ -169,8 +169,6 @@ LAYOUT_ATOM(ondraggesture, "ondraggesture")
|
||||||
LAYOUT_ATOM(ondragover, "ondragover")
|
LAYOUT_ATOM(ondragover, "ondragover")
|
||||||
LAYOUT_ATOM(onerror, "onerror")
|
LAYOUT_ATOM(onerror, "onerror")
|
||||||
LAYOUT_ATOM(onfocus, "onfocus")
|
LAYOUT_ATOM(onfocus, "onfocus")
|
||||||
LAYOUT_ATOM(onformchange, "onformchange")
|
|
||||||
LAYOUT_ATOM(onforminput, "onforminput")
|
|
||||||
LAYOUT_ATOM(oninput, "oninput")
|
LAYOUT_ATOM(oninput, "oninput")
|
||||||
LAYOUT_ATOM(onkeydown, "onkeydown")
|
LAYOUT_ATOM(onkeydown, "onkeydown")
|
||||||
LAYOUT_ATOM(onkeypress, "onkeypress")
|
LAYOUT_ATOM(onkeypress, "onkeypress")
|
||||||
|
|
|
@ -2827,7 +2827,14 @@ nsTextControlFrame::FireOnInput()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
presShell->HandleEventWithTarget(&event, this, mContent,
|
nsCOMPtr<nsIPresContext> context;
|
||||||
|
presShell->GetPresContext(getter_AddRefs(context));
|
||||||
|
NS_ASSERTION(context, "No pres context");
|
||||||
|
if (!context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
presShell->HandleEventWithTarget(&event, nsnull, mContent,
|
||||||
NS_EVENT_FLAG_INIT, &status);
|
NS_EVENT_FLAG_INIT, &status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2864,9 +2871,9 @@ nsTextControlFrame::FireOnChange()
|
||||||
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
||||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
||||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||||
|
nsCOMPtr<nsIPresContext> context;
|
||||||
return presShell->HandleEventWithTarget(&event, this, mContent,
|
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||||
NS_EVENT_FLAG_INIT, &status);
|
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2827,7 +2827,14 @@ nsTextControlFrame::FireOnInput()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
presShell->HandleEventWithTarget(&event, this, mContent,
|
nsCOMPtr<nsIPresContext> context;
|
||||||
|
presShell->GetPresContext(getter_AddRefs(context));
|
||||||
|
NS_ASSERTION(context, "No pres context");
|
||||||
|
if (!context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
presShell->HandleEventWithTarget(&event, nsnull, mContent,
|
||||||
NS_EVENT_FLAG_INIT, &status);
|
NS_EVENT_FLAG_INIT, &status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2864,9 +2871,9 @@ nsTextControlFrame::FireOnChange()
|
||||||
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
||||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
||||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||||
|
nsCOMPtr<nsIPresContext> context;
|
||||||
return presShell->HandleEventWithTarget(&event, this, mContent,
|
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||||
NS_EVENT_FLAG_INIT, &status);
|
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,6 @@ HTML_TAG(object, Object)
|
||||||
HTML_TAG(ol, SharedList)
|
HTML_TAG(ol, SharedList)
|
||||||
HTML_TAG(optgroup, OptGroup)
|
HTML_TAG(optgroup, OptGroup)
|
||||||
HTML_TAG(option, Option)
|
HTML_TAG(option, Option)
|
||||||
HTML_TAG(output, Output)
|
|
||||||
HTML_TAG(p, Paragraph)
|
HTML_TAG(p, Paragraph)
|
||||||
HTML_TAG(param, Shared)
|
HTML_TAG(param, Shared)
|
||||||
HTML_TAG(parsererror, Div)
|
HTML_TAG(parsererror, Div)
|
||||||
|
|
|
@ -2341,8 +2341,6 @@ void CElementTable::InitializeElements() {
|
||||||
mDfltElements[eHTMLTag_option].mContainsGroups.mAllBits=0;
|
mDfltElements[eHTMLTag_option].mContainsGroups.mAllBits=0;
|
||||||
mDfltElements[eHTMLTag_option].mContainsGroups.mBits.mLeaf=1;
|
mDfltElements[eHTMLTag_option].mContainsGroups.mBits.mLeaf=1;
|
||||||
|
|
||||||
CElement::Initialize( mDfltElements[eHTMLTag_output], eHTMLTag_output, CBlockElement::GetGroup(), CFlowElement::GetContainedGroups());
|
|
||||||
|
|
||||||
CElement::Initialize( mDfltElements[eHTMLTag_p], eHTMLTag_p, CBlockElement::GetGroup(), CInlineElement::GetContainedGroups());
|
CElement::Initialize( mDfltElements[eHTMLTag_p], eHTMLTag_p, CBlockElement::GetGroup(), CInlineElement::GetContainedGroups());
|
||||||
mDfltElements[eHTMLTag_p].mContainsGroups.mBits.mSelf=0;
|
mDfltElements[eHTMLTag_p].mContainsGroups.mBits.mSelf=0;
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ DECL_TAG_LIST(gHRAutoClose,{eHTMLTag_p})
|
||||||
DECL_TAG_LIST(gOLAutoClose,{eHTMLTag_p COMMA eHTMLTag_ol})
|
DECL_TAG_LIST(gOLAutoClose,{eHTMLTag_p COMMA eHTMLTag_ol})
|
||||||
DECL_TAG_LIST(gDivAutoClose,{eHTMLTag_p})
|
DECL_TAG_LIST(gDivAutoClose,{eHTMLTag_p})
|
||||||
// Form controls that autoclose <select> use this
|
// Form controls that autoclose <select> use this
|
||||||
DECL_TAG_LIST(gInputAutoClose,{eHTMLTag_select COMMA eHTMLTag_optgroup COMMA eHTMLTag_option COMMA eHTMLTag_output})
|
DECL_TAG_LIST(gInputAutoClose,{eHTMLTag_select COMMA eHTMLTag_optgroup COMMA eHTMLTag_option})
|
||||||
|
|
||||||
DECL_TAG_LIST(gHeadingTags,{eHTMLTag_h1 COMMA eHTMLTag_h2 COMMA eHTMLTag_h3 COMMA eHTMLTag_h4 COMMA eHTMLTag_h5 COMMA eHTMLTag_h6})
|
DECL_TAG_LIST(gHeadingTags,{eHTMLTag_h1 COMMA eHTMLTag_h2 COMMA eHTMLTag_h3 COMMA eHTMLTag_h4 COMMA eHTMLTag_h5 COMMA eHTMLTag_h6})
|
||||||
|
|
||||||
|
@ -925,15 +925,6 @@ void InitializeElementTable(void) {
|
||||||
/*special props, prop-range*/ kNoStyleLeaksIn|kNoPropagate, kDefaultPropRange,
|
/*special props, prop-range*/ kNoStyleLeaksIn|kNoPropagate, kDefaultPropRange,
|
||||||
/*special parents,kids,skip*/ &gOptgroupParents,&gContainedInOpt,eHTMLTag_unknown);
|
/*special parents,kids,skip*/ &gOptgroupParents,&gContainedInOpt,eHTMLTag_unknown);
|
||||||
|
|
||||||
Initialize(
|
|
||||||
/*tag*/ eHTMLTag_output,
|
|
||||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
|
||||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
|
||||||
/*autoclose starttags and endtags*/ &gInputAutoClose,0,0,0,
|
|
||||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
|
||||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
|
||||||
/*special parents,kids,skip*/ 0,0,eHTMLTag_unknown);
|
|
||||||
|
|
||||||
Initialize(
|
Initialize(
|
||||||
/*tag*/ eHTMLTag_p,
|
/*tag*/ eHTMLTag_p,
|
||||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||||
|
|
|
@ -195,8 +195,6 @@ static const PRUnichar sHTMLTagUnicodeName_optgroup[] =
|
||||||
{'o', 'p', 't', 'g', 'r', 'o', 'u', 'p', '\0'};
|
{'o', 'p', 't', 'g', 'r', 'o', 'u', 'p', '\0'};
|
||||||
static const PRUnichar sHTMLTagUnicodeName_option[] =
|
static const PRUnichar sHTMLTagUnicodeName_option[] =
|
||||||
{'o', 'p', 't', 'i', 'o', 'n', '\0'};
|
{'o', 'p', 't', 'i', 'o', 'n', '\0'};
|
||||||
static const PRUnichar sHTMLTagUnicodeName_output[] =
|
|
||||||
{'o', 'u', 't', 'p', 'u', 't', '\0'};
|
|
||||||
static const PRUnichar sHTMLTagUnicodeName_p[] =
|
static const PRUnichar sHTMLTagUnicodeName_p[] =
|
||||||
{'p', '\0'};
|
{'p', '\0'};
|
||||||
static const PRUnichar sHTMLTagUnicodeName_param[] =
|
static const PRUnichar sHTMLTagUnicodeName_param[] =
|
||||||
|
|
|
@ -231,8 +231,6 @@ class nsIURI;
|
||||||
#define NS_FORM_CHANGE (NS_FORM_EVENT_START + 2)
|
#define NS_FORM_CHANGE (NS_FORM_EVENT_START + 2)
|
||||||
#define NS_FORM_SELECTED (NS_FORM_EVENT_START + 3)
|
#define NS_FORM_SELECTED (NS_FORM_EVENT_START + 3)
|
||||||
#define NS_FORM_INPUT (NS_FORM_EVENT_START + 4)
|
#define NS_FORM_INPUT (NS_FORM_EVENT_START + 4)
|
||||||
#define NS_FORM_FORMCHANGE (NS_FORM_EVENT_START + 5)
|
|
||||||
#define NS_FORM_FORMINPUT (NS_FORM_EVENT_START + 6)
|
|
||||||
|
|
||||||
//Need separate focus/blur notifications for non-native widgets
|
//Need separate focus/blur notifications for non-native widgets
|
||||||
#define NS_FOCUS_EVENT_START 1300
|
#define NS_FOCUS_EVENT_START 1300
|
||||||
|
|
Загрузка…
Ссылка в новой задаче