mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 12:15:51 +00:00
d7dd0eac3b
This patch moves the "fullscreen" event from the original place to the second part, which indicates two other changes: 1. When the event is triggered, the value of fullScreen would have been toggled to the new value, which is different from before. The changes in browser/../browser-fullScreen.js and mobile/../browser.js are for this. 2. This event is no longer preventDefault-able, since it is triggered after the fullscreen change. This leads to the removal of the test and the only place which calls preventDefault on that event. That place is a workaround for bug 1079222. To address that problem, this patch fixes the intrinsic issue via stoping handling the fullscreen change once it finds we failed to change the state of the widget. --HG-- extra : source : 78f78a62ce31b33413f0b52532eb22e5712cb646
84 lines
2.7 KiB
C++
84 lines
2.7 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* 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 nsWebShellWindow_h__
|
|
#define nsWebShellWindow_h__
|
|
|
|
#include "mozilla/Mutex.h"
|
|
#include "nsIWebProgressListener.h"
|
|
#include "nsITimer.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "nsXULWindow.h"
|
|
#include "nsIWidgetListener.h"
|
|
#include "nsITabParent.h"
|
|
|
|
/* Forward declarations.... */
|
|
class nsIURI;
|
|
|
|
struct nsWidgetInitData;
|
|
|
|
namespace mozilla {
|
|
class WebShellWindowTimerCallback;
|
|
} // namespace mozilla
|
|
|
|
class nsWebShellWindow final : public nsXULWindow,
|
|
public nsIWebProgressListener,
|
|
public nsIWidgetListener
|
|
{
|
|
public:
|
|
explicit nsWebShellWindow(uint32_t aChromeFlags);
|
|
|
|
// nsISupports interface...
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
// nsWebShellWindow methods...
|
|
nsresult Initialize(nsIXULWindow * aParent, nsIXULWindow * aOpener,
|
|
nsIURI* aUrl,
|
|
int32_t aInitialWidth, int32_t aInitialHeight,
|
|
bool aIsHiddenWindow,
|
|
nsITabParent *aOpeningTab,
|
|
nsWidgetInitData& widgetInitData);
|
|
|
|
nsresult Toolbar();
|
|
|
|
// nsIWebProgressListener
|
|
NS_DECL_NSIWEBPROGRESSLISTENER
|
|
|
|
// nsIBaseWindow
|
|
NS_IMETHOD Destroy() override;
|
|
|
|
// nsIWidgetListener
|
|
virtual nsIXULWindow* GetXULWindow() override { return this; }
|
|
virtual nsIPresShell* GetPresShell() override;
|
|
virtual bool WindowMoved(nsIWidget* aWidget, int32_t x, int32_t y) override;
|
|
virtual bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight) override;
|
|
virtual bool RequestWindowClose(nsIWidget* aWidget) override;
|
|
virtual void SizeModeChanged(nsSizeMode sizeMode) override;
|
|
virtual void FullscreenChanged(bool aInFullscreen) override;
|
|
virtual void OSToolbarButtonPressed() override;
|
|
virtual bool ZLevelChanged(bool aImmediate, nsWindowZ *aPlacement,
|
|
nsIWidget* aRequestBelow, nsIWidget** aActualBelow) override;
|
|
virtual void WindowActivated() override;
|
|
virtual void WindowDeactivated() override;
|
|
|
|
protected:
|
|
friend class mozilla::WebShellWindowTimerCallback;
|
|
|
|
virtual ~nsWebShellWindow();
|
|
|
|
void LoadContentAreas();
|
|
bool ExecuteCloseHandler();
|
|
void ConstrainToOpenerScreen(int32_t* aX, int32_t* aY);
|
|
|
|
nsCOMPtr<nsITimer> mSPTimer;
|
|
mozilla::Mutex mSPTimerLock;
|
|
|
|
void SetPersistenceTimer(uint32_t aDirtyFlags);
|
|
void FirePersistenceTimer();
|
|
};
|
|
|
|
|
|
#endif /* nsWebShellWindow_h__ */
|