DeCOMify GetParent/GetBindingParent/GetDocument on nsIContent. Bug 213823,

r+sr=jst
This commit is contained in:
bzbarsky%mit.edu 2006-05-17 02:38:07 +00:00
parent 3089eb2c8a
commit 947cbde304
2 changed files with 4 additions and 9 deletions

View File

@ -316,11 +316,8 @@ inDOMView::GetCellProperties(PRInt32 row, const PRUnichar *colID, nsISupportsArr
if (!node) return NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content = do_QueryInterface(node->node);
if (content) {
nsCOMPtr<nsIContent> bparent;
content->GetBindingParent(getter_AddRefs(bparent));
if (bparent)
properties->AppendElement(kAnonymousAtom);
if (content && content->GetBindingParent()) {
properties->AppendElement(kAnonymousAtom);
}
PRUint16 nodeType;

View File

@ -174,8 +174,7 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
nsRect* rect = new nsRect(0,0,0,0);
nsCOMPtr<nsIContent> content = do_QueryInterface(aElement);
nsCOMPtr<nsIDocument> doc;
content->GetDocument(getter_AddRefs(doc));
nsCOMPtr<nsIDocument> doc = content->GetDocument();
if (doc) {
// Get Presentation shell 0
@ -260,8 +259,7 @@ inLayoutUtils::GetSubDocumentFor(nsIDOMNode* aNode)
{
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
if (content) {
nsCOMPtr<nsIDocument> doc;
content->GetDocument(getter_AddRefs(doc));
nsCOMPtr<nsIDocument> doc = content->GetDocument();
if (doc) {
nsCOMPtr<nsIDocument> sub_doc;
doc->GetSubDocumentFor(content, getter_AddRefs(sub_doc));