зеркало из https://github.com/mozilla/pjs.git
Implement IHtmlSelectionObject & IHtmlTextRange. Checkin on behalf of atremon@elansoftware.com. r=adamlock sr=jst a=chofmann
This commit is contained in:
Родитель
89e6e7d7d8
Коммит
26e4f586f0
|
@ -271,7 +271,33 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElement::get_parentElement(IHTMLElement __RPC_F
|
|||
IDispatch *pDisp = reinterpret_cast<IDispatch *>(mParent);
|
||||
pDisp->QueryInterface(IID_IHTMLElement, (void **) p);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> parentNode;
|
||||
mDOMNode->GetParentNode(getter_AddRefs(parentNode));
|
||||
nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(parentNode);
|
||||
if (domElement)
|
||||
{
|
||||
CIEHtmlNode *pHtmlNode = NULL;
|
||||
CIEHtmlElementInstance *pHtmlElement = NULL;
|
||||
CIEHtmlElementInstance::FindFromDOMNode(parentNode, &pHtmlNode);
|
||||
if (!pHtmlNode)
|
||||
{
|
||||
CIEHtmlElementInstance::CreateInstance(&pHtmlElement);
|
||||
if (!pHtmlElement)
|
||||
{
|
||||
NS_ASSERTION(0, "Could not create element");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
pHtmlElement->SetDOMNode(parentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
pHtmlElement = (CIEHtmlElementInstance *) pHtmlNode;
|
||||
}
|
||||
pHtmlElement->QueryInterface(IID_IHTMLElement, (void **) p);
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче