зеркало из https://github.com/mozilla/pjs.git
Backout bug 595277. a=bustage
This commit is contained in:
Родитель
f7c8b02a47
Коммит
6376b14415
|
@ -1682,23 +1682,6 @@ public:
|
|||
static already_AddRefed<mozilla::layers::LayerManager>
|
||||
LayerManagerForDocument(nsIDocument *aDoc);
|
||||
|
||||
/**
|
||||
* Returns a layer manager to use for the given document. Basically we
|
||||
* look up the document hierarchy for the first document which has
|
||||
* a presentation with an associated widget, and use that widget's
|
||||
* layer manager. In addition to the normal layer manager lookup this will
|
||||
* specifically request a persistent layer manager. This means that the layer
|
||||
* manager is expected to remain the layer manager for the document in the
|
||||
* forseeable future. This function should be used carefully as it may change
|
||||
* the document's layer manager.
|
||||
*
|
||||
* If one can't be found, a BasicLayerManager is created and returned.
|
||||
*
|
||||
* @param aDoc the document for which to return a layer manager.
|
||||
*/
|
||||
static already_AddRefed<mozilla::layers::LayerManager>
|
||||
PersistentLayerManagerForDocument(nsIDocument *aDoc);
|
||||
|
||||
/**
|
||||
* Determine whether a content node is focused or not,
|
||||
*
|
||||
|
@ -1732,6 +1715,7 @@ public:
|
|||
static bool AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal);
|
||||
|
||||
private:
|
||||
|
||||
static PRBool InitializeEventTable();
|
||||
|
||||
static nsresult EnsureStringBundle(PropertiesFile aFile);
|
||||
|
|
|
@ -6370,8 +6370,8 @@ nsContentUtils::PlatformToDOMLineBreaks(nsString &aString)
|
|||
}
|
||||
}
|
||||
|
||||
static already_AddRefed<LayerManager>
|
||||
LayerManagerForDocumentInternal(nsIDocument *aDoc, bool aRequirePersistent)
|
||||
already_AddRefed<LayerManager>
|
||||
nsContentUtils::LayerManagerForDocument(nsIDocument *aDoc)
|
||||
{
|
||||
nsIDocument* doc = aDoc;
|
||||
nsIDocument* displayDoc = doc->GetDisplayDocument();
|
||||
|
@ -6405,10 +6405,7 @@ LayerManagerForDocumentInternal(nsIDocument *aDoc, bool aRequirePersistent)
|
|||
nsIWidget* widget =
|
||||
nsLayoutUtils::GetDisplayRootFrame(rootFrame)->GetNearestWidget();
|
||||
if (widget) {
|
||||
nsRefPtr<LayerManager> manager =
|
||||
static_cast<nsIWidget_MOZILLA_2_0_BRANCH*>(widget)->
|
||||
GetLayerManager(aRequirePersistent ? nsIWidget_MOZILLA_2_0_BRANCH::LAYER_MANAGER_PERSISTENT :
|
||||
nsIWidget_MOZILLA_2_0_BRANCH::LAYER_MANAGER_CURRENT);
|
||||
nsRefPtr<LayerManager> manager = widget->GetLayerManager();
|
||||
return manager.forget();
|
||||
}
|
||||
}
|
||||
|
@ -6418,18 +6415,6 @@ LayerManagerForDocumentInternal(nsIDocument *aDoc, bool aRequirePersistent)
|
|||
return manager.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<LayerManager>
|
||||
nsContentUtils::LayerManagerForDocument(nsIDocument *aDoc)
|
||||
{
|
||||
return LayerManagerForDocumentInternal(aDoc, false);
|
||||
}
|
||||
|
||||
already_AddRefed<LayerManager>
|
||||
nsContentUtils::PersistentLayerManagerForDocument(nsIDocument *aDoc)
|
||||
{
|
||||
return LayerManagerForDocumentInternal(aDoc, true);
|
||||
}
|
||||
|
||||
bool
|
||||
nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal)
|
||||
{
|
||||
|
|
|
@ -1078,8 +1078,7 @@ nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
|||
nsRefPtr<LayerManager> layerManager = nsnull;
|
||||
|
||||
if (ownerDoc)
|
||||
layerManager =
|
||||
nsContentUtils::PersistentLayerManagerForDocument(ownerDoc);
|
||||
layerManager = nsContentUtils::LayerManagerForDocument(ownerDoc);
|
||||
|
||||
if (layerManager) {
|
||||
surface = layerManager->CreateOptimalSurface(gfxIntSize(width, height), format);
|
||||
|
|
|
@ -2209,8 +2209,7 @@ ImageContainer* nsHTMLMediaElement::GetImageContainer()
|
|||
if (!video)
|
||||
return nsnull;
|
||||
|
||||
nsRefPtr<LayerManager> manager =
|
||||
nsContentUtils::PersistentLayerManagerForDocument(GetOwnerDoc());
|
||||
nsRefPtr<LayerManager> manager = nsContentUtils::LayerManagerForDocument(GetOwnerDoc());
|
||||
if (!manager)
|
||||
return nsnull;
|
||||
|
||||
|
|
|
@ -190,15 +190,6 @@ public:
|
|||
return mKey == aKey ? mValue.get() : nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear out current user data.
|
||||
*/
|
||||
void Clear()
|
||||
{
|
||||
mKey = nsnull;
|
||||
mValue = nsnull;
|
||||
}
|
||||
|
||||
private:
|
||||
void* mKey;
|
||||
nsAutoPtr<LayerUserData> mValue;
|
||||
|
@ -250,7 +241,7 @@ public:
|
|||
* for its widget going away. After this call, only user data calls
|
||||
* are valid on the layer manager.
|
||||
*/
|
||||
virtual void Destroy() { mDestroyed = PR_TRUE; mUserData.Clear(); }
|
||||
virtual void Destroy() { mDestroyed = PR_TRUE; }
|
||||
PRBool IsDestroyed() { return mDestroyed; }
|
||||
|
||||
/**
|
||||
|
|
|
@ -1369,8 +1369,6 @@ class nsIWidget_MOZILLA_2_0_BRANCH : public nsIWidget {
|
|||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWIDGET_MOZILLA_2_0_BRANCH_IID)
|
||||
|
||||
typedef mozilla::layers::LayerManager LayerManager;
|
||||
|
||||
/*
|
||||
* Notifies the IME if the input context changes.
|
||||
*
|
||||
|
@ -1383,15 +1381,6 @@ class nsIWidget_MOZILLA_2_0_BRANCH : public nsIWidget {
|
|||
* Get IME is 'Enabled' or 'Disabled' or 'Password' and other input context
|
||||
*/
|
||||
NS_IMETHOD GetInputMode(IMEContext& aContext) = 0;
|
||||
|
||||
enum LayerManagerPersistence
|
||||
{
|
||||
LAYER_MANAGER_CURRENT = 0,
|
||||
LAYER_MANAGER_PERSISTENT
|
||||
};
|
||||
|
||||
virtual LayerManager *GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||
bool* aAllowRetaining = nsnull) = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWidget_MOZILLA_2_0_BRANCH, NS_IWIDGET_MOZILLA_2_0_BRANCH_IID)
|
||||
|
|
|
@ -657,7 +657,7 @@ nsWindow::SetWindowClass(const nsAString& xulWinType)
|
|||
}
|
||||
|
||||
mozilla::layers::LayerManager*
|
||||
nsWindow::GetLayerManager(LayerManagerPersistence, bool* aAllowRetaining)
|
||||
nsWindow::GetLayerManager(bool* aAllowRetaining)
|
||||
{
|
||||
if (aAllowRetaining) {
|
||||
*aAllowRetaining = true;
|
||||
|
@ -868,7 +868,7 @@ nsWindow::DrawTo(gfxASurface *targetSurface)
|
|||
|
||||
nsPaintEvent event(PR_TRUE, NS_PAINT, this);
|
||||
event.region = boundsRect;
|
||||
switch (GetLayerManager(nsnull)->GetBackendType()) {
|
||||
switch (GetLayerManager()->GetBackendType()) {
|
||||
case LayerManager::LAYERS_BASIC: {
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(targetSurface);
|
||||
|
||||
|
@ -891,7 +891,7 @@ nsWindow::DrawTo(gfxASurface *targetSurface)
|
|||
}
|
||||
|
||||
case LayerManager::LAYERS_OPENGL: {
|
||||
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager(nsnull))->
|
||||
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager())->
|
||||
SetClippingRegion(nsIntRegion(boundsRect));
|
||||
|
||||
status = DispatchEvent(&event);
|
||||
|
@ -960,7 +960,7 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
|||
|
||||
AndroidBridge::Bridge()->HideProgressDialogOnce();
|
||||
|
||||
if (GetLayerManager(nsnull)->GetBackendType() == LayerManager::LAYERS_BASIC) {
|
||||
if (GetLayerManager()->GetBackendType() == LayerManager::LAYERS_BASIC) {
|
||||
jobject bytebuf = sview.GetSoftwareDrawBuffer();
|
||||
if (!bytebuf) {
|
||||
ALOG("no buffer to draw into - skipping draw");
|
||||
|
|
|
@ -55,8 +55,6 @@ class nsWindow :
|
|||
public nsBaseWidget
|
||||
{
|
||||
public:
|
||||
using nsBaseWidget::GetLayerManager;
|
||||
|
||||
nsWindow();
|
||||
virtual ~nsWindow();
|
||||
|
||||
|
@ -164,8 +162,7 @@ public:
|
|||
NS_IMETHOD OnIMESelectionChange(void);
|
||||
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
|
||||
|
||||
LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||
bool* aAllowRetaining = nsnull);
|
||||
LayerManager* GetLayerManager(bool* aAllowRetaining = nsnull);
|
||||
gfxASurface* GetThebesSurface();
|
||||
|
||||
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent);
|
||||
|
|
|
@ -2718,8 +2718,8 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
}
|
||||
#endif
|
||||
|
||||
if (mGeckoChild->GetLayerManager(nsnull)->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
||||
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(mGeckoChild->GetLayerManager(nsnull));
|
||||
if (mGeckoChild->GetLayerManager()->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
||||
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(mGeckoChild->GetLayerManager());
|
||||
manager->SetClippingRegion(paintEvent.region);
|
||||
if (!mGLContext) {
|
||||
mGLContext = (NSOpenGLContext *)manager->gl()->GetNativeData(mozilla::gl::GLContext::NativeGLContext);
|
||||
|
|
|
@ -258,8 +258,7 @@ public:
|
|||
NS_IMETHOD Invalidate(const nsIntRect &aRect, PRBool aIsSynchronous);
|
||||
NS_IMETHOD Update();
|
||||
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
|
||||
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||
bool* aAllowRetaining = nsnull);
|
||||
virtual LayerManager* GetLayerManager(bool* aAllowRetaining = nsnull);
|
||||
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) ;
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, nsIMenuRollup * aMenuRollup,
|
||||
PRBool aDoCapture, PRBool aConsumeRollupEvent);
|
||||
|
|
|
@ -932,7 +932,7 @@ nsCocoaWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
|
|||
}
|
||||
|
||||
LayerManager*
|
||||
nsCocoaWindow::GetLayerManager(LayerManagerPersistence, bool* aAllowRetaining)
|
||||
nsCocoaWindow::GetLayerManager(bool* aAllowRetaining)
|
||||
{
|
||||
if (mPopupContentView) {
|
||||
return mPopupContentView->GetLayerManager(aAllowRetaining);
|
||||
|
|
|
@ -2154,9 +2154,9 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (GetLayerManager(nsnull)->GetBackendType() == LayerManager::LAYERS_OPENGL)
|
||||
if (GetLayerManager()->GetBackendType() == LayerManager::LAYERS_OPENGL)
|
||||
{
|
||||
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(GetLayerManager(nsnull));
|
||||
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(GetLayerManager());
|
||||
manager->SetClippingRegion(event.region);
|
||||
|
||||
nsEventStatus status;
|
||||
|
|
|
@ -1014,12 +1014,12 @@ nsWindow::DoPaint(QPainter* aPainter, const QStyleOptionGraphicsItem* aOption, Q
|
|||
nsEventStatus status;
|
||||
nsIntRect rect(r.x(), r.y(), r.width(), r.height());
|
||||
|
||||
if (GetLayerManager(nsnull)->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
||||
if (GetLayerManager()->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
||||
nsPaintEvent event(PR_TRUE, NS_PAINT, this);
|
||||
event.refPoint.x = r.x();
|
||||
event.refPoint.y = r.y();
|
||||
event.region = nsIntRegion(rect);
|
||||
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager(nsnull))->
|
||||
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager())->
|
||||
SetClippingRegion(event.region);
|
||||
return DispatchEvent(&event);
|
||||
}
|
||||
|
|
|
@ -69,14 +69,6 @@ HINSTANCE nsToolkit::mDllInstance = 0;
|
|||
PRBool nsToolkit::mIsWinXP = PR_FALSE;
|
||||
static PRBool dummy = nsToolkit::InitVersionInfo();
|
||||
|
||||
static const unsigned long kD3DUsageDelay = 5000;
|
||||
|
||||
static void
|
||||
StartAllowingD3D9(nsITimer *aTimer, void *aClosure)
|
||||
{
|
||||
nsWindow::StartAllowingD3D9(true);
|
||||
}
|
||||
|
||||
#if !defined(MOZ_STATIC_COMPONENT_LIBS) && !defined(MOZ_ENABLE_LIBXUL)
|
||||
//
|
||||
// Dll entry point. Keep the dll instance
|
||||
|
@ -247,14 +239,6 @@ nsToolkit::Shutdown()
|
|||
::UnregisterClassW(L"nsToolkitClass", nsToolkit::mDllInstance);
|
||||
}
|
||||
|
||||
void
|
||||
nsToolkit::StartAllowingD3D9()
|
||||
{
|
||||
nsIToolkit *toolkit;
|
||||
NS_GetCurrentToolkit(&toolkit);
|
||||
static_cast<nsToolkit*>(toolkit)->mD3D9Timer->Cancel();
|
||||
nsWindow::StartAllowingD3D9(false);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -335,12 +319,6 @@ NS_METHOD nsToolkit::Init(PRThread *aThread)
|
|||
CreateUIThread();
|
||||
}
|
||||
|
||||
mD3D9Timer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mD3D9Timer->InitWithFuncCallback(::StartAllowingD3D9,
|
||||
NULL,
|
||||
kD3DUsageDelay,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
|
||||
nsWidgetAtoms::RegisterAtoms();
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -100,7 +100,6 @@ protected:
|
|||
HWND mDispatchWnd;
|
||||
// Thread Id of the "main" Gui thread.
|
||||
PRThread *mGuiThread;
|
||||
nsCOMPtr<nsITimer> mD3D9Timer;
|
||||
|
||||
public:
|
||||
static HINSTANCE mDllInstance;
|
||||
|
@ -110,7 +109,6 @@ public:
|
|||
static PRBool InitVersionInfo();
|
||||
static void Startup(HINSTANCE hModule);
|
||||
static void Shutdown();
|
||||
static void StartAllowingD3D9();
|
||||
|
||||
static MouseTrailer *gMouseTrailer;
|
||||
};
|
||||
|
|
|
@ -159,8 +159,6 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include "nsNativeThemeWin.h"
|
||||
#include "nsWindowsDllInterceptor.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
#if defined(WINCE)
|
||||
#include "nsWindowCE.h"
|
||||
|
@ -298,8 +296,6 @@ PRBool nsWindow::sDefaultTrackPointHack = PR_FALSE;
|
|||
// Default value for general window class (used when the pref is the empty string).
|
||||
const char* nsWindow::sDefaultMainWindowClass = kClassNameGeneral;
|
||||
|
||||
// If we're using D3D9, this will not be allowed during initial 5 seconds.
|
||||
bool nsWindow::sAllowD3D9 = false;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
BOOL nsWindow::sIsAccessibilityOn = FALSE;
|
||||
|
@ -1101,35 +1097,6 @@ nsWindow* nsWindow::GetParentWindow(PRBool aIncludeOwner)
|
|||
|
||||
return widget;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
nsWindow::EnumAllChildWindProc(HWND aWnd, LPARAM aParam)
|
||||
{
|
||||
nsWindow *wnd = nsWindow::GetNSWindowPtr(aWnd);
|
||||
if (wnd) {
|
||||
((nsWindow::WindowEnumCallback*)aParam)(wnd);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
nsWindow::EnumAllThreadWindowProc(HWND aWnd, LPARAM aParam)
|
||||
{
|
||||
nsWindow *wnd = nsWindow::GetNSWindowPtr(aWnd);
|
||||
if (wnd) {
|
||||
((nsWindow::WindowEnumCallback*)aParam)(wnd);
|
||||
}
|
||||
EnumChildWindows(aWnd, EnumAllChildWindProc, aParam);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::EnumAllWindows(WindowEnumCallback aCallback)
|
||||
{
|
||||
EnumThreadWindows(GetCurrentThreadId(),
|
||||
EnumAllThreadWindowProc,
|
||||
(LPARAM)&aCallback);
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
*
|
||||
|
@ -3212,7 +3179,7 @@ nsWindow::HasPendingInputEvent()
|
|||
**************************************************************/
|
||||
|
||||
mozilla::layers::LayerManager*
|
||||
nsWindow::GetLayerManager(LayerManagerPersistence aPersistence, bool* aAllowRetaining)
|
||||
nsWindow::GetLayerManager(bool* aAllowRetaining)
|
||||
{
|
||||
if (aAllowRetaining) {
|
||||
*aAllowRetaining = true;
|
||||
|
@ -3235,12 +3202,7 @@ nsWindow::GetLayerManager(LayerManagerPersistence aPersistence, bool* aAllowReta
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!mLayerManager ||
|
||||
(!sAllowD3D9 && aPersistence == LAYER_MANAGER_PERSISTENT &&
|
||||
mLayerManager->GetBackendType() ==
|
||||
mozilla::layers::LayerManager::LAYERS_BASIC)) {
|
||||
// If D3D9 is not currently allowed but the permanent manager is required,
|
||||
// -and- we're currently using basic layers, run through this check.
|
||||
if (!mLayerManager) {
|
||||
nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
|
||||
PRBool accelerateByDefault = PR_TRUE;
|
||||
|
@ -3279,12 +3241,6 @@ nsWindow::GetLayerManager(LayerManagerPersistence aPersistence, bool* aAllowReta
|
|||
mUseAcceleratedRendering = PR_TRUE;
|
||||
|
||||
if (mUseAcceleratedRendering) {
|
||||
if (aPersistence == LAYER_MANAGER_PERSISTENT && !sAllowD3D9) {
|
||||
// This will clear out our existing layer manager if we have one since
|
||||
// if we hit this with a LayerManager we're always using BasicLayers.
|
||||
nsToolkit::StartAllowingD3D9();
|
||||
}
|
||||
|
||||
#ifdef MOZ_ENABLE_D3D10_LAYER
|
||||
if (!preferD3D9) {
|
||||
nsRefPtr<mozilla::layers::LayerManagerD3D10> layerManager =
|
||||
|
@ -3295,7 +3251,7 @@ nsWindow::GetLayerManager(LayerManagerPersistence aPersistence, bool* aAllowReta
|
|||
}
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_D3D9_LAYER
|
||||
if (!preferOpenGL && !mLayerManager && sAllowD3D9) {
|
||||
if (!preferOpenGL && !mLayerManager) {
|
||||
nsRefPtr<mozilla::layers::LayerManagerD3D9> layerManager =
|
||||
new mozilla::layers::LayerManagerD3D9(this);
|
||||
if (layerManager->Initialize()) {
|
||||
|
@ -7537,37 +7493,6 @@ PRBool nsWindow::AutoErase(HDC dc)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::AllowD3D9Callback(nsWindow *aWindow)
|
||||
{
|
||||
if (aWindow->mLayerManager) {
|
||||
aWindow->mLayerManager->Destroy();
|
||||
aWindow->mLayerManager = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::AllowD3D9WithReinitializeCallback(nsWindow *aWindow)
|
||||
{
|
||||
if (aWindow->mLayerManager) {
|
||||
aWindow->mLayerManager->Destroy();
|
||||
aWindow->mLayerManager = NULL;
|
||||
(void) aWindow->GetLayerManager();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::StartAllowingD3D9(bool aReinitialize)
|
||||
{
|
||||
sAllowD3D9 = true;
|
||||
|
||||
if (aReinitialize) {
|
||||
EnumAllWindows(AllowD3D9WithReinitializeCallback);
|
||||
} else {
|
||||
EnumAllWindows(AllowD3D9Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
**************************************************************
|
||||
**
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "gfxWindowsSurface.h"
|
||||
#include "nsWindowDbg.h"
|
||||
#include "cairo.h"
|
||||
#include "nsITimer.h"
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
#include "gfxD2DSurface.h"
|
||||
#endif
|
||||
|
@ -167,7 +166,7 @@ public:
|
|||
PRBool aDoCapture, PRBool aConsumeRollupEvent);
|
||||
NS_IMETHOD GetAttention(PRInt32 aCycleCount);
|
||||
virtual PRBool HasPendingInputEvent();
|
||||
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT, bool* aAllowRetaining = nsnull);
|
||||
virtual LayerManager* GetLayerManager(bool* aAllowRetaining = nsnull);
|
||||
gfxASurface *GetThebesSurface();
|
||||
NS_IMETHOD OnDefaultButtonLoaded(const nsIntRect &aButtonRect);
|
||||
NS_IMETHOD OverrideSystemMouseScrollSpeed(PRInt32 aOriginalDelta, PRBool aIsHorizontal, PRInt32 &aOverriddenDelta);
|
||||
|
@ -248,9 +247,6 @@ public:
|
|||
static nsWindow* GetNSWindowPtr(HWND aWnd);
|
||||
WindowHook& GetWindowHook() { return mWindowHook; }
|
||||
nsWindow* GetParentWindow(PRBool aIncludeOwner);
|
||||
// Get an array of all nsWindow*s on the main thread.
|
||||
typedef void (WindowEnumCallback)(nsWindow*);
|
||||
static void EnumAllWindows(WindowEnumCallback aCallback);
|
||||
|
||||
/**
|
||||
* Misc.
|
||||
|
@ -260,15 +256,6 @@ public:
|
|||
// needed in nsIMM32Handler.cpp
|
||||
PRBool PluginHasFocus() { return mIMEContext.mStatus == nsIWidget::IME_STATUS_PLUGIN; }
|
||||
PRBool IsTopLevelWidget() { return mIsTopWidgetWindow; }
|
||||
/**
|
||||
* Start allowing Direct3D9 to be used by widgets when GetLayerManager is
|
||||
* called.
|
||||
*
|
||||
* @param aReinitialize Call GetLayerManager on widgets to ensure D3D9 is
|
||||
* initialized, this is usually called when this function
|
||||
* is triggered by timeout and not user/web interaction.
|
||||
*/
|
||||
static void StartAllowingD3D9(bool aReinitialize);
|
||||
|
||||
#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_WIN7
|
||||
PRBool HasTaskbarIconBeenCreated() { return mHasTaskbarIconBeenCreated; }
|
||||
|
@ -305,10 +292,6 @@ protected:
|
|||
static LRESULT CALLBACK MozSpecialMouseProc(int code, WPARAM wParam, LPARAM lParam);
|
||||
static VOID CALLBACK HookTimerForPopups( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime );
|
||||
static BOOL CALLBACK ClearResourcesCallback(HWND aChild, LPARAM aParam);
|
||||
static BOOL CALLBACK EnumAllChildWindProc(HWND aWnd, LPARAM aParam);
|
||||
static BOOL CALLBACK EnumAllThreadWindowProc(HWND aWnd, LPARAM aParam);
|
||||
static void AllowD3D9Callback(nsWindow *aWindow);
|
||||
static void AllowD3D9WithReinitializeCallback(nsWindow *aWindow);
|
||||
|
||||
/**
|
||||
* Window utilities
|
||||
|
@ -516,7 +499,6 @@ protected:
|
|||
static int sTrimOnMinimize;
|
||||
static PRBool sDefaultTrackPointHack;
|
||||
static const char* sDefaultMainWindowClass;
|
||||
static bool sAllowD3D9;
|
||||
#ifdef MOZ_IPC
|
||||
static PRUint32 sOOPPPluginFocusEvent;
|
||||
#endif
|
||||
|
|
|
@ -312,7 +312,7 @@ PuppetWidget::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
|
|||
}
|
||||
|
||||
LayerManager*
|
||||
PuppetWidget::GetLayerManager(LayerManagerPersistence, bool* aAllowRetaining)
|
||||
PuppetWidget::GetLayerManager(bool* aAllowRetaining)
|
||||
{
|
||||
if (!mLayerManager) {
|
||||
mLayerManager = new BasicShadowLayerManager(this);
|
||||
|
|
|
@ -164,8 +164,7 @@ public:
|
|||
//
|
||||
|
||||
//NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||
bool* aAllowRetaining = nsnull);
|
||||
virtual LayerManager* GetLayerManager(bool* aAllowRetaining = nsnull);
|
||||
// virtual nsIDeviceContext* GetDeviceContext();
|
||||
virtual gfxASurface* GetThebesSurface();
|
||||
|
||||
|
|
|
@ -743,7 +743,7 @@ nsBaseWidget::AutoLayerManagerSetup::AutoLayerManagerSetup(
|
|||
: mWidget(aWidget)
|
||||
{
|
||||
BasicLayerManager* manager =
|
||||
static_cast<BasicLayerManager*>(mWidget->GetLayerManager(nsnull));
|
||||
static_cast<BasicLayerManager*>(mWidget->GetLayerManager());
|
||||
if (manager) {
|
||||
NS_ASSERTION(manager->GetBackendType() == LayerManager::LAYERS_BASIC,
|
||||
"AutoLayerManagerSetup instantiated for non-basic layer backend!");
|
||||
|
@ -754,7 +754,7 @@ nsBaseWidget::AutoLayerManagerSetup::AutoLayerManagerSetup(
|
|||
nsBaseWidget::AutoLayerManagerSetup::~AutoLayerManagerSetup()
|
||||
{
|
||||
BasicLayerManager* manager =
|
||||
static_cast<BasicLayerManager*>(mWidget->GetLayerManager(nsnull));
|
||||
static_cast<BasicLayerManager*>(mWidget->GetLayerManager());
|
||||
if (manager) {
|
||||
NS_ASSERTION(manager->GetBackendType() == LayerManager::LAYERS_BASIC,
|
||||
"AutoLayerManagerSetup instantiated for non-basic layer backend!");
|
||||
|
@ -807,12 +807,6 @@ nsBaseWidget::GetShouldAccelerate()
|
|||
}
|
||||
|
||||
LayerManager* nsBaseWidget::GetLayerManager(bool* aAllowRetaining)
|
||||
{
|
||||
return GetLayerManager(LAYER_MANAGER_CURRENT, aAllowRetaining);
|
||||
}
|
||||
|
||||
LayerManager* nsBaseWidget::GetLayerManager(LayerManagerPersistence,
|
||||
bool* aAllowRetaining)
|
||||
{
|
||||
if (!mLayerManager) {
|
||||
nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
|
|
|
@ -115,9 +115,7 @@ public:
|
|||
NS_IMETHOD MakeFullScreen(PRBool aFullScreen);
|
||||
virtual nsIDeviceContext* GetDeviceContext();
|
||||
virtual nsIToolkit* GetToolkit();
|
||||
virtual LayerManager* GetLayerManager(bool *aAllowRetaining = nsnull);
|
||||
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||
bool* aAllowRetaining = nsnull);
|
||||
virtual LayerManager* GetLayerManager(bool* aAllowRetaining = nsnull);
|
||||
virtual gfxASurface* GetThebesSurface();
|
||||
NS_IMETHOD SetModal(PRBool aModal);
|
||||
NS_IMETHOD SetWindowClass(const nsAString& xulWinType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче