This should be that last of the nsIContent stuff for now.

This commit is contained in:
bzbarsky%mit.edu 2003-07-29 06:04:46 +00:00
Родитель 7662f25d26
Коммит 2bdf4ab6e6
3 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -132,8 +132,7 @@ const int kBookmarksRootItemTag = -2;
if (!content)
return;
nsCOMPtr<nsIContent> parentContent;
content->GetParent(getter_AddRefs(parentContent));
nsCOMPtr<nsIContent> parentContent = content->GetParent();
nsCOMPtr<nsIContent> root;
BookmarksService::GetRootContent(getter_AddRefs(root));
@ -483,7 +482,7 @@ const int kBookmarksRootItemTag = -2;
nsCOMPtr<nsIContent> parent;
if (item)
item->GetParent(getter_AddRefs(parent));
parent = item->GetParent();
if (parent) // we're not the root
bmItem = [[BookmarksManager sharedBookmarksManager] getWrapperForContent:item];

Просмотреть файл

@ -146,11 +146,10 @@
- (NSMenu*)locateMenuForContent:(nsIContent*)content
{
nsCOMPtr<nsIContent> parent;
if (content == mRootContent)
return mMenu;
content->GetParent(getter_AddRefs(parent));
nsCOMPtr<nsIContent> parent = content->GetParent();
if (!parent)
return nil; // not in our subtree
@ -215,8 +214,7 @@
BookmarkItem* bmItem = [bmManager getWrapperForContent:bookmark];
// XXX fix to not use nsIContent
nsCOMPtr<nsIContent> parent;
bookmark->GetParent(getter_AddRefs(parent));
nsCOMPtr<nsIContent> parent = bookmark->GetParent();
NSMenu* menu = [self locateMenuForContent:parent];
if (!menu) return;

Просмотреть файл

@ -1293,8 +1293,7 @@ BookmarksService::DoAncestorsIncludeNode(BookmarkItem* bookmark, BookmarkItem* s
return true;
// If a match wasn't found, set up the next node to compare
nsCOMPtr<nsIContent> oldCurrent = current;
oldCurrent->GetParent(getter_AddRefs(current));
current = current->GetParent();
}
return false;
@ -1383,8 +1382,7 @@ BookmarksService::IsBookmarkDropValid(BookmarkItem* proposedParent, int index, N
if (!isCopy && [draggedItems count] == 1)
{
BookmarkItem* draggedItem = [draggedItems objectAtIndex:0];
nsCOMPtr<nsIContent> parentContent;
[draggedItem contentNode]->GetParent(getter_AddRefs(parentContent));
nsCOMPtr<nsIContent> parentContent = [draggedItem contentNode]->GetParent();
PRInt32 childIndex;
if (parentContent && NS_SUCCEEDED(parentContent->IndexOf([draggedItem contentNode], childIndex)))
{
@ -1449,7 +1447,7 @@ BookmarksService::PerformBookmarkDrop(BookmarkItem* parent, BookmarkItem* before
// get the dragged nodes parent
nsCOMPtr<nsIContent> draggedParent;
if (draggedNode)
draggedNode->GetParent(getter_AddRefs(draggedParent));
draggedParent = draggedNode->GetParent();
// get the proposed parent
nsCOMPtr<nsIContent> proposedParent = [parent contentNode];
@ -1721,8 +1719,7 @@ BookmarksService::PerformURLDrop(BookmarkItem* parentItem, BookmarkItem* beforeI
- (BookmarkItem*)parentItem
{
nsCOMPtr<nsIContent> parentContent;
mContentNode->GetParent(getter_AddRefs(parentContent));
nsCOMPtr<nsIContent> parentContent = mContentNode->GetParent();
nsCOMPtr<nsIContent> rootContent;
BookmarksService::GetRootContent(getter_AddRefs(rootContent));