зеркало из https://github.com/mozilla/gecko-dev.git
Implement CloneState() for nsXFormsContextContainer to clone the model, node, context position, and context size. Merge from XFORMS_20050106_BRANCH.
This commit is contained in:
Родитель
0c7f295b2e
Коммит
94e993acd1
|
@ -86,6 +86,7 @@ public:
|
|||
|
||||
// nsIXTFElement overrides
|
||||
NS_IMETHOD OnDestroyed();
|
||||
NS_IMETHOD CloneState(nsIDOMElement *aElement);
|
||||
|
||||
// nsIXFormsControl
|
||||
NS_IMETHOD Refresh();
|
||||
|
@ -165,6 +166,22 @@ nsXFormsContextContainer::OnDestroyed()
|
|||
return nsXFormsControlStub::OnDestroyed();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsContextContainer::CloneState(nsIDOMElement *aElement)
|
||||
{
|
||||
nsCOMPtr<nsIXFormsContextControl> other = do_QueryInterface(aElement);
|
||||
if (!other) {
|
||||
NS_WARNING("CloneState called with a different type source node");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoString modelID;
|
||||
PRInt32 position, size;
|
||||
other->GetContext(modelID, getter_AddRefs(mContextNode), &position, &size);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIXFormsContextControl
|
||||
NS_IMETHODIMP
|
||||
nsXFormsContextContainer::SetContextNode(nsIDOMNode *aContextNode)
|
||||
|
|
Загрузка…
Ссылка в новой задаче