зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1466673 part 2. Remove use of nsITreeColumns in other xpidl interfaces. r=mossop
This commit is contained in:
Родитель
d6c3dd9961
Коммит
362122ad32
|
@ -33,7 +33,7 @@
|
|||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
#include "nsITreeBoxObject.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsTreeColumns.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLLabelElement.h"
|
||||
#include "mozilla/dom/MouseEventBinding.h"
|
||||
|
@ -522,7 +522,7 @@ nsCoreUtils::GetTreeBoxObject(nsIContent *aContent)
|
|||
already_AddRefed<nsITreeColumn>
|
||||
nsCoreUtils::GetFirstSensibleColumn(nsITreeBoxObject *aTree)
|
||||
{
|
||||
nsCOMPtr<nsITreeColumns> cols;
|
||||
RefPtr<nsTreeColumns> cols;
|
||||
aTree->GetColumns(getter_AddRefs(cols));
|
||||
if (!cols)
|
||||
return nullptr;
|
||||
|
@ -540,7 +540,7 @@ nsCoreUtils::GetSensibleColumnCount(nsITreeBoxObject *aTree)
|
|||
{
|
||||
uint32_t count = 0;
|
||||
|
||||
nsCOMPtr<nsITreeColumns> cols;
|
||||
RefPtr<nsTreeColumns> cols;
|
||||
aTree->GetColumns(getter_AddRefs(cols));
|
||||
if (!cols)
|
||||
return count;
|
||||
|
|
|
@ -126,7 +126,7 @@ XULTreeAccessible::Value(nsString& aValue) const
|
|||
if (currentIndex >= 0) {
|
||||
nsCOMPtr<nsITreeColumn> keyCol;
|
||||
|
||||
nsCOMPtr<nsITreeColumns> cols;
|
||||
RefPtr<nsTreeColumns> cols;
|
||||
mTree->GetColumns(getter_AddRefs(cols));
|
||||
if (cols)
|
||||
cols->GetKeyColumn(getter_AddRefs(keyCol));
|
||||
|
@ -618,7 +618,7 @@ XULTreeAccessible::TreeViewInvalidated(int32_t aStartRow, int32_t aEndRow,
|
|||
endRow = rowCount - 1;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsITreeColumns> treeColumns;
|
||||
RefPtr<nsTreeColumns> treeColumns;
|
||||
mTree->GetColumns(getter_AddRefs(treeColumns));
|
||||
if (!treeColumns)
|
||||
return;
|
||||
|
@ -983,7 +983,7 @@ XULTreeItemAccessibleBase::DispatchClickEvent(nsIContent* aContent,
|
|||
if (IsDefunct())
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsITreeColumns> columns;
|
||||
RefPtr<nsTreeColumns> columns;
|
||||
mTree->GetColumns(getter_AddRefs(columns));
|
||||
if (!columns)
|
||||
return;
|
||||
|
@ -1028,7 +1028,7 @@ XULTreeItemAccessibleBase::IsExpandable() const
|
|||
bool isEmpty = false;
|
||||
mTreeView->IsContainerEmpty(mRow, &isEmpty);
|
||||
if (!isEmpty) {
|
||||
nsCOMPtr<nsITreeColumns> columns;
|
||||
RefPtr<nsTreeColumns> columns;
|
||||
mTree->GetColumns(getter_AddRefs(columns));
|
||||
nsCOMPtr<nsITreeColumn> primaryColumn;
|
||||
if (columns) {
|
||||
|
@ -1116,7 +1116,7 @@ XULTreeItemAccessible::Shutdown()
|
|||
role
|
||||
XULTreeItemAccessible::NativeRole() const
|
||||
{
|
||||
nsCOMPtr<nsITreeColumns> columns;
|
||||
RefPtr<nsTreeColumns> columns;
|
||||
mTree->GetColumns(getter_AddRefs(columns));
|
||||
if (!columns) {
|
||||
NS_ERROR("No tree columns object in the tree!");
|
||||
|
|
|
@ -211,7 +211,7 @@ XULTreeGridAccessible::UnselectRow(uint32_t aRowIdx)
|
|||
role
|
||||
XULTreeGridAccessible::NativeRole() const
|
||||
{
|
||||
nsCOMPtr<nsITreeColumns> treeColumns;
|
||||
RefPtr<nsTreeColumns> treeColumns;
|
||||
mTree->GetColumns(getter_AddRefs(treeColumns));
|
||||
if (!treeColumns) {
|
||||
NS_ERROR("No treecolumns object for tree!");
|
||||
|
@ -391,7 +391,7 @@ void
|
|||
XULTreeGridRowAccessible::RowInvalidated(int32_t aStartColIdx,
|
||||
int32_t aEndColIdx)
|
||||
{
|
||||
nsCOMPtr<nsITreeColumns> treeColumns;
|
||||
RefPtr<nsTreeColumns> treeColumns;
|
||||
mTree->GetColumns(getter_AddRefs(treeColumns));
|
||||
if (!treeColumns)
|
||||
return;
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
#include "nsIBoxObject.h"
|
||||
#include "nsITreeBoxObject.h"
|
||||
#include "nsMenuPopupFrame.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsTreeColumns.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
|
@ -8364,7 +8364,7 @@ PresShell::GetCurrentItemAndPositionForElement(Element* aFocusedElement,
|
|||
(currentIndex - firstVisibleRow + 1) * rowHeight);
|
||||
istree = true;
|
||||
|
||||
nsCOMPtr<nsITreeColumns> cols;
|
||||
RefPtr<nsTreeColumns> cols;
|
||||
treeBox->GetColumns(getter_AddRefs(cols));
|
||||
if (cols) {
|
||||
nsCOMPtr<nsITreeColumn> col;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsError.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "mozilla/dom/TreeBoxObjectBinding.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
@ -237,7 +236,7 @@ TreeBoxObject::GetColumns()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP TreeBoxObject::GetColumns(nsITreeColumns** aColumns)
|
||||
NS_IMETHODIMP TreeBoxObject::GetColumns(nsTreeColumns** aColumns)
|
||||
{
|
||||
*aColumns = GetColumns().take();
|
||||
return NS_OK;
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
interface nsITreeView;
|
||||
interface nsITreeSelection;
|
||||
interface nsITreeColumn;
|
||||
interface nsITreeColumns;
|
||||
interface nsIScriptableRegion;
|
||||
|
||||
webidl Element;
|
||||
webidl TreeColumns;
|
||||
|
||||
/**
|
||||
* This interface cannot become builtinclass until bug 1438525 is fixed.
|
||||
|
@ -22,7 +22,7 @@ interface nsITreeBoxObject : nsISupports
|
|||
/**
|
||||
* Obtain the columns.
|
||||
*/
|
||||
readonly attribute nsITreeColumns columns;
|
||||
readonly attribute TreeColumns columns;
|
||||
|
||||
/**
|
||||
* The view that backs the tree and that supplies it with its data.
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsITreeColumns;
|
||||
|
||||
webidl Element;
|
||||
webidl TreeColumns;
|
||||
|
||||
[scriptable, uuid(ae835ecf-6b32-4660-9b43-8a270df56e02)]
|
||||
interface nsITreeColumn : nsISupports
|
||||
{
|
||||
readonly attribute Element element;
|
||||
|
||||
readonly attribute nsITreeColumns columns;
|
||||
readonly attribute TreeColumns columns;
|
||||
|
||||
readonly attribute long x;
|
||||
readonly attribute long width;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "nsIBoxObject.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/TreeBoxObject.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsTreeColumns.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "nsXULElement.h"
|
||||
|
@ -185,7 +185,7 @@ nsTreeColFrame::InvalidateColumns(bool aCanWalkFrameTree)
|
|||
{
|
||||
nsITreeBoxObject* treeBoxObject = GetTreeBoxObject();
|
||||
if (treeBoxObject) {
|
||||
nsCOMPtr<nsITreeColumns> columns;
|
||||
RefPtr<nsTreeColumns> columns;
|
||||
|
||||
if (aCanWalkFrameTree) {
|
||||
treeBoxObject->GetColumns(getter_AddRefs(columns));
|
||||
|
|
|
@ -157,7 +157,7 @@ nsTreeColumn::GetElement(Element** aElement)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeColumn::GetColumns(nsITreeColumns** aColumns)
|
||||
nsTreeColumn::GetColumns(nsTreeColumns** aColumns)
|
||||
{
|
||||
NS_IF_ADDREF(*aColumns = mColumns);
|
||||
return NS_OK;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "nsWrapperCache.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsAtom;
|
||||
class nsTreeBodyFrame;
|
||||
class nsTreeColumns;
|
||||
class nsIFrame;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsError.h"
|
||||
#include "nsIXULSortService.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "nsTreeColumns.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/TreeContentViewBinding.h"
|
||||
|
@ -951,11 +952,10 @@ nsTreeContentView::AttributeChanged(dom::Element* aElement,
|
|||
if (aElement->IsXULElement(nsGkAtoms::treecol)) {
|
||||
if (aAttribute == nsGkAtoms::properties) {
|
||||
if (mBoxObject) {
|
||||
nsCOMPtr<nsITreeColumns> cols;
|
||||
RefPtr<nsTreeColumns> cols;
|
||||
mBoxObject->GetColumns(getter_AddRefs(cols));
|
||||
if (cols) {
|
||||
nsCOMPtr<nsITreeColumn> col;
|
||||
cols->GetColumnFor(aElement, getter_AddRefs(col));
|
||||
RefPtr<nsTreeColumn> col = cols->GetColumnFor(aElement);
|
||||
mBoxObject->InvalidateColumn(col);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче