gecko-dev/layout/xul/nsIPopupContainer.h
Emilio Cobos Álvarez 1d28496d32 Bug 1800238 - Make popups position: fixed rather than position: absolute. r=TYLin
So that they don't affect the overflow area of the root element. Since
they paint in a different widget over the current one it doesn't make a
lot of sense for them to do so.

They are in the top layer already, so for XUL documents this doesn't
change anything (because there's no root scroll frame and abspos CB
is the same as fixed CB).

For scrollable html documents it does prevent the scroll frame from
accounting for them.

This inverts the destruction order of the default tooltip's
nsMenuPopupFrame and the canvas frame, which caused an interesting leak,
since the tooltip was not getting properly unbound from the
PostDestroyData. nsMenuPopupFrame shouldn't need to manage the default
tooltip anymore, so removing it simplifies the code and also fixes that
leak (which I initially didn't find because I run opt tests by default).

Differential Revision: https://phabricator.services.mozilla.com/D161931
2022-11-12 21:10:18 +00:00

30 lines
758 B
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef nsIPopupContainer_h___
#define nsIPopupContainer_h___
#include "nsQueryFrame.h"
class nsIContent;
namespace mozilla {
class PresShell;
namespace dom {
class Element;
}
} // namespace mozilla
class nsIPopupContainer {
public:
NS_DECL_QUERYFRAME_TARGET(nsIPopupContainer)
virtual mozilla::dom::Element* GetDefaultTooltip() = 0;
static nsIPopupContainer* GetPopupContainer(mozilla::PresShell* aShell);
};
#endif