mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00
Bug 1466643 part 2. Remove nsITreeContentView. r=mosssop
This commit is contained in:
parent
195b295697
commit
fb69fccb09
@ -10,7 +10,6 @@ with Files('**'):
|
||||
XPIDL_SOURCES += [
|
||||
'nsITreeBoxObject.idl',
|
||||
'nsITreeColumns.idl',
|
||||
'nsITreeContentView.idl',
|
||||
'nsITreeSelection.idl',
|
||||
'nsITreeView.idl',
|
||||
]
|
||||
|
@ -1,22 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
webidl Element;
|
||||
|
||||
[scriptable, builtinclass, uuid(5ef62896-0c0a-41f1-bb3c-44a60f5dfdab)]
|
||||
interface nsITreeContentView : nsISupports
|
||||
{
|
||||
/**
|
||||
* Retrieve the content item associated with the specified index.
|
||||
*/
|
||||
Element getItemAtIndex(in long index);
|
||||
|
||||
/**
|
||||
* Retrieve the index associated with the specified content item.
|
||||
*/
|
||||
long getIndexOfItem(in Element item);
|
||||
};
|
@ -116,10 +116,9 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTreeContentView)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsTreeContentView)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITreeView)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITreeContentView)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocumentObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITreeContentView)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITreeView)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
@ -875,32 +874,12 @@ nsTreeContentView::GetItemAtIndex(int32_t aIndex, ErrorResult& aError)
|
||||
return mRows[aIndex]->mContent;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeContentView::GetItemAtIndex(int32_t aIndex, Element** _retval)
|
||||
{
|
||||
ErrorResult rv;
|
||||
RefPtr<Element> element = GetItemAtIndex(aIndex, rv);
|
||||
if (rv.Failed()) {
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
element.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int32_t
|
||||
nsTreeContentView::GetIndexOfItem(Element* aItem)
|
||||
{
|
||||
return FindContent(aItem);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeContentView::GetIndexOfItem(Element* aItem, int32_t* _retval)
|
||||
{
|
||||
*_retval = GetIndexOfItem(aItem);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsTreeContentView::AttributeChanged(dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsStubDocumentObserver.h"
|
||||
#include "nsITreeBoxObject.h"
|
||||
#include "nsITreeView.h"
|
||||
#include "nsITreeContentView.h"
|
||||
#include "nsITreeSelection.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
@ -33,7 +32,6 @@ class TreeBoxObject;
|
||||
nsresult NS_NewTreeContentView(nsITreeView** aResult);
|
||||
|
||||
class nsTreeContentView final : public nsITreeView,
|
||||
public nsITreeContentView,
|
||||
public nsStubDocumentObserver,
|
||||
public nsWrapperCache
|
||||
{
|
||||
@ -119,8 +117,6 @@ class nsTreeContentView final : public nsITreeView,
|
||||
|
||||
NS_DECL_NSITREEVIEW
|
||||
|
||||
NS_DECL_NSITREECONTENTVIEW
|
||||
|
||||
// nsIDocumentObserver
|
||||
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
|
||||
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
|
||||
|
@ -84,7 +84,7 @@
|
||||
readonly="true"/>
|
||||
# contentView is obsolete (see bug 202391)
|
||||
<property name="contentView"
|
||||
onget="return this.view; /*.QueryInterface(Components.interfaces.nsITreeContentView)*/"
|
||||
onget="return this.view;"
|
||||
readonly="true"/>
|
||||
# builderView is obsolete (see bug 202393)
|
||||
<property name="builderView"
|
||||
|
Loading…
x
Reference in New Issue
Block a user