зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1490158 Remove On{Length,Index}Changed from nsISHistoryListener. r=nika
They're never used. --HG-- extra : rebase_source : 94f94e4d198917aa5e1d9322e9ba195f641e6e45
This commit is contained in:
Родитель
951d44ded0
Коммит
7f2bb554d6
|
@ -417,14 +417,6 @@ HistoryListener.prototype = {
|
|||
// Cancel the load.
|
||||
return false;
|
||||
},
|
||||
|
||||
OnLengthChanged(aCount) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
},
|
||||
|
||||
OnIndexChanged(aIndex) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -315,14 +315,6 @@ class SessionHistoryListener extends Handler {
|
|||
OnHistoryReplaceEntry(index) {
|
||||
this.collect();
|
||||
}
|
||||
|
||||
OnLengthChanged(aCount) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
}
|
||||
|
||||
OnIndexChanged(aIndex) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
}
|
||||
}
|
||||
SessionHistoryListener.prototype.QueryInterface =
|
||||
ChromeUtils.generateQI([Ci.nsISHistoryListener,
|
||||
|
|
|
@ -83,14 +83,4 @@ interface nsISHistoryListener : nsISupports
|
|||
* replaced.
|
||||
*/
|
||||
void OnHistoryReplaceEntry(in long aIndex);
|
||||
|
||||
/**
|
||||
* Called after nsISHistory::count has been updated.
|
||||
*/
|
||||
void OnLengthChanged(in long aCount);
|
||||
|
||||
/**
|
||||
* Called after nsISHistory::index has been updated.
|
||||
*/
|
||||
void OnIndexChanged(in long aIndex);
|
||||
};
|
||||
|
|
|
@ -641,9 +641,6 @@ nsSHistory::AddEntry(nsISHEntry* aSHEntry, bool aPersist)
|
|||
mEntries.AppendElement(aSHEntry);
|
||||
mIndex++;
|
||||
|
||||
NOTIFY_LISTENERS(OnLengthChanged, (Length()));
|
||||
NOTIFY_LISTENERS(OnIndexChanged, (mIndex));
|
||||
|
||||
// Purge History list if it is too long
|
||||
if (gHistoryMaxSize >= 0 && Length() > gHistoryMaxSize) {
|
||||
PurgeHistory(Length() - gHistoryMaxSize);
|
||||
|
@ -677,8 +674,6 @@ nsSHistory::SetIndex(int32_t aIndex)
|
|||
}
|
||||
|
||||
mIndex = aIndex;
|
||||
NOTIFY_LISTENERS(OnIndexChanged, (mIndex))
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -807,9 +802,6 @@ nsSHistory::PurgeHistory(int32_t aNumEntries)
|
|||
mRequestedIndex -= aNumEntries;
|
||||
mRequestedIndex = std::max(mRequestedIndex, -1);
|
||||
|
||||
NOTIFY_LISTENERS(OnLengthChanged, (Length()));
|
||||
NOTIFY_LISTENERS(OnIndexChanged, (mIndex))
|
||||
|
||||
if (mRootDocShell) {
|
||||
mRootDocShell->HistoryPurged(aNumEntries);
|
||||
}
|
||||
|
@ -1356,7 +1348,6 @@ nsSHistory::RemoveDuplicate(int32_t aIndex, bool aKeepNext)
|
|||
// Adjust our indices to reflect the removed entry.
|
||||
if (mIndex > aIndex) {
|
||||
mIndex = mIndex - 1;
|
||||
NOTIFY_LISTENERS(OnIndexChanged, (mIndex));
|
||||
}
|
||||
|
||||
// NB: If the entry we are removing is the entry currently
|
||||
|
@ -1374,7 +1365,6 @@ nsSHistory::RemoveDuplicate(int32_t aIndex, bool aKeepNext)
|
|||
if (mRequestedIndex > aIndex || (mRequestedIndex == aIndex && !aKeepNext)) {
|
||||
mRequestedIndex = mRequestedIndex - 1;
|
||||
}
|
||||
NOTIFY_LISTENERS(OnLengthChanged, (Length()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1439,7 +1429,6 @@ nsSHistory::UpdateIndex()
|
|||
// Update the actual index with the right value.
|
||||
if (mIndex != mRequestedIndex && mRequestedIndex != -1) {
|
||||
mIndex = mRequestedIndex;
|
||||
NOTIFY_LISTENERS(OnIndexChanged, (mIndex))
|
||||
}
|
||||
|
||||
mRequestedIndex = -1;
|
||||
|
|
|
@ -4687,14 +4687,6 @@ Tab.prototype = {
|
|||
Services.obs.notifyObservers(this.browser, "Content:HistoryChange");
|
||||
},
|
||||
|
||||
OnLengthChanged: function(aCount) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
},
|
||||
|
||||
OnIndexChanged: function(aIndex) {
|
||||
// Ignore, the method is implemented so that XPConnect doesn't throw!
|
||||
},
|
||||
|
||||
UpdateMediaPlaybackRelatedObserver: function(active) {
|
||||
// Media control is only used for the tab which has playing media, so we
|
||||
// only need to register observer after having the active media. And the
|
||||
|
|
Загрузка…
Ссылка в новой задаче