From 55d74e870b5d6eeb8dad3f820d49aaf9d213b606 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Mon, 21 Jun 2004 23:41:30 +0000 Subject: [PATCH] oops, this wasn't supposed to go on the trunk. backing out. --- accessible/src/base/nsRootAccessible.cpp | 10 ----- accessible/src/base/nsRootAccessible.h | 2 - content/events/src/nsDOMEvent.cpp | 19 ++------ content/events/src/nsDOMEvent.h | 4 +- content/events/src/nsEventListenerManager.cpp | 12 +----- content/events/src/nsEventListenerManager.h | 14 +++--- content/html/content/public/nsIForm.h | 10 ----- content/html/content/public/nsIFormControl.h | 2 - content/html/content/src/Makefile.in | 1 - .../html/content/src/nsGenericHTMLElement.cpp | 2 - .../html/content/src/nsGenericHTMLElement.h | 1 - .../html/content/src/nsHTMLFormElement.cpp | 43 ------------------- .../html/content/src/nsHTMLInputElement.cpp | 11 +---- .../html/content/src/nsHTMLOutputElement.cpp | 0 content/shared/public/nsLayoutAtomList.h | 2 - dom/public/coreEvents/nsIDOMFormListener.h | 3 -- dom/public/idl/Makefile.in | 3 +- dom/public/idl/webforms/.cvsignore | 0 dom/public/idl/webforms/Makefile.in | 0 .../idl/webforms/nsIWebFormsButtonElement.idl | 0 .../webforms/nsIWebFormsFieldSetElement.idl | 0 .../idl/webforms/nsIWebFormsFormElement.idl | 0 .../nsIWebFormsFormImplementation.idl | 0 .../idl/webforms/nsIWebFormsInputElement.idl | 0 .../idl/webforms/nsIWebFormsLabelElement.idl | 0 .../idl/webforms/nsIWebFormsOutputElement.idl | 0 .../webforms/nsIWebFormsRepetitionElement.idl | 0 .../webforms/nsIWebFormsRepetitionEvent.idl | 0 .../idl/webforms/nsIWebFormsSelectElement.idl | 0 .../webforms/nsIWebFormsTextAreaElement.idl | 0 dom/public/nsIDOMClassInfo.h | 5 +-- dom/src/base/nsDOMClassInfo.cpp | 24 +---------- dom/src/base/nsDOMClassInfo.h | 3 -- layout/base/nsLayoutAtomList.h | 2 - layout/forms/nsTextControlFrame.cpp | 15 +++++-- layout/html/forms/src/nsTextControlFrame.cpp | 15 +++++-- parser/htmlparser/public/nsHTMLTagList.h | 1 - parser/htmlparser/src/COtherElements.h | 2 - parser/htmlparser/src/nsElementTable.cpp | 11 +---- parser/htmlparser/src/nsHTMLTags.cpp | 2 - widget/public/nsGUIEvent.h | 2 - 41 files changed, 39 insertions(+), 182 deletions(-) delete mode 100644 content/html/content/src/nsHTMLOutputElement.cpp delete mode 100644 dom/public/idl/webforms/.cvsignore delete mode 100644 dom/public/idl/webforms/Makefile.in delete mode 100644 dom/public/idl/webforms/nsIWebFormsButtonElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsFieldSetElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsFormElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsFormImplementation.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsInputElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsLabelElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsOutputElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsRepetitionElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsRepetitionEvent.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsSelectElement.idl delete mode 100644 dom/public/idl/webforms/nsIWebFormsTextAreaElement.idl diff --git a/accessible/src/base/nsRootAccessible.cpp b/accessible/src/base/nsRootAccessible.cpp index e59a08491b2..81ce932b1bb 100644 --- a/accessible/src/base/nsRootAccessible.cpp +++ b/accessible/src/base/nsRootAccessible.cpp @@ -629,16 +629,6 @@ NS_IMETHODIMP nsRootAccessible::Input(nsIDOMEvent* aEvent) return NS_OK; } -NS_IMETHODIMP nsRootAccessible::FormChange(nsIDOMEvent* aEvent) -{ - return NS_OK; -} - -NS_IMETHODIMP nsRootAccessible::FormInput(nsIDOMEvent* aEvent) -{ - return NS_OK; -} - // ------- nsIDOMXULListener Methods (8) --------------- NS_IMETHODIMP nsRootAccessible::PopupShowing(nsIDOMEvent* aEvent) { return NS_OK; } diff --git a/accessible/src/base/nsRootAccessible.h b/accessible/src/base/nsRootAccessible.h index c9cbd3eeb61..39e536cc23c 100644 --- a/accessible/src/base/nsRootAccessible.h +++ b/accessible/src/base/nsRootAccessible.h @@ -81,8 +81,6 @@ class nsRootAccessible : public nsDocAccessibleWrap, NS_IMETHOD Change(nsIDOMEvent* aEvent); NS_IMETHOD Select(nsIDOMEvent* aEvent); NS_IMETHOD Input(nsIDOMEvent* aEvent); - NS_IMETHOD FormChange(nsIDOMEvent* aEvent); - NS_IMETHOD FormInput(nsIDOMEvent* aEvent); // ----- nsIDOMXULListener --------------------------- NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent); diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 70fa50bb7e7..932594088bf 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -67,9 +67,8 @@ static const char* const sEventNames[] = { "mousedown", "mouseup", "click", "dblclick", "mouseover", "mouseout", "mousemove", "contextmenu", "keydown", "keyup", "keypress", "focus", "blur", "load", "beforeunload", "unload", "abort", "error", - "submit", "reset", "change", "input", "formchange", "forminput", "select", - "paint" ,"text", "popupshowing", "popupshown", "popuphiding", "popuphidden", - "close", "command", "broadcast", "commandupdate", + "submit", "reset", "change", "select", "input", "paint" ,"text", + "popupshowing", "popupshown", "popuphiding", "popuphidden", "close", "command", "broadcast", "commandupdate", "dragenter", "dragover", "dragexit", "dragdrop", "draggesture", "resize", "scroll","overflow", "underflow", "overflowchanged", "DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved", @@ -1162,12 +1161,6 @@ nsDOMEvent::SetEventType(const nsAString& aEventTypeArg) mEvent->message = NS_FORM_RESET; else if (atom == nsLayoutAtoms::onchange) 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) mEvent->message = NS_FORM_SELECTED; else if (atom == nsLayoutAtoms::onload) @@ -1486,14 +1479,10 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType) return sEventNames[eDOMEvents_reset]; case NS_FORM_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: return sEventNames[eDOMEvents_select]; + case NS_FORM_INPUT: + return sEventNames[eDOMEvents_input]; case NS_PAINT: return sEventNames[eDOMEvents_paint]; case NS_RESIZE_EVENT: diff --git a/content/events/src/nsDOMEvent.h b/content/events/src/nsDOMEvent.h index e3fbfa8e306..676e792e3b9 100644 --- a/content/events/src/nsDOMEvent.h +++ b/content/events/src/nsDOMEvent.h @@ -92,10 +92,8 @@ public: eDOMEvents_submit, eDOMEvents_reset, eDOMEvents_change, - eDOMEvents_input, - eDOMEvents_formchange, - eDOMEvents_forminput, eDOMEvents_select, + eDOMEvents_input, eDOMEvents_paint, eDOMEvents_text, eDOMEvents_popupShowing, diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp index 8f3fca99602..98e2063a222 100644 --- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -221,9 +221,7 @@ static const EventDispatchData sFormEvents[] = { {NS_FORM_RESET, HANDLER(&nsIDOMFormListener::Reset), NS_EVENT_BITS_FORM_RESET}, {NS_FORM_CHANGE, HANDLER(&nsIDOMFormListener::Change),NS_EVENT_BITS_FORM_CHANGE}, {NS_FORM_SELECTED,HANDLER(&nsIDOMFormListener::Select),NS_EVENT_BITS_FORM_SELECT}, - {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} + {NS_FORM_INPUT, HANDLER(&nsIDOMFormListener::Input), NS_EVENT_BITS_FORM_INPUT} }; static const EventDispatchData sLoadEvents[] = { @@ -855,14 +853,6 @@ nsEventListenerManager::GetIdentifiersForType(nsIAtom* aType, *aArrayType = eEventArrayType_Form; *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) { *aArrayType = eEventArrayType_Load; *aFlags = NS_EVENT_BITS_LOAD_LOAD; diff --git a/content/events/src/nsEventListenerManager.h b/content/events/src/nsEventListenerManager.h index 745c9207e67..c847d803d34 100644 --- a/content/events/src/nsEventListenerManager.h +++ b/content/events/src/nsEventListenerManager.h @@ -285,14 +285,12 @@ protected: #define NS_EVENT_BITS_FOCUS_BLUR 0x02 //nsIDOMFormListener -#define NS_EVENT_BITS_FORM_NONE 0x00 -#define NS_EVENT_BITS_FORM_SUBMIT 0x01 -#define NS_EVENT_BITS_FORM_RESET 0x02 -#define NS_EVENT_BITS_FORM_CHANGE 0x04 -#define NS_EVENT_BITS_FORM_SELECT 0x08 -#define NS_EVENT_BITS_FORM_INPUT 0x10 -#define NS_EVENT_BITS_FORM_FORMCHANGE 0x11 -#define NS_EVENT_BITS_FORM_FORMINPUT 0x12 +#define NS_EVENT_BITS_FORM_NONE 0x00 +#define NS_EVENT_BITS_FORM_SUBMIT 0x01 +#define NS_EVENT_BITS_FORM_RESET 0x02 +#define NS_EVENT_BITS_FORM_CHANGE 0x04 +#define NS_EVENT_BITS_FORM_SELECT 0x08 +#define NS_EVENT_BITS_FORM_INPUT 0x10 //nsIDOMLoadListener #define NS_EVENT_BITS_LOAD_NONE 0x00 diff --git a/content/html/content/public/nsIForm.h b/content/html/content/public/nsIForm.h index d21c111bef5..80d567a8e48 100644 --- a/content/html/content/public/nsIForm.h +++ b/content/html/content/public/nsIForm.h @@ -184,16 +184,6 @@ public: */ 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___ */ diff --git a/content/html/content/public/nsIFormControl.h b/content/html/content/public/nsIFormControl.h index bb57ca84eb2..b6d8726902c 100644 --- a/content/html/content/public/nsIFormControl.h +++ b/content/html/content/public/nsIFormControl.h @@ -67,8 +67,6 @@ class nsIFormSubmission; #define NS_FORM_SELECT 19 #define NS_FORM_TEXTAREA 20 #define NS_FORM_OBJECT 21 -#define NS_FORM_OUTPUT 22 - #define NS_IFORMCONTROL_IID \ { 0x282ff440, 0xcd7e, 0x11d1, \ diff --git a/content/html/content/src/Makefile.in b/content/html/content/src/Makefile.in index f2181b43696..d031e908d0e 100644 --- a/content/html/content/src/Makefile.in +++ b/content/html/content/src/Makefile.in @@ -105,7 +105,6 @@ CPPSRCS = \ nsHTMLObjectElement.cpp \ nsHTMLOptionElement.cpp \ nsHTMLOptGroupElement.cpp \ - nsHTMLOutputElement.cpp \ nsHTMLParagraphElement.cpp \ nsHTMLPreElement.cpp \ nsHTMLScriptElement.cpp \ diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 54c79ce3140..9be401d7e2f 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1741,8 +1741,6 @@ PRBool nsGenericHTMLElement::IsEventName(nsIAtom* aName) aName == nsLayoutAtoms::onabort || aName == nsLayoutAtoms::onerror || aName == nsLayoutAtoms::onfocus || - aName == nsLayoutAtoms::onformchange || - aName == nsLayoutAtoms::onforminput || aName == nsLayoutAtoms::onblur || aName == nsLayoutAtoms::onsubmit || aName == nsLayoutAtoms::onreset || diff --git a/content/html/content/src/nsGenericHTMLElement.h b/content/html/content/src/nsGenericHTMLElement.h index c9a0cbde1fa..0aaff53d3b2 100644 --- a/content/html/content/src/nsGenericHTMLElement.h +++ b/content/html/content/src/nsGenericHTMLElement.h @@ -1206,7 +1206,6 @@ NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedList) NS_DECLARE_NS_NEW_HTML_ELEMENT(Object) NS_DECLARE_NS_NEW_HTML_ELEMENT(OptGroup) 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(Pre) NS_DECLARE_NS_NEW_HTML_ELEMENT(Script) diff --git a/content/html/content/src/nsHTMLFormElement.cpp b/content/html/content/src/nsHTMLFormElement.cpp index e8f89e3dd0e..4512764c6fb 100644 --- a/content/html/content/src/nsHTMLFormElement.cpp +++ b/content/html/content/src/nsHTMLFormElement.cpp @@ -141,8 +141,6 @@ public: NS_IMETHOD FlushPendingSubmission(); NS_IMETHOD ForgetPendingSubmission(); NS_IMETHOD GetActionURL(nsIURI** aActionURL); - virtual void FireFormChangeEvent(); - virtual void FireFormInputEvent(); // nsIRadioGroupContainer NS_IMETHOD SetCurrentRadioButton(const nsAString& aName, @@ -252,9 +250,6 @@ protected: */ nsresult NotifySubmitObservers(nsIURI* aActionURL, PRBool* aCancelSubmit); - // Helper to fire events on all form controls in this form - void FireEventOnControls(PRInt32 aEventType); - // // Data members // @@ -384,7 +379,6 @@ ShouldBeInElements(nsIFormControl* aFormControl) case NS_FORM_TEXTAREA : case NS_FORM_FIELDSET : case NS_FORM_OBJECT : - case NS_FORM_OUTPUT : return PR_TRUE; } @@ -1303,43 +1297,6 @@ nsHTMLFormElement::GetActionURL(nsIURI** aActionURL) 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 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 nsHTMLFormElement::GetEncoding(nsAString& aEncoding) { diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index a6cd943e835..95d8403cc2a 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -1364,20 +1364,11 @@ nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext, PRInt32 oldType = mType; // 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, aDOMEvent, aFlags, 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 // DOMActivate, and the default action for DOMActivate flip the checkbox/ // radio state and fire onchange. However, for backwards compatibility, we diff --git a/content/html/content/src/nsHTMLOutputElement.cpp b/content/html/content/src/nsHTMLOutputElement.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/content/shared/public/nsLayoutAtomList.h b/content/shared/public/nsLayoutAtomList.h index 3091c746303..6e42dff67b8 100644 --- a/content/shared/public/nsLayoutAtomList.h +++ b/content/shared/public/nsLayoutAtomList.h @@ -169,8 +169,6 @@ LAYOUT_ATOM(ondraggesture, "ondraggesture") LAYOUT_ATOM(ondragover, "ondragover") LAYOUT_ATOM(onerror, "onerror") LAYOUT_ATOM(onfocus, "onfocus") -LAYOUT_ATOM(onformchange, "onformchange") -LAYOUT_ATOM(onforminput, "onforminput") LAYOUT_ATOM(oninput, "oninput") LAYOUT_ATOM(onkeydown, "onkeydown") LAYOUT_ATOM(onkeypress, "onkeypress") diff --git a/dom/public/coreEvents/nsIDOMFormListener.h b/dom/public/coreEvents/nsIDOMFormListener.h index 7092cfc6ef2..6738674fb9a 100644 --- a/dom/public/coreEvents/nsIDOMFormListener.h +++ b/dom/public/coreEvents/nsIDOMFormListener.h @@ -90,9 +90,6 @@ public: */ NS_IMETHOD Input(nsIDOMEvent* aEvent) = 0; - NS_IMETHOD FormChange(nsIDOMEvent* aEvent) = 0; - - NS_IMETHOD FormInput(nsIDOMEvent* aEvent) = 0; }; #endif // nsIDOMFormListener_h__ diff --git a/dom/public/idl/Makefile.in b/dom/public/idl/Makefile.in index 8edd36c438f..40010df0eec 100644 --- a/dom/public/idl/Makefile.in +++ b/dom/public/idl/Makefile.in @@ -54,8 +54,7 @@ DIRS = \ range \ xbl \ xpath \ - xul \ - webforms + xul ifdef MOZ_SVG DIRS += svg diff --git a/dom/public/idl/webforms/.cvsignore b/dom/public/idl/webforms/.cvsignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/Makefile.in b/dom/public/idl/webforms/Makefile.in deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsButtonElement.idl b/dom/public/idl/webforms/nsIWebFormsButtonElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsFieldSetElement.idl b/dom/public/idl/webforms/nsIWebFormsFieldSetElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsFormElement.idl b/dom/public/idl/webforms/nsIWebFormsFormElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsFormImplementation.idl b/dom/public/idl/webforms/nsIWebFormsFormImplementation.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsInputElement.idl b/dom/public/idl/webforms/nsIWebFormsInputElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsLabelElement.idl b/dom/public/idl/webforms/nsIWebFormsLabelElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsOutputElement.idl b/dom/public/idl/webforms/nsIWebFormsOutputElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsRepetitionElement.idl b/dom/public/idl/webforms/nsIWebFormsRepetitionElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsRepetitionEvent.idl b/dom/public/idl/webforms/nsIWebFormsRepetitionEvent.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsSelectElement.idl b/dom/public/idl/webforms/nsIWebFormsSelectElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/idl/webforms/nsIWebFormsTextAreaElement.idl b/dom/public/idl/webforms/nsIWebFormsTextAreaElement.idl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dom/public/nsIDOMClassInfo.h b/dom/public/nsIDOMClassInfo.h index df7f8590d10..10533d6ef5b 100644 --- a/dom/public/nsIDOMClassInfo.h +++ b/dom/public/nsIDOMClassInfo.h @@ -291,10 +291,7 @@ enum nsDOMClassInfoID { eDOMClassInfo_SVGImageElement_id, eDOMClassInfo_SVGStyleElement_id, #endif //MOZ_SVG - - // WebForms 2.0 classes - eDOMClassInfo_HTMLOutputElement_id, - + // This one better be the last one in this list eDOMClassInfoIDCount }; diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp index 92ba2b5a1be..7dc6bfe033c 100644 --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/dom/src/base/nsDOMClassInfo.cpp @@ -338,9 +338,6 @@ #include "nsIImageDocument.h" -#include "nsIWebFormsOutputElement.h" - - static NS_DEFINE_CID(kCPluginManagerCID, NS_PLUGINMANAGER_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, ELEMENT_SCRIPTABLE_FLAGS) #endif - - NS_DEFINE_CLASSINFO_DATA(HTMLOutputElement, nsHTMLElementSH, - ELEMENT_SCRIPTABLE_FLAGS) }; nsIXPConnect *nsDOMClassInfo::sXPConnect = nsnull; @@ -934,9 +928,6 @@ jsval nsDOMClassInfo::sOnblur_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnsubmit_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnreset_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::sOnload_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(sOnreset_id, cx, "onreset"); 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(sOnload_id, cx, "onload"); SET_JSVAL_TO_STRING(sOnbeforeunload_id, cx, "onbeforeunload"); @@ -2366,11 +2354,6 @@ nsDOMClassInfo::Init() #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 { PRUint32 i = sizeof(sClassInfoData) / sizeof(sClassInfoData[0]); @@ -2950,9 +2933,6 @@ nsDOMClassInfo::ShutDown() sOnsubmit_id = JSVAL_VOID; sOnreset_id = JSVAL_VOID; sOnchange_id = JSVAL_VOID; - sOninput_id = JSVAL_VOID; - sOnformchange_id = JSVAL_VOID; - sOnforminput_id = JSVAL_VOID; sOnselect_id = JSVAL_VOID; sOnload_id = JSVAL_VOID; sOnbeforeunload_id = JSVAL_VOID; @@ -4644,9 +4624,7 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar) case 'e' : return id == sOnerror_id; case 'f' : - return (id == sOnfocus_id || - id == sOnformchange_id || - id == sOnforminput_id); + return id == sOnfocus_id; case 'c' : return (id == sOnchange_id || id == sOnclick_id || diff --git a/dom/src/base/nsDOMClassInfo.h b/dom/src/base/nsDOMClassInfo.h index 61ea5589dac..ea828913cf1 100644 --- a/dom/src/base/nsDOMClassInfo.h +++ b/dom/src/base/nsDOMClassInfo.h @@ -237,9 +237,6 @@ protected: static jsval sOnsubmit_id; static jsval sOnreset_id; static jsval sOnchange_id; - static jsval sOninput_id; - static jsval sOnformchange_id; - static jsval sOnforminput_id; static jsval sOnselect_id; static jsval sOnload_id; static jsval sOnbeforeunload_id; diff --git a/layout/base/nsLayoutAtomList.h b/layout/base/nsLayoutAtomList.h index 3091c746303..6e42dff67b8 100644 --- a/layout/base/nsLayoutAtomList.h +++ b/layout/base/nsLayoutAtomList.h @@ -169,8 +169,6 @@ LAYOUT_ATOM(ondraggesture, "ondraggesture") LAYOUT_ATOM(ondragover, "ondragover") LAYOUT_ATOM(onerror, "onerror") LAYOUT_ATOM(onfocus, "onfocus") -LAYOUT_ATOM(onformchange, "onformchange") -LAYOUT_ATOM(onforminput, "onforminput") LAYOUT_ATOM(oninput, "oninput") LAYOUT_ATOM(onkeydown, "onkeydown") LAYOUT_ATOM(onkeypress, "onkeypress") diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index e9565ba9e8e..f6e4c1b9c8e 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -2827,7 +2827,14 @@ nsTextControlFrame::FireOnInput() return; } - presShell->HandleEventWithTarget(&event, this, mContent, + nsCOMPtr 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); } @@ -2864,9 +2871,9 @@ nsTextControlFrame::FireOnChange() nsWeakPtr &shell = mTextSelImpl->GetPresShell(); nsCOMPtr presShell = do_QueryReferent(shell); NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE); - - return presShell->HandleEventWithTarget(&event, this, mContent, - NS_EVENT_FLAG_INIT, &status); + nsCOMPtr context; + if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context) + return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status); } return NS_OK; } diff --git a/layout/html/forms/src/nsTextControlFrame.cpp b/layout/html/forms/src/nsTextControlFrame.cpp index e9565ba9e8e..f6e4c1b9c8e 100644 --- a/layout/html/forms/src/nsTextControlFrame.cpp +++ b/layout/html/forms/src/nsTextControlFrame.cpp @@ -2827,7 +2827,14 @@ nsTextControlFrame::FireOnInput() return; } - presShell->HandleEventWithTarget(&event, this, mContent, + nsCOMPtr 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); } @@ -2864,9 +2871,9 @@ nsTextControlFrame::FireOnChange() nsWeakPtr &shell = mTextSelImpl->GetPresShell(); nsCOMPtr presShell = do_QueryReferent(shell); NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE); - - return presShell->HandleEventWithTarget(&event, this, mContent, - NS_EVENT_FLAG_INIT, &status); + nsCOMPtr context; + if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context) + return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status); } return NS_OK; } diff --git a/parser/htmlparser/public/nsHTMLTagList.h b/parser/htmlparser/public/nsHTMLTagList.h index d02ebcdb926..70def89f2b5 100644 --- a/parser/htmlparser/public/nsHTMLTagList.h +++ b/parser/htmlparser/public/nsHTMLTagList.h @@ -138,7 +138,6 @@ HTML_TAG(object, Object) HTML_TAG(ol, SharedList) HTML_TAG(optgroup, OptGroup) HTML_TAG(option, Option) -HTML_TAG(output, Output) HTML_TAG(p, Paragraph) HTML_TAG(param, Shared) HTML_TAG(parsererror, Div) diff --git a/parser/htmlparser/src/COtherElements.h b/parser/htmlparser/src/COtherElements.h index e7c05f38058..7d40be9428a 100644 --- a/parser/htmlparser/src/COtherElements.h +++ b/parser/htmlparser/src/COtherElements.h @@ -2341,8 +2341,6 @@ void CElementTable::InitializeElements() { mDfltElements[eHTMLTag_option].mContainsGroups.mAllBits=0; 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()); mDfltElements[eHTMLTag_p].mContainsGroups.mBits.mSelf=0; diff --git a/parser/htmlparser/src/nsElementTable.cpp b/parser/htmlparser/src/nsElementTable.cpp index 0fa4a19f701..c951b3af6fa 100644 --- a/parser/htmlparser/src/nsElementTable.cpp +++ b/parser/htmlparser/src/nsElementTable.cpp @@ -154,7 +154,7 @@ DECL_TAG_LIST(gHRAutoClose,{eHTMLTag_p}) DECL_TAG_LIST(gOLAutoClose,{eHTMLTag_p COMMA eHTMLTag_ol}) DECL_TAG_LIST(gDivAutoClose,{eHTMLTag_p}) // Form controls that autoclose