зеркало из https://github.com/mozilla/gecko-dev.git
[XForms] Remove nsXFormsXMLVisualStub and nsXFormsControlStub. Bug 339003, r=doronr+me, patch by smaug
This commit is contained in:
Родитель
02d06a42f8
Коммит
2e62de9c0b
|
@ -46,7 +46,6 @@
|
|||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsIDOMEventTarget.h"
|
||||
#include "nsIDOMXPathResult.h"
|
||||
#include "nsIXTFXMLVisualWrapper.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsXFormsModelElement.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
@ -787,13 +786,6 @@ nsXFormsControlStubBase::BeforeSetAttribute(nsIAtom *aName,
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsControlStub,
|
||||
nsXFormsXMLVisualStub,
|
||||
nsIXFormsContextControl,
|
||||
nsIXFormsControl,
|
||||
nsIXFormsControlBase)
|
||||
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsBindableControlStub,
|
||||
nsXFormsBindableStub,
|
||||
nsIXFormsContextControl,
|
||||
|
|
|
@ -54,13 +54,11 @@
|
|||
#include "nsIXFormsRepeatElement.h"
|
||||
#include "nsXFormsStubElement.h"
|
||||
#include "nsXFormsUtils.h"
|
||||
#include "nsIXTFXMLVisualWrapper.h"
|
||||
#include "nsIXTFBindableElementWrapper.h"
|
||||
#include "nsIXFormsControlBase.h"
|
||||
|
||||
class nsIDOMEvent;
|
||||
class nsIDOMXPathResult;
|
||||
class nsIXTFXMLVisualWrapper;
|
||||
|
||||
/**
|
||||
* Common stub for all XForms controls that inherit from nsIXFormsControl and
|
||||
|
@ -283,75 +281,6 @@ protected:
|
|||
nsIXFormsControl *aParent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* nsXFormsControlStub inherits from nsXFormsXMLVisualStub
|
||||
*/
|
||||
class nsXFormsControlStub : public nsXFormsControlStubBase,
|
||||
public nsXFormsXMLVisualStub
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIXTFXMLVisual overrides
|
||||
/** This sets the notification mask and initializes mElement */
|
||||
NS_IMETHOD OnCreated(nsIXTFXMLVisualWrapper *aWrapper)
|
||||
{
|
||||
nsresult rv = nsXFormsXMLVisualStub::OnCreated(aWrapper);
|
||||
return NS_SUCCEEDED(rv) ? nsXFormsControlStubBase::Create(aWrapper) : rv;
|
||||
}
|
||||
|
||||
// nsIXTFElement overrides
|
||||
NS_IMETHOD HandleDefault(nsIDOMEvent *aEvent,
|
||||
PRBool *aHandled)
|
||||
{
|
||||
return nsXFormsControlStubBase::HandleDefault(aEvent, aHandled);
|
||||
}
|
||||
|
||||
NS_IMETHOD OnDestroyed() {
|
||||
return nsXFormsControlStubBase::OnDestroyed();
|
||||
}
|
||||
|
||||
NS_IMETHOD DocumentChanged(nsIDOMDocument *aNewDocument)
|
||||
{
|
||||
return nsXFormsControlStubBase::DocumentChanged(aNewDocument);
|
||||
}
|
||||
|
||||
NS_IMETHOD ParentChanged(nsIDOMElement *aNewParent)
|
||||
{
|
||||
return nsXFormsControlStubBase::ParentChanged(aNewParent);
|
||||
}
|
||||
|
||||
NS_IMETHOD WillSetAttribute(nsIAtom *aName, const nsAString &aValue)
|
||||
{
|
||||
return nsXFormsControlStubBase::WillSetAttribute(aName, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHOD AttributeSet(nsIAtom *aName, const nsAString &aValue)
|
||||
{
|
||||
return nsXFormsControlStubBase::AttributeSet(aName, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHOD WillRemoveAttribute(nsIAtom *aName)
|
||||
{
|
||||
return nsXFormsControlStubBase::WillRemoveAttribute(aName);
|
||||
}
|
||||
|
||||
NS_IMETHOD AttributeRemoved(nsIAtom *aName)
|
||||
{
|
||||
return nsXFormsControlStubBase::AttributeRemoved(aName);
|
||||
}
|
||||
|
||||
NS_IMETHOD Bind(PRBool *aContextChanged)
|
||||
{
|
||||
return nsXFormsControlStubBase::Bind(aContextChanged);
|
||||
}
|
||||
|
||||
/** Constructor */
|
||||
nsXFormsControlStub() : nsXFormsControlStubBase() {};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* nsXFormsBindableControlStub inherits from nsXFormsBindableStub
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nsMemory.h"
|
||||
#include "nsXFormsUtils.h"
|
||||
#include "nsXFormsAtoms.h"
|
||||
#include "nsIXTFXMLVisualWrapper.h"
|
||||
#include "nsIXTFBindableElementWrapper.h"
|
||||
|
||||
static const nsIID sScriptingIIDs[] = {
|
||||
|
@ -211,195 +210,6 @@ NS_NewXFormsStubElement(nsIXTFElement **aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// nsXFormsXMLVisualStub implementation
|
||||
|
||||
NS_IMPL_ISUPPORTS3(nsXFormsXMLVisualStub, nsIXTFXMLVisual, nsIXTFVisual,
|
||||
nsIXTFElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::OnDestroyed()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetElementType(PRUint32 *aElementType)
|
||||
{
|
||||
*aElementType = nsIXTFElement::ELEMENT_TYPE_XML_VISUAL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetIsAttributeHandler(PRBool *aIsAttributeHandler)
|
||||
{
|
||||
*aIsAttributeHandler = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetScriptingInterfaces(PRUint32 *aCount,
|
||||
nsIID ***aArray)
|
||||
{
|
||||
return nsXFormsUtils::CloneScriptingInterfaces(sScriptingIIDs,
|
||||
NS_ARRAY_LENGTH(sScriptingIIDs),
|
||||
aCount, aArray);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillChangeDocument(nsIDOMDocument *aNewDocument)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::DocumentChanged(nsIDOMDocument *aNewDocument)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillChangeParent(nsIDOMElement *aNewParent)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::ParentChanged(nsIDOMElement *aNewParent)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillInsertChild(nsIDOMNode *aChild, PRUint32 aIndex)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::ChildInserted(nsIDOMNode *aChild, PRUint32 aIndex)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillAppendChild(nsIDOMNode *aChild)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::ChildAppended(nsIDOMNode *aChild)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillRemoveChild(PRUint32 aIndex)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::ChildRemoved(PRUint32 aIndex)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillSetAttribute(nsIAtom *aName,
|
||||
const nsAString &aNewValue)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::AttributeSet(nsIAtom *aName, const nsAString &aNewValue) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::WillRemoveAttribute(nsIAtom *aName)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::AttributeRemoved(nsIAtom *aName)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::BeginAddingChildren()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::DoneAddingChildren()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::HandleDefault(nsIDOMEvent *aEvent, PRBool *aHandled)
|
||||
{
|
||||
*aHandled = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetVisualContent(nsIDOMElement **aContent)
|
||||
{
|
||||
*aContent = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetInsertionPoint(nsIDOMElement **aInsertionPoint)
|
||||
{
|
||||
*aInsertionPoint = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::GetApplyDocumentStyleSheets(PRBool *aApplySheets)
|
||||
{
|
||||
*aApplySheets = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::DidLayout()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::OnCreated(nsIXTFXMLVisualWrapper *aWrapper)
|
||||
{
|
||||
NS_ENSURE_ARG(aWrapper);
|
||||
return aWrapper->SetClassAttributeName(nsXFormsAtoms::clazz);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsXMLVisualStub::CloneState(nsIDOMElement *aElement)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewXFormsXMLVisualStub(nsIXTFElement **aResult)
|
||||
{
|
||||
*aResult = new nsXFormsXMLVisualStub();
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsXFormsBindableStub implementation
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsXFormsBindableStub, nsIXTFElement, nsIXTFBindableElement)
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#define nsXFormsStubElement_h_
|
||||
|
||||
#include "nsIXTFGenericElement.h"
|
||||
#include "nsIXTFXMLVisual.h"
|
||||
#include "nsIXTFBindableElement.h"
|
||||
#include "nsIXFormsControlBase.h"
|
||||
|
||||
|
@ -65,29 +64,6 @@ public:
|
|||
NS_DECL_NSIXTFGENERICELEMENT
|
||||
};
|
||||
|
||||
/**
|
||||
* An implementation of an XForms UI control.
|
||||
*
|
||||
* This is a base class for UI controls that use nsIXTFXMLVisual.
|
||||
* Note: a pointer to the anonymous content root is _not_ provided as part
|
||||
* of this base class because different implementations want to store
|
||||
* different types of interface pointers.
|
||||
*/
|
||||
class nsXFormsXMLVisualStub : public nsIXTFXMLVisual
|
||||
{
|
||||
protected:
|
||||
// We need a virtual destructor so that when a subclass does
|
||||
// NS_IMPL_ISUPPORTS_INHERITED, our Release() implementation calls the
|
||||
// derived class destructor.
|
||||
virtual ~nsXFormsXMLVisualStub() {}
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIXTFELEMENT
|
||||
NS_DECL_NSIXTFVISUAL
|
||||
NS_DECL_NSIXTFXMLVISUAL
|
||||
};
|
||||
|
||||
/**
|
||||
* An implementation of an XForms bindable control.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче