mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
bringing branch changes forward
This commit is contained in:
parent
2f6046faa8
commit
cc1433c45a
@ -629,6 +629,16 @@ 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; }
|
||||
|
@ -81,6 +81,8 @@ 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);
|
||||
|
@ -67,8 +67,9 @@ 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", "select", "input", "paint" ,"text",
|
||||
"popupshowing", "popupshown", "popuphiding", "popuphidden", "close", "command", "broadcast", "commandupdate",
|
||||
"submit", "reset", "change", "input", "formchange", "forminput", "select",
|
||||
"paint" ,"text", "popupshowing", "popupshown", "popuphiding", "popuphidden",
|
||||
"close", "command", "broadcast", "commandupdate",
|
||||
"dragenter", "dragover", "dragexit", "dragdrop", "draggesture", "resize",
|
||||
"scroll","overflow", "underflow", "overflowchanged",
|
||||
"DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved",
|
||||
@ -1161,6 +1162,12 @@ 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)
|
||||
@ -1479,10 +1486,14 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType)
|
||||
return sEventNames[eDOMEvents_reset];
|
||||
case NS_FORM_CHANGE:
|
||||
return sEventNames[eDOMEvents_change];
|
||||
case NS_FORM_SELECTED:
|
||||
return sEventNames[eDOMEvents_select];
|
||||
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_PAINT:
|
||||
return sEventNames[eDOMEvents_paint];
|
||||
case NS_RESIZE_EVENT:
|
||||
|
@ -92,8 +92,10 @@ public:
|
||||
eDOMEvents_submit,
|
||||
eDOMEvents_reset,
|
||||
eDOMEvents_change,
|
||||
eDOMEvents_select,
|
||||
eDOMEvents_input,
|
||||
eDOMEvents_formchange,
|
||||
eDOMEvents_forminput,
|
||||
eDOMEvents_select,
|
||||
eDOMEvents_paint,
|
||||
eDOMEvents_text,
|
||||
eDOMEvents_popupShowing,
|
||||
|
@ -221,7 +221,9 @@ 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_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[] = {
|
||||
@ -853,6 +855,14 @@ 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;
|
||||
|
@ -285,12 +285,14 @@ 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_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
|
||||
|
||||
//nsIDOMLoadListener
|
||||
#define NS_EVENT_BITS_LOAD_NONE 0x00
|
||||
|
@ -184,6 +184,16 @@ 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___ */
|
||||
|
@ -67,6 +67,8 @@ 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, \
|
||||
|
@ -105,6 +105,7 @@ CPPSRCS = \
|
||||
nsHTMLObjectElement.cpp \
|
||||
nsHTMLOptionElement.cpp \
|
||||
nsHTMLOptGroupElement.cpp \
|
||||
nsHTMLOutputElement.cpp \
|
||||
nsHTMLParagraphElement.cpp \
|
||||
nsHTMLPreElement.cpp \
|
||||
nsHTMLScriptElement.cpp \
|
||||
|
@ -1741,6 +1741,8 @@ 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 ||
|
||||
|
@ -1206,6 +1206,7 @@ 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)
|
||||
|
@ -141,6 +141,8 @@ 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,
|
||||
@ -250,6 +252,9 @@ protected:
|
||||
*/
|
||||
nsresult NotifySubmitObservers(nsIURI* aActionURL, PRBool* aCancelSubmit);
|
||||
|
||||
// Helper to fire events on all form controls in this form
|
||||
void FireEventOnControls(PRInt32 aEventType);
|
||||
|
||||
//
|
||||
// Data members
|
||||
//
|
||||
@ -379,6 +384,7 @@ ShouldBeInElements(nsIFormControl* aFormControl)
|
||||
case NS_FORM_TEXTAREA :
|
||||
case NS_FORM_FIELDSET :
|
||||
case NS_FORM_OBJECT :
|
||||
case NS_FORM_OUTPUT :
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
@ -1297,6 +1303,43 @@ 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<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
|
||||
nsHTMLFormElement::GetEncoding(nsAString& aEncoding)
|
||||
{
|
||||
|
@ -1364,11 +1364,20 @@ 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
|
||||
|
175
content/html/content/src/nsHTMLOutputElement.cpp
Normal file
175
content/html/content/src/nsHTMLOutputElement.cpp
Normal file
@ -0,0 +1,175 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsIWebFormsOutputElement.h"
|
||||
//#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsMappedAttributes.h"
|
||||
#include "nsRuleNode.h"
|
||||
|
||||
|
||||
class nsHTMLOutputElement : public nsGenericHTMLFormElement,
|
||||
public nsIWebFormsOutputElement
|
||||
{
|
||||
public:
|
||||
nsHTMLOutputElement(nsINodeInfo *aNodeInfo);
|
||||
virtual ~nsHTMLOutputElement();
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIWebFormsOutputElement
|
||||
NS_DECL_NSIWEBFORMSOUTPUTELEMENT
|
||||
|
||||
// nsIDOMNode
|
||||
NS_FORWARD_NSIDOMNODE_NO_CLONENODE(nsGenericHTMLFormElement::)
|
||||
|
||||
// nsIDOMElement
|
||||
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::)
|
||||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::)
|
||||
|
||||
// nsIFormControl
|
||||
NS_IMETHOD_(PRInt32) GetType()
|
||||
{
|
||||
return NS_FORM_OUTPUT;
|
||||
}
|
||||
NS_IMETHOD Reset();
|
||||
NS_IMETHOD SubmitNamesValues(nsIFormSubmission* aFormSubmission,
|
||||
nsIContent* aSubmitElement);
|
||||
};
|
||||
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Output)
|
||||
|
||||
|
||||
nsHTMLOutputElement::nsHTMLOutputElement(nsINodeInfo *aNodeInfo)
|
||||
: nsGenericHTMLFormElement(aNodeInfo)
|
||||
{
|
||||
}
|
||||
|
||||
nsHTMLOutputElement::~nsHTMLOutputElement()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsHTMLOutputElement, nsGenericElement)
|
||||
NS_IMPL_RELEASE_INHERITED(nsHTMLOutputElement, nsGenericElement)
|
||||
|
||||
|
||||
|
||||
// QueryInterface implementation for nsHTMLOutputElement
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_BEGIN(nsHTMLOutputElement,
|
||||
nsGenericHTMLFormElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebFormsOutputElement)
|
||||
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLOutputElement)
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
NS_IMPL_HTML_DOM_CLONENODE(Output)
|
||||
|
||||
|
||||
/* attribute DOMString defaultValue; */
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::GetDefaultValue(nsAString & aDefaultValue)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::SetDefaultValue(const nsAString & aDefaultValue)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMHTMLFormElement form; */
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::GetForm(nsIDOMHTMLFormElement * *aForm)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* attribute DOMString name; */
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::GetName(nsAString & aName)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::SetName(const nsAString & aName)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* attribute DOMString value; */
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::GetValue(nsAString & aValue)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOM3Node> node3 =
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIWebFormsOutputElement *, this), &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return node3->GetTextContent(aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::SetValue(const nsAString & aValue)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOM3Node> node3 =
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIWebFormsOutputElement *, this), &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return node3->SetTextContent(aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::Reset()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLOutputElement::SubmitNamesValues(nsIFormSubmission* aFormSubmission,
|
||||
nsIContent* aSubmitElement)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
@ -169,6 +169,8 @@ 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")
|
||||
|
@ -90,6 +90,9 @@ public:
|
||||
*/
|
||||
NS_IMETHOD Input(nsIDOMEvent* aEvent) = 0;
|
||||
|
||||
NS_IMETHOD FormChange(nsIDOMEvent* aEvent) = 0;
|
||||
|
||||
NS_IMETHOD FormInput(nsIDOMEvent* aEvent) = 0;
|
||||
};
|
||||
|
||||
#endif // nsIDOMFormListener_h__
|
||||
|
@ -54,7 +54,8 @@ DIRS = \
|
||||
range \
|
||||
xbl \
|
||||
xpath \
|
||||
xul
|
||||
xul \
|
||||
webforms
|
||||
|
||||
ifdef MOZ_SVG
|
||||
DIRS += svg
|
||||
|
1
dom/public/idl/webforms/.cvsignore
Normal file
1
dom/public/idl/webforms/.cvsignore
Normal file
@ -0,0 +1 @@
|
||||
Makefile
|
64
dom/public/idl/webforms/Makefile.in
Normal file
64
dom/public/idl/webforms/Makefile.in
Normal file
@ -0,0 +1,64 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = dom
|
||||
XPIDL_MODULE = dom_webforms
|
||||
GRE_MODULE = 1
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIWebFormsButtonElement.idl \
|
||||
nsIWebFormsFieldSetElement.idl \
|
||||
nsIWebFormsFormElement.idl \
|
||||
nsIWebFormsFormImplementation.idl \
|
||||
nsIWebFormsInputElement.idl \
|
||||
nsIWebFormsLabelElement.idl \
|
||||
nsIWebFormsOutputElement.idl \
|
||||
nsIWebFormsRepetitionElement.idl \
|
||||
nsIWebFormsRepetitionEvent.idl \
|
||||
nsIWebFormsSelectElement.idl \
|
||||
nsIWebFormsTextAreaElement.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
64
dom/public/idl/webforms/nsIWebFormsButtonElement.idl
Normal file
64
dom/public/idl/webforms/nsIWebFormsButtonElement.idl
Normal file
@ -0,0 +1,64 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLButtonElement.idl"
|
||||
|
||||
interface nsIWebFormsRepetitionElement;
|
||||
|
||||
[scriptable, uuid(c6b1dbab-9be8-44ef-a9a5-7ba6c8b6c2b9)]
|
||||
interface nsIWebFormsButtonElement : nsIDOMHTMLButtonElement
|
||||
{
|
||||
// defined in nsIDOMNSHTMLButtonElemenet
|
||||
// attribute DOMString type;
|
||||
// void blur();
|
||||
// void focus();
|
||||
|
||||
attribute DOMString action;
|
||||
attribute DOMString enctype;
|
||||
attribute DOMString method;
|
||||
attribute DOMString replace;
|
||||
attribute boolean autofocus;
|
||||
readonly attribute nsIDOMHTMLCollection labels;
|
||||
readonly attribute nsIWebFormsRepetitionElement template;
|
||||
|
||||
readonly attribute boolean successful;
|
||||
readonly attribute long validity;
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean validate();
|
||||
void setCustomValidity(in DOMString error);
|
||||
};
|
45
dom/public/idl/webforms/nsIWebFormsFieldSetElement.idl
Normal file
45
dom/public/idl/webforms/nsIWebFormsFieldSetElement.idl
Normal file
@ -0,0 +1,45 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLFieldSetElement.idl"
|
||||
|
||||
[scriptable, uuid(a9c6533b-4870-467a-b3f3-1f1bbd01ae65)]
|
||||
interface nsIWebFormsFieldSetElement : nsIDOMHTMLFieldSetElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
};
|
62
dom/public/idl/webforms/nsIWebFormsFormElement.idl
Normal file
62
dom/public/idl/webforms/nsIWebFormsFormElement.idl
Normal file
@ -0,0 +1,62 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLFormElement.idl"
|
||||
|
||||
[scriptable, uuid(d494e5e7-15dc-48de-930a-14ceee9833fc)]
|
||||
interface nsIWebFormsFormElement : nsIDOMHTMLFormElement
|
||||
{
|
||||
const unsigned short ERROR_TYPE_MISMATCH = 1;
|
||||
const unsigned short ERROR_RANGE_UNDERFLOW = 2;
|
||||
const unsigned short ERROR_RANGE_OVERFLOW = 4;
|
||||
const unsigned short ERROR_PRECISION_EXCEEDED = 8;
|
||||
const unsigned short ERROR_TOO_LONG = 16;
|
||||
const unsigned short ERROR_PATTERN_MISMATCH = 32;
|
||||
const unsigned short ERROR_REQUIRED = 64;
|
||||
const unsigned short ERROR_CUSTOM = 32768;
|
||||
|
||||
attribute DOMString accept;
|
||||
attribute DOMString replace;
|
||||
readonly attribute nsIDOMHTMLCollection templateElements;
|
||||
boolean validate();
|
||||
boolean willConsiderForSubmission(in nsIDOMElement element);
|
||||
void resetFromData(in nsIDOMDocument data);
|
||||
|
||||
void dispatchFormInput();
|
||||
void dispatchFormChange();
|
||||
};
|
56
dom/public/idl/webforms/nsIWebFormsFormImplementation.idl
Normal file
56
dom/public/idl/webforms/nsIWebFormsFormImplementation.idl
Normal file
@ -0,0 +1,56 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(d2b27519-fc6f-43a9-99fb-94beed0108a7)]
|
||||
interface nsIWebFormsFormImplementation : nsISupports
|
||||
{
|
||||
nsIDOMDocument load(in DOMString action,
|
||||
in nsIDOMEventListener load,
|
||||
in nsIDOMEventListener error);
|
||||
nsIDOMDocument loadWithBody(in DOMString action, in DOMString method,
|
||||
in DOMString enctype, in DOMString content,
|
||||
in nsIDOMEventListener load,
|
||||
in nsIDOMEventListener error);
|
||||
nsIDOMDocument loadWithDocument(in DOMString action, in DOMString method,
|
||||
in nsIDOMDocument document,
|
||||
in nsIDOMEventListener load,
|
||||
in nsIDOMEventListener error);
|
||||
};
|
67
dom/public/idl/webforms/nsIWebFormsInputElement.idl
Normal file
67
dom/public/idl/webforms/nsIWebFormsInputElement.idl
Normal file
@ -0,0 +1,67 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLInputElement.idl"
|
||||
|
||||
interface nsIWebFormsRepetitionElement;
|
||||
|
||||
[scriptable, uuid(3d3cc7ae-c6e7-48fd-aca1-481d048d4382)]
|
||||
interface nsIWebFormsInputElement : nsIDOMHTMLInputElement
|
||||
{
|
||||
attribute DOMString min;
|
||||
attribute DOMString max;
|
||||
attribute DOMString pattern;
|
||||
attribute boolean required;
|
||||
attribute boolean autocomplete;
|
||||
attribute boolean autofocus;
|
||||
attribute DOMString inputmode;
|
||||
readonly attribute nsIWebFormsRepetitionElement template;
|
||||
readonly attribute nsIDOMHTMLCollection labels;
|
||||
|
||||
attribute DOMString action;
|
||||
attribute DOMString enctype;
|
||||
attribute DOMString method;
|
||||
attribute DOMString replace;
|
||||
readonly attribute boolean successful;
|
||||
readonly attribute long validity;
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean validate();
|
||||
void setCustomValidity(in DOMString error);
|
||||
void changed();
|
||||
void formchanged();
|
||||
};
|
45
dom/public/idl/webforms/nsIWebFormsLabelElement.idl
Normal file
45
dom/public/idl/webforms/nsIWebFormsLabelElement.idl
Normal file
@ -0,0 +1,45 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLLabelElement.idl"
|
||||
|
||||
[scriptable, uuid(ba83b71e-41d7-4e4e-8f8c-6e73bc74fc9d)]
|
||||
interface nsIWebFormsLabelElement : nsIDOMHTMLLabelElement
|
||||
{
|
||||
readonly attribute nsIDOMElement control;
|
||||
};
|
48
dom/public/idl/webforms/nsIWebFormsOutputElement.idl
Normal file
48
dom/public/idl/webforms/nsIWebFormsOutputElement.idl
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLElement.idl"
|
||||
|
||||
[scriptable, uuid(2c80c165-fb46-4265-9ca4-2e22dc457be4)]
|
||||
interface nsIWebFormsOutputElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString defaultValue;
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
attribute DOMString name;
|
||||
attribute DOMString value;
|
||||
};
|
58
dom/public/idl/webforms/nsIWebFormsRepetitionElement.idl
Normal file
58
dom/public/idl/webforms/nsIWebFormsRepetitionElement.idl
Normal file
@ -0,0 +1,58 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(cc110f1c-3adc-4448-95f2-19a24f8ad8d5)]
|
||||
interface nsIWebFormsRepetitionElement : nsISupports
|
||||
{
|
||||
const unsigned short REPETITION_NONE = 0;
|
||||
const unsigned short REPETITION_TEMPLATE = 1;
|
||||
const unsigned short REPETITION_BLOCK = 2;
|
||||
|
||||
attribute unsigned short repetitionType;
|
||||
attribute long repetitionIndex;
|
||||
readonly attribute nsIDOMElement repetitionTemplate;
|
||||
readonly attribute nsIDOMHTMLCollection repetitionBlocks;
|
||||
void addRepetitionBlock(in nsIDOMNode refNode);
|
||||
void addRepetitionBlockByIndex(in nsIDOMNode refNode,
|
||||
in long index);
|
||||
void moveRepetitionBlock(in long distance);
|
||||
void removeRepetitionBlock();
|
||||
};
|
56
dom/public/idl/webforms/nsIWebFormsRepetitionEvent.idl
Normal file
56
dom/public/idl/webforms/nsIWebFormsRepetitionEvent.idl
Normal file
@ -0,0 +1,56 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIWebFormsRepetitionElement;
|
||||
|
||||
[scriptable, uuid(bf17dc6a-efd2-4a69-94bd-9733f7f295d2)]
|
||||
interface nsIWebFormsRepetitionEvent : nsIDOMEvent
|
||||
{
|
||||
readonly attribute nsIWebFormsRepetitionElement element;
|
||||
void initRepetitionEvent(in DOMString typeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg,
|
||||
in nsIWebFormsRepetitionElement elementArg);
|
||||
void initRepetitionEventNS(in DOMString namespaceURIArg,
|
||||
in DOMString typeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg,
|
||||
in nsIWebFormsRepetitionElement elementArg);
|
||||
};
|
61
dom/public/idl/webforms/nsIWebFormsSelectElement.idl
Normal file
61
dom/public/idl/webforms/nsIWebFormsSelectElement.idl
Normal file
@ -0,0 +1,61 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLSelectElement.idl"
|
||||
|
||||
[scriptable, uuid(dc35f909-8545-483d-92bc-78e52a5d61ba)]
|
||||
interface nsIWebFormsSelectElement : nsIDOMHTMLSelectElement
|
||||
{
|
||||
attribute boolean editable;
|
||||
attribute DOMString pattern;
|
||||
attribute boolean required;
|
||||
attribute boolean autocomplete;
|
||||
attribute boolean autofocus;
|
||||
attribute DOMString inputmode;
|
||||
attribute long maxLength;
|
||||
readonly attribute nsIDOMHTMLCollection selectedOptions;
|
||||
readonly attribute nsIDOMHTMLCollection labels;
|
||||
|
||||
readonly attribute boolean successful;
|
||||
readonly attribute long validity;
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean validate();
|
||||
void setCustomValidity(in DOMString error);
|
||||
void changed();
|
||||
void formchanged();
|
||||
};
|
60
dom/public/idl/webforms/nsIWebFormsTextAreaElement.idl
Normal file
60
dom/public/idl/webforms/nsIWebFormsTextAreaElement.idl
Normal file
@ -0,0 +1,60 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* IBM Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2004
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMHTMLTextAreaElement.idl"
|
||||
|
||||
[scriptable, uuid(b0b40732-bb66-4fc2-be54-5fc0ecf79e88)]
|
||||
interface nsIWebFormsTextAreaElement : nsIDOMHTMLTextAreaElement
|
||||
{
|
||||
attribute DOMString wrap;
|
||||
attribute DOMString pattern;
|
||||
attribute boolean required;
|
||||
attribute boolean autocomplete;
|
||||
attribute boolean autofocus;
|
||||
attribute DOMString inputmode;
|
||||
attribute long maxLength;
|
||||
readonly attribute nsIDOMHTMLCollection labels;
|
||||
|
||||
readonly attribute boolean successful;
|
||||
readonly attribute long validity;
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean validate();
|
||||
void setCustomValidity(in DOMString error);
|
||||
void changed();
|
||||
void formchanged();
|
||||
};
|
@ -291,7 +291,10 @@ 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
|
||||
};
|
||||
|
@ -338,6 +338,9 @@
|
||||
|
||||
#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);
|
||||
|
||||
@ -880,6 +883,9 @@ 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;
|
||||
@ -928,6 +934,9 @@ 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;
|
||||
@ -1033,6 +1042,9 @@ 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");
|
||||
@ -2354,6 +2366,11 @@ 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]);
|
||||
@ -2933,6 +2950,9 @@ 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;
|
||||
@ -4624,7 +4644,9 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar)
|
||||
case 'e' :
|
||||
return id == sOnerror_id;
|
||||
case 'f' :
|
||||
return id == sOnfocus_id;
|
||||
return (id == sOnfocus_id ||
|
||||
id == sOnformchange_id ||
|
||||
id == sOnforminput_id);
|
||||
case 'c' :
|
||||
return (id == sOnchange_id ||
|
||||
id == sOnclick_id ||
|
||||
|
@ -237,6 +237,9 @@ 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;
|
||||
|
@ -169,6 +169,8 @@ 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")
|
||||
|
@ -2827,14 +2827,7 @@ nsTextControlFrame::FireOnInput()
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
NS_ASSERTION(context, "No pres context");
|
||||
if (!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
presShell->HandleEventWithTarget(&event, nsnull, mContent,
|
||||
presShell->HandleEventWithTarget(&event, this, mContent,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
||||
@ -2871,9 +2864,9 @@ nsTextControlFrame::FireOnChange()
|
||||
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||
|
||||
return presShell->HandleEventWithTarget(&event, this, mContent,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2827,14 +2827,7 @@ nsTextControlFrame::FireOnInput()
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
NS_ASSERTION(context, "No pres context");
|
||||
if (!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
presShell->HandleEventWithTarget(&event, nsnull, mContent,
|
||||
presShell->HandleEventWithTarget(&event, this, mContent,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
||||
@ -2871,9 +2864,9 @@ nsTextControlFrame::FireOnChange()
|
||||
nsWeakPtr &shell = mTextSelImpl->GetPresShell();
|
||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(shell);
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)
|
||||
return presShell->HandleEventWithTarget(&event, nsnull, mContent, NS_EVENT_FLAG_INIT, &status);
|
||||
|
||||
return presShell->HandleEventWithTarget(&event, this, mContent,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -138,6 +138,7 @@ 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)
|
||||
|
@ -2341,6 +2341,8 @@ 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;
|
||||
|
||||
|
@ -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 <select> use this
|
||||
DECL_TAG_LIST(gInputAutoClose,{eHTMLTag_select COMMA eHTMLTag_optgroup COMMA eHTMLTag_option})
|
||||
DECL_TAG_LIST(gInputAutoClose,{eHTMLTag_select COMMA eHTMLTag_optgroup COMMA eHTMLTag_option COMMA eHTMLTag_output})
|
||||
|
||||
DECL_TAG_LIST(gHeadingTags,{eHTMLTag_h1 COMMA eHTMLTag_h2 COMMA eHTMLTag_h3 COMMA eHTMLTag_h4 COMMA eHTMLTag_h5 COMMA eHTMLTag_h6})
|
||||
|
||||
@ -925,6 +925,15 @@ void InitializeElementTable(void) {
|
||||
/*special props, prop-range*/ kNoStyleLeaksIn|kNoPropagate, kDefaultPropRange,
|
||||
/*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(
|
||||
/*tag*/ eHTMLTag_p,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
|
@ -195,6 +195,8 @@ static const PRUnichar sHTMLTagUnicodeName_optgroup[] =
|
||||
{'o', 'p', 't', 'g', 'r', 'o', 'u', 'p', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_option[] =
|
||||
{'o', 'p', 't', 'i', 'o', 'n', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_output[] =
|
||||
{'o', 'u', 't', 'p', 'u', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_p[] =
|
||||
{'p', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_param[] =
|
||||
|
@ -231,6 +231,8 @@ class nsIURI;
|
||||
#define NS_FORM_CHANGE (NS_FORM_EVENT_START + 2)
|
||||
#define NS_FORM_SELECTED (NS_FORM_EVENT_START + 3)
|
||||
#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
|
||||
#define NS_FOCUS_EVENT_START 1300
|
||||
|
Loading…
Reference in New Issue
Block a user