Bug 1839198 - Move mIsPIPWindow into nsBaseWidget. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D181417
This commit is contained in:
Hiroyuki Ikezoe 2023-06-22 20:53:18 +00:00
Родитель 3336e4d96c
Коммит c2df274d5e
4 изменённых файлов: 9 добавлений и 5 удалений

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

@ -408,7 +408,6 @@ nsWindow::nsWindow()
mPanInProgress(false),
mDrawToContainer(false),
mTitlebarBackdropState(false),
mIsPIPWindow(false),
mIsWaylandPanelWindow(false),
mIsChildWindow(false),
mAlwaysOnTop(false),
@ -5908,7 +5907,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
}
mAlwaysOnTop = aInitData && aInitData->mAlwaysOnTop;
mIsPIPWindow = aInitData && aInitData->mPIPWindow;
// mNoAutoHide seems to be always false here.
// The mNoAutoHide state is set later on nsMenuPopupFrame level
// and can be changed so we use WaylandPopupIsPermanent() to get

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

@ -658,8 +658,6 @@ class nsWindow final : public nsBaseWidget {
bool mDrawToContainer : 1;
// Draw titlebar with :backdrop css state (inactive/unfocused).
bool mTitlebarBackdropState : 1;
// It's PictureInPicture window.
bool mIsPIPWindow : 1;
// It's undecorated popup utility window, without resizers/titlebar,
// movable by mouse. Used on Wayland for popups without
// parent (for instance WebRTC sharing indicator, notifications).

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

@ -154,7 +154,8 @@ nsBaseWidget::nsBaseWidget(BorderStyle aBorderStyle)
mIMEHasQuit(false),
mIsFullyOccluded(false),
mNeedFastSnaphot(false),
mCurrentPanGestureBelongsToSwipe(false) {
mCurrentPanGestureBelongsToSwipe(false),
mIsPIPWindow(false) {
#ifdef NOISY_WIDGET_LEAKS
gNumWidgets++;
printf("WIDGETS+ = %d\n", gNumWidgets);
@ -419,6 +420,7 @@ void nsBaseWidget::BaseCreate(nsIWidget* aParent, widget::InitData* aInitData) {
mPopupLevel = aInitData->mPopupLevel;
mPopupType = aInitData->mPopupHint;
mHasRemoteContent = aInitData->mHasRemoteContent;
mIsPIPWindow = aInitData->mPIPWindow;
}
if (aParent) {
@ -2313,6 +2315,7 @@ nsBaseWidget::SwipeInfo nsBaseWidget::SendMayStartSwipe(
WidgetWheelEvent nsBaseWidget::MayStartSwipeForAPZ(
const PanGestureInput& aPanInput, const APZEventResult& aApzResult) {
WidgetWheelEvent event = aPanInput.ToWidgetEvent(this);
if (aPanInput.AllowsSwipe()) {
SwipeInfo swipeInfo = SendMayStartSwipe(aPanInput);
event.mCanTriggerSwipe = swipeInfo.wantsSwipe;

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

@ -674,6 +674,8 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
void FreeShutdownObserver();
void FreeLocalesChangedObserver();
bool IsPIPWindow() const { return mIsPIPWindow; };
nsIWidgetListener* mWidgetListener;
nsIWidgetListener* mAttachedWidgetListener;
nsIWidgetListener* mPreviouslyAttachedWidgetListener;
@ -721,6 +723,9 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
// a PANGESTURE_(MAY)START event).
bool mCurrentPanGestureBelongsToSwipe;
// It's PictureInPicture window.
bool mIsPIPWindow : 1;
struct InitialZoomConstraints {
InitialZoomConstraints(const uint32_t& aPresShellID,
const ScrollableLayerGuid::ViewID& aViewID,