зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415677 part 2. Remove nsIDOMHTMLCollection::Item. r=qdot
MozReview-Commit-ID: AQUjBQhXLHE
This commit is contained in:
Родитель
76943406f3
Коммит
ee1bca0ce2
|
@ -78,10 +78,6 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsBaseContentList)
|
|||
return nsCCUncollectableMarker::sGeneration && tmp->HasKnownLiveWrapper();
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
|
||||
|
||||
#define NS_CONTENT_LIST_INTERFACES(_class) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, nsINodeList) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, nsIDOMNodeList)
|
||||
|
||||
// QueryInterface implementation for nsBaseContentList
|
||||
NS_INTERFACE_TABLE_HEAD(nsBaseContentList)
|
||||
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
|
||||
|
|
|
@ -155,6 +155,8 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsEmptyContentList,
|
||||
nsBaseContentList)
|
||||
NS_DECL_NSIDOMHTMLCOLLECTION
|
||||
// Need Item because we also implement nsIDOMNodeList.
|
||||
NS_IMETHOD Item(uint32_t aIndex, nsIDOMNode** aReturn);
|
||||
|
||||
virtual nsINode* GetParentObject() override
|
||||
{
|
||||
|
@ -333,6 +335,8 @@ public:
|
|||
|
||||
// nsIDOMHTMLCollection
|
||||
NS_DECL_NSIDOMHTMLCOLLECTION
|
||||
// Need Item because we also implement nsIDOMNodeList.
|
||||
NS_IMETHOD Item(uint32_t aIndex, nsIDOMNode** aReturn);
|
||||
|
||||
// nsBaseContentList overrides
|
||||
virtual int32_t IndexOf(nsIContent *aContent, bool aDoFlush) override;
|
||||
|
|
|
@ -674,14 +674,6 @@ SimpleHTMLCollection::GetLength(uint32_t* aLength)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SimpleHTMLCollection::Item(uint32_t aIdx, nsIDOMNode** aRetVal)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> retVal = Item(aIdx)->AsDOMNode();
|
||||
retVal.forget(aRetVal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -163,19 +163,6 @@ HTMLFormControlsCollection::GetLength(uint32_t* aLength)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFormControlsCollection::Item(uint32_t aIndex, nsIDOMNode** aReturn)
|
||||
{
|
||||
nsISupports* item = GetElementAt(aIndex);
|
||||
if (!item) {
|
||||
*aReturn = nullptr;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return CallQueryInterface(item, aReturn);
|
||||
}
|
||||
|
||||
nsISupports*
|
||||
HTMLFormControlsCollection::NamedItemInternal(const nsAString& aName,
|
||||
bool aFlushContent)
|
||||
|
|
|
@ -201,19 +201,6 @@ HTMLOptionsCollection::SetSelectedIndex(int32_t aSelectedIndex,
|
|||
mSelect->SetSelectedIndex(aSelectedIndex, aError);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOptionsCollection::Item(uint32_t aIndex, nsIDOMNode** aReturn)
|
||||
{
|
||||
nsISupports* item = GetElementAt(aIndex);
|
||||
if (!item) {
|
||||
*aReturn = nullptr;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return CallQueryInterface(item, aReturn);
|
||||
}
|
||||
|
||||
Element*
|
||||
HTMLOptionsCollection::GetElementAt(uint32_t aIndex)
|
||||
{
|
||||
|
|
|
@ -240,19 +240,6 @@ TableRowsCollection::GetElementAt(uint32_t aIndex)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TableRowsCollection::Item(uint32_t aIndex, nsIDOMNode** aReturn)
|
||||
{
|
||||
nsISupports* node = GetElementAt(aIndex);
|
||||
if (!node) {
|
||||
*aReturn = nullptr;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return CallQueryInterface(node, aReturn);
|
||||
}
|
||||
|
||||
Element*
|
||||
TableRowsCollection::GetFirstNamedElement(const nsAString& aName, bool& aFound)
|
||||
{
|
||||
|
|
|
@ -40,8 +40,6 @@ public:
|
|||
*/
|
||||
virtual nsINode* GetParentObject() = 0;
|
||||
|
||||
using nsIDOMHTMLCollection::Item;
|
||||
|
||||
uint32_t Length()
|
||||
{
|
||||
uint32_t length;
|
||||
|
|
|
@ -20,6 +20,4 @@
|
|||
interface nsIDOMHTMLCollection : nsISupports
|
||||
{
|
||||
readonly attribute unsigned long length;
|
||||
|
||||
nsIDOMNode item(in unsigned long index);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче