Bug 1463889 part 2. Get rid of GetWindowList. r=qdot

GetFrames() works just as well, and is arguably better named, and it's silly to
have two APIs that do the same thing.
This commit is contained in:
Boris Zbarsky 2018-05-24 23:32:19 -04:00
Родитель ed3c958547
Коммит 7384dd10af
3 изменённых файлов: 4 добавлений и 13 удалений

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

@ -180,7 +180,7 @@ WindowNamedPropertiesHandler::ownPropNames(JSContext* aCx,
// The names live on the outer window, which might be null
nsGlobalWindowOuter* outer = win->GetOuterWindowInternal();
if (outer) {
nsDOMWindowList* childWindows = outer->GetWindowList();
nsDOMWindowList* childWindows = outer->GetFrames();
if (childWindows) {
uint32_t length = childWindows->GetLength();
for (uint32_t i = 0; i < length; ++i) {

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

@ -2914,7 +2914,7 @@ nsGlobalWindowOuter::Closed()
}
nsDOMWindowList*
nsGlobalWindowOuter::GetWindowList()
nsGlobalWindowOuter::GetFrames()
{
if (!mFrames && mDocShell) {
mFrames = new nsDOMWindowList(mDocShell);
@ -2923,16 +2923,10 @@ nsGlobalWindowOuter::GetWindowList()
return mFrames;
}
nsDOMWindowList*
nsGlobalWindowOuter::GetFrames()
{
return GetWindowList();
}
already_AddRefed<nsPIDOMWindowOuter>
nsGlobalWindowOuter::IndexedGetterOuter(uint32_t aIndex)
{
nsDOMWindowList* windows = GetWindowList();
nsDOMWindowList* windows = GetFrames();
NS_ENSURE_TRUE(windows, nullptr);
return windows->IndexedGetter(aIndex);
@ -3750,7 +3744,7 @@ nsGlobalWindowOuter::GetScrollYOuter()
uint32_t
nsGlobalWindowOuter::Length()
{
nsDOMWindowList* windows = GetWindowList();
nsDOMWindowList* windows = GetFrames();
return windows ? windows->GetLength() : 0;
}

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

@ -1003,9 +1003,6 @@ protected:
void InitializeShowFocusRings();
public:
// Outer windows only.
nsDOMWindowList* GetWindowList();
protected:
// Helper for getComputedStyle and getDefaultComputedStyle
already_AddRefed<nsICSSDeclaration>