mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 509693. Remove eWindowType_java (unused) and actually use eWindowType_plugin. r=josh
--HG-- extra : rebase_source : 14ebf24d00378e65e75b75692b9d82a020966db1
This commit is contained in:
parent
e4bc55769e
commit
7fa763ef88
@ -712,6 +712,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
|
||||
rpc->PresShell()->FrameManager()->GetRootFrame()->GetWindow();
|
||||
|
||||
nsWidgetInitData initData;
|
||||
initData.mWindowType = eWindowType_plugin;
|
||||
initData.mUnicode = PR_FALSE;
|
||||
initData.clipChildren = PR_TRUE;
|
||||
initData.clipSiblings = PR_TRUE;
|
||||
|
@ -102,8 +102,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
|
||||
#endif
|
||||
|
||||
#define NS_IWIDGET_IID \
|
||||
{ 0x155c4b, 0x78da, 0x4607, \
|
||||
{ 0x92, 0x87, 0xd6, 0xcf, 0x32, 0xcd, 0x42, 0xb5 } }
|
||||
{ 0x6bdb96ba, 0x1727, 0x40ae, \
|
||||
{ 0x85, 0x55, 0x9c, 0x53, 0x4b, 0x95, 0x23, 0x98 } }
|
||||
|
||||
/*
|
||||
* Window shadow styles
|
||||
@ -707,14 +707,6 @@ class nsIWidget : public nsISupports {
|
||||
|
||||
//@}
|
||||
|
||||
/**
|
||||
* Set border style
|
||||
* Must be called before Create.
|
||||
* @param aBorderStyle @see nsBorderStyle
|
||||
*/
|
||||
|
||||
NS_IMETHOD SetBorderStyle(nsBorderStyle aBorderStyle) = 0;
|
||||
|
||||
/**
|
||||
* Set the widget's title.
|
||||
* Must be called after Create.
|
||||
|
@ -55,7 +55,6 @@ enum nsWindowType {
|
||||
// desktop (has no border))
|
||||
eWindowType_invisible, // windows that are invisible or offscreen
|
||||
eWindowType_plugin, // plugin window
|
||||
eWindowType_java, // java plugin window
|
||||
eWindowType_sheet // MacOSX sheet (special dialog class)
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,6 @@ nsresult nsChildView::Create(nsIWidget *aParent,
|
||||
{
|
||||
|
||||
NS_ASSERTION(aInitData->mWindowType == eWindowType_child
|
||||
|| aInitData->mWindowType == eWindowType_java
|
||||
|| aInitData->mWindowType == eWindowType_plugin,
|
||||
"The windowtype is not handled by this class." );
|
||||
|
||||
|
@ -432,16 +432,6 @@ PRBool nsWindow::DispatchStandardEvent(PRUint32 aMsg)
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWindow::PreCreateWidget(nsWidgetInitData *aInitData)
|
||||
{
|
||||
if ( nsnull == aInitData)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
SetWindowType(aInitData->mWindowType);
|
||||
SetBorderStyle(aInitData->mBorderStyle);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsRect &aRect,
|
||||
@ -618,7 +608,8 @@ NS_METHOD nsWindow::Destroy()
|
||||
if (mView->Parent())
|
||||
{
|
||||
mView->Parent()->RemoveChild(mView);
|
||||
if (eWindowType_child != mWindowType)
|
||||
if (eWindowType_child != mWindowType &&
|
||||
eWindowType_plugin != mWindowType)
|
||||
w->Quit();
|
||||
else
|
||||
w->Unlock();
|
||||
@ -836,7 +827,8 @@ NS_METHOD nsWindow::IsVisible(PRBool & bState)
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWindow::HideWindowChrome(PRBool aShouldHide)
|
||||
{
|
||||
if(mWindowType == eWindowType_child || mView == 0 || mView->Window() == 0)
|
||||
if(mWindowType == eWindowType_child || mWindowType == eWindowType_plugin ||
|
||||
mView == 0 || mView->Window() == 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
// B_BORDERED
|
||||
if (aShouldHide)
|
||||
@ -1431,7 +1423,7 @@ NS_IMETHODIMP nsWindow::Update()
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
//Switching scrolling trigger off
|
||||
mIsScrolling = PR_FALSE;
|
||||
if (mWindowType == eWindowType_child)
|
||||
if (mWindowType == eWindowType_child || mWindowType == eWindowType_plugin)
|
||||
return NS_OK;
|
||||
BRegion reg;
|
||||
reg.MakeEmpty();
|
||||
@ -1615,7 +1607,8 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
||||
case nsSwitchToUIThread::CLOSEWINDOW :
|
||||
{
|
||||
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType &&
|
||||
eWindowType_plugin != mWindowType)
|
||||
DealWithPopups(nsSwitchToUIThread::CLOSEWINDOW,nsPoint(0,0));
|
||||
|
||||
// Bit more Kung-fu. We do care ourselves about children destroy notofication.
|
||||
@ -1766,7 +1759,8 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
||||
case nsSwitchToUIThread::ONRESIZE :
|
||||
{
|
||||
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType &&
|
||||
eWindowType_plugin != mWindowType)
|
||||
DealWithPopups(nsSwitchToUIThread::ONRESIZE,nsPoint(0,0));
|
||||
// This should be called only from BWindow::FrameResized()
|
||||
if (!mIsTopWidgetWindow || !mView || !mView->Window())
|
||||
@ -1850,7 +1844,8 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
||||
return false;
|
||||
if ((BWindow *)info->args[1] != mView->Window())
|
||||
return false;
|
||||
if (mEventCallback || eWindowType_child == mWindowType )
|
||||
if (mEventCallback || eWindowType_child == mWindowType ||
|
||||
eWindowType_plugin == mWindowType)
|
||||
{
|
||||
bool active = (bool)info->args[0];
|
||||
if (!active)
|
||||
@ -1896,7 +1891,8 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
||||
nsRect r;
|
||||
// We use this only for tracking whole window moves
|
||||
GetScreenBounds(r);
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType &&
|
||||
eWindowType_plugin != mWindowType)
|
||||
DealWithPopups(nsSwitchToUIThread::ONMOVE,nsPoint(0,0));
|
||||
OnMove(r.x, r.y);
|
||||
}
|
||||
@ -1905,7 +1901,8 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
||||
case nsSwitchToUIThread::ONWORKSPACE:
|
||||
{
|
||||
NS_ASSERTION(info->nArgs == 2, "Wrong number of arguments to CallMethod");
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
|
||||
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType &&
|
||||
eWindowType_plugin != mWindowType)
|
||||
DealWithPopups(nsSwitchToUIThread::ONWORKSPACE,nsPoint(0,0));
|
||||
}
|
||||
break;
|
||||
@ -2391,7 +2388,9 @@ nsresult nsWindow::OnPaint(BRegion *breg)
|
||||
else
|
||||
return rv;
|
||||
BRect br = breg->Frame();
|
||||
if (!br.IsValid() || !mEventCallback || !mView || (eWindowType_child != mWindowType && eWindowType_popup != mWindowType))
|
||||
if (!br.IsValid() || !mEventCallback || !mView ||
|
||||
(eWindowType_child != mWindowType && eWindowType_popup != mWindowType &&
|
||||
eWindowType_plugin != mWindowType))
|
||||
return rv;
|
||||
nsRect nsr(nscoord(br.left), nscoord(br.top),
|
||||
nscoord(br.IntegerWidth() + 1), nscoord(br.IntegerHeight() + 1));
|
||||
|
@ -102,8 +102,6 @@ public:
|
||||
nsIToolkit *aToolkit = nsnull,
|
||||
nsWidgetInitData *aInitData = nsnull);
|
||||
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData);
|
||||
|
||||
gfxASurface* GetThebesSurface();
|
||||
|
||||
NS_IMETHOD Destroy();
|
||||
|
@ -597,7 +597,6 @@ protected:
|
||||
|
||||
PRPackedBool mVisible;
|
||||
PRPackedBool mDrawing;
|
||||
PRPackedBool mIsPluginView;
|
||||
PRPackedBool mPluginDrawing;
|
||||
PRPackedBool mPluginIsCG; // true if this is a CoreGraphics plugin
|
||||
|
||||
|
@ -510,7 +510,6 @@ nsChildView::nsChildView() : nsBaseWidget()
|
||||
, mParentWidget(nsnull)
|
||||
, mVisible(PR_FALSE)
|
||||
, mDrawing(PR_FALSE)
|
||||
, mIsPluginView(PR_FALSE)
|
||||
, mPluginDrawing(PR_FALSE)
|
||||
, mPluginIsCG(PR_FALSE)
|
||||
{
|
||||
@ -786,7 +785,6 @@ void* nsChildView::GetNativeData(PRUint32 aDataType)
|
||||
aDataType = NS_NATIVE_PLUGIN_PORT_CG;
|
||||
#endif
|
||||
mPluginIsCG = (aDataType == NS_NATIVE_PLUGIN_PORT_CG);
|
||||
mIsPluginView = PR_TRUE;
|
||||
if ([mView isKindOfClass:[ChildView class]])
|
||||
[(ChildView*)mView setIsPluginView:YES];
|
||||
|
||||
@ -859,7 +857,8 @@ NS_IMETHODIMP nsChildView::IsVisible(PRBool& outState)
|
||||
|
||||
void nsChildView::HidePlugin()
|
||||
{
|
||||
NS_ASSERTION(mIsPluginView, "HidePlugin called on non-plugin view");
|
||||
NS_ASSERTION(mWindowType == eWindowType_plugin,
|
||||
"HidePlugin called on non-plugin view");
|
||||
|
||||
if (mPluginInstanceOwner && !mPluginIsCG) {
|
||||
NPWindow* window;
|
||||
@ -878,7 +877,8 @@ void nsChildView::HidePlugin()
|
||||
|
||||
void nsChildView::UpdatePluginPort()
|
||||
{
|
||||
NS_ASSERTION(mIsPluginView, "UpdatePluginPort called on non-plugin view");
|
||||
NS_ASSERTION(mWindowType == eWindowType_plugin,
|
||||
"UpdatePluginPort called on non-plugin view");
|
||||
|
||||
NSWindow* cocoaWindow = [mView window];
|
||||
#if !defined(NP_NO_CARBON) || !defined(NP_NO_QUICKDRAW)
|
||||
@ -1209,8 +1209,9 @@ NS_IMETHODIMP nsChildView::GetPluginClipRect(nsIntRect& outClipRect, nsIntPoint&
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
NS_ASSERTION(mIsPluginView, "GetPluginClipRect must only be called on a plugin widget");
|
||||
if (!mIsPluginView) return NS_ERROR_FAILURE;
|
||||
NS_ASSERTION(mWindowType == eWindowType_plugin,
|
||||
"GetPluginClipRect must only be called on a plugin widget");
|
||||
if (mWindowType != eWindowType_plugin) return NS_ERROR_FAILURE;
|
||||
|
||||
NSWindow* window = [mView window];
|
||||
if (!window) return NS_ERROR_FAILURE;
|
||||
@ -1266,8 +1267,9 @@ NS_IMETHODIMP nsChildView::StartDrawPlugin()
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
NS_ASSERTION(mIsPluginView, "StartDrawPlugin must only be called on a plugin widget");
|
||||
if (!mIsPluginView) return NS_ERROR_FAILURE;
|
||||
NS_ASSERTION(mWindowType == eWindowType_plugin,
|
||||
"StartDrawPlugin must only be called on a plugin widget");
|
||||
if (mWindowType != eWindowType_plugin) return NS_ERROR_FAILURE;
|
||||
|
||||
// This code is necessary for both Quickdraw and CoreGraphics in 32-bit builds.
|
||||
// See comments below about why. In 64-bit CoreGraphics mode we will not keep
|
||||
@ -1347,8 +1349,9 @@ NS_IMETHODIMP nsChildView::StartDrawPlugin()
|
||||
|
||||
NS_IMETHODIMP nsChildView::EndDrawPlugin()
|
||||
{
|
||||
NS_ASSERTION(mIsPluginView, "EndDrawPlugin must only be called on a plugin widget");
|
||||
if (!mIsPluginView) return NS_ERROR_FAILURE;
|
||||
NS_ASSERTION(mWindowType == eWindowType_plugin,
|
||||
"EndDrawPlugin must only be called on a plugin widget");
|
||||
if (mWindowType != eWindowType_plugin) return NS_ERROR_FAILURE;
|
||||
|
||||
mPluginDrawing = PR_FALSE;
|
||||
return NS_OK;
|
||||
@ -1675,8 +1678,8 @@ void nsChildView::ApplyConfiguration(nsIWidget* aExpectedParent,
|
||||
nsWindowType kidType;
|
||||
aConfiguration.mChild->GetWindowType(kidType);
|
||||
#endif
|
||||
NS_ASSERTION(kidType == eWindowType_child,
|
||||
"Configured widget is not a child type");
|
||||
NS_ASSERTION(kidType == eWindowType_plugin || kidType == eWindowType_child,
|
||||
"Configured widget is not a child or plugin type");
|
||||
NS_ASSERTION(aConfiguration.mChild->GetParent() == aExpectedParent,
|
||||
"Configured widget is not a child of the right widget");
|
||||
aConfiguration.mChild->Resize(
|
||||
|
@ -147,13 +147,13 @@ nsCocoaWindow::~nsCocoaWindow()
|
||||
|
||||
// Notify the children that we're gone. Popup windows (e.g. tooltips) can
|
||||
// have nsChildView children. 'kid' is an nsChildView object if and only if
|
||||
// its 'type' is 'eWindowType_child'. childView->ResetParent() can change
|
||||
// our list of children while it's being iterated, so the way we iterate the
|
||||
// list must allow for this.
|
||||
// its 'type' is 'eWindowType_child' or 'eWindowType_plugin'.
|
||||
// childView->ResetParent() can change our list of children while it's
|
||||
// being iterated, so the way we iterate the list must allow for this.
|
||||
for (nsIWidget* kid = mLastChild; kid;) {
|
||||
nsWindowType kidType;
|
||||
kid->GetWindowType(kidType);
|
||||
if (kidType == eWindowType_child) {
|
||||
if (kidType == eWindowType_child || kidType == eWindowType_plugin) {
|
||||
nsChildView* childView = static_cast<nsChildView*>(kid);
|
||||
kid = kid->GetPrevSibling();
|
||||
childView->ResetParent();
|
||||
@ -228,12 +228,14 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
|
||||
if (!WindowSizeAllowed(aRect.width, aRect.height))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Set defaults which can be overriden from aInitData in BaseCreate
|
||||
mWindowType = eWindowType_toplevel;
|
||||
mBorderStyle = eBorderStyle_default;
|
||||
|
||||
Inherited::BaseCreate(aParent, aRect, aHandleEventFunction, aContext, aAppShell,
|
||||
aToolkit, aInitData);
|
||||
|
||||
mParent = aParent;
|
||||
SetWindowType(aInitData ? aInitData->mWindowType : eWindowType_toplevel);
|
||||
SetBorderStyle(aInitData ? aInitData->mBorderStyle : eBorderStyle_default);
|
||||
|
||||
// Applications that use native popups don't want us to create popup windows.
|
||||
if ((mWindowType == eWindowType_popup) && UseNativePopupWindows())
|
||||
@ -291,6 +293,7 @@ nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
|
||||
{
|
||||
case eWindowType_invisible:
|
||||
case eWindowType_child:
|
||||
case eWindowType_plugin:
|
||||
case eWindowType_popup:
|
||||
break;
|
||||
case eWindowType_toplevel:
|
||||
|
@ -1776,12 +1776,6 @@ nsWindow::GetNativeData(PRUint32 aDataType)
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetBorderStyle(nsBorderStyle aBorderStyle)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
@ -1867,17 +1861,6 @@ nsWindow::EnableDragDrop(PRBool aEnable)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::PreCreateWidget(nsWidgetInitData *aWidgetInitData)
|
||||
{
|
||||
if (nsnull != aWidgetInitData) {
|
||||
mWindowType = aWidgetInitData->mWindowType;
|
||||
mBorderStyle = aWidgetInitData->mBorderStyle;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::CaptureMouse(PRBool aCapture)
|
||||
{
|
||||
@ -3761,7 +3744,8 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
|
||||
// save our bounds
|
||||
mBounds = aRect;
|
||||
if (mWindowType != eWindowType_child) {
|
||||
if (mWindowType != eWindowType_child &&
|
||||
mWindowType != eWindowType_plugin) {
|
||||
// The window manager might place us. Indicate that if we're
|
||||
// shown, we want to go through
|
||||
// nsWindow::NativeResize(x,y,w,h) to maybe set our own
|
||||
@ -3918,6 +3902,7 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case eWindowType_plugin:
|
||||
case eWindowType_child: {
|
||||
if (parentMozContainer) {
|
||||
mGdkWindow = CreateGdkWindow(parentGdkWindow, parentMozContainer);
|
||||
|
@ -182,13 +182,11 @@ public:
|
||||
const nsTArray<nsIntRect>& aDestRects,
|
||||
const nsTArray<Configuration>& aReconfigureChildren);
|
||||
virtual void* GetNativeData(PRUint32 aDataType);
|
||||
NS_IMETHOD SetBorderStyle(nsBorderStyle aBorderStyle);
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle);
|
||||
NS_IMETHOD SetIcon(const nsAString& aIconSpec);
|
||||
NS_IMETHOD SetWindowClass(const nsAString& xulWinType);
|
||||
virtual nsIntPoint WidgetToScreenOffset();
|
||||
NS_IMETHOD EnableDragDrop(PRBool aEnable);
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData);
|
||||
NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
|
||||
PRBool aDoCapture,
|
||||
|
@ -730,8 +730,8 @@ void nsWindow::DoCreate( HWND hwndP, nsWindow *aParent,
|
||||
mIsTopWidgetWindow = PR_FALSE;
|
||||
|
||||
if( aInitData != nsnull) {
|
||||
SetWindowType(aInitData->mWindowType);
|
||||
SetBorderStyle(aInitData->mBorderStyle);
|
||||
mWindowType = aInitData->mWindowType;
|
||||
mBorerStyle = aInitData->mBorderStyle;
|
||||
}
|
||||
|
||||
// Must ensure toolkit before attempting to thread-switch!
|
||||
@ -1276,7 +1276,8 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
|
||||
// For mWnd & eWindowType_child set the cached values upfront, see bug 286555.
|
||||
// For other mWnd types we defer transfer of values to mBounds to
|
||||
// WinSetWindowPos(), see bug 391421.
|
||||
if( !mWnd || mWindowType == eWindowType_child)
|
||||
if( !mWnd || mWindowType == eWindowType_child ||
|
||||
mWindowType == eWindowType_plugin )
|
||||
{
|
||||
// Set cached value for lightweight and printing
|
||||
mBounds.x = aX ;
|
||||
|
@ -215,16 +215,6 @@ NS_IMETHODIMP nsWindow::CaptureRollupEvents( nsIRollupListener * aListener, PRBo
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::PreCreateWidget( nsWidgetInitData *aInitData ) {
|
||||
if (nsnull != aInitData) {
|
||||
SetWindowType( aInitData->mWindowType );
|
||||
SetBorderStyle( aInitData->mBorderStyle );
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Create the native widget
|
||||
@ -255,12 +245,14 @@ NS_METHOD nsWindow::CreateNative( PtWidget_t *parentWidget ) {
|
||||
case eWindowType_dialog :
|
||||
mIsToplevel = PR_TRUE;
|
||||
break;
|
||||
case eWindowType_plugin :
|
||||
case eWindowType_child :
|
||||
mIsToplevel = PR_FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( mWindowType == eWindowType_child )
|
||||
if ( mWindowType == eWindowType_child ||
|
||||
mWindowType == eWindowType_plugin )
|
||||
{
|
||||
arg_count = 0;
|
||||
PtSetArg( &arg[arg_count++], Pt_ARG_POS, &pos, 0 );
|
||||
@ -390,7 +382,8 @@ NS_METHOD nsWindow::CreateNative( PtWidget_t *parentWidget ) {
|
||||
if( mWidget ) {
|
||||
SetInstance( mWidget, this );
|
||||
if( mClientWidget ) SetInstance( mClientWidget, this );
|
||||
if( mWindowType == eWindowType_child ) {
|
||||
if( mWindowType == eWindowType_child ||
|
||||
mWindowType == eWindowType_plugin ) {
|
||||
PtAddCallback(mWidget, Pt_CB_RESIZE, ResizeHandler, nsnull );
|
||||
PtAddEventHandler( mWidget,
|
||||
Ph_EV_PTR_MOTION_BUTTON | Ph_EV_PTR_MOTION_NOBUTTON |
|
||||
|
@ -68,8 +68,6 @@ public:
|
||||
|
||||
NS_IMETHOD WidgetToScreen(const nsRect &aOldRect, nsRect &aNewRect);
|
||||
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData);
|
||||
|
||||
virtual void* GetNativeData(PRUint32 aDataType);
|
||||
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
|
@ -712,12 +712,6 @@ nsWindow::GetNativeData(PRUint32 aDataType)
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetBorderStyle(nsBorderStyle aBorderStyle)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
@ -786,17 +780,6 @@ nsWindow::EnableDragDrop(PRBool aEnable)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::PreCreateWidget(nsWidgetInitData *aWidgetInitData)
|
||||
{
|
||||
if (nsnull != aWidgetInitData) {
|
||||
mWindowType = aWidgetInitData->mWindowType;
|
||||
mBorderStyle = aWidgetInitData->mBorderStyle;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::CaptureMouse(PRBool aCapture)
|
||||
{
|
||||
@ -1990,7 +1973,8 @@ nsWindow::createQWidget(QWidget *parent, nsWidgetInitData *aInitData)
|
||||
windowName = "topLevelInvisible";
|
||||
break;
|
||||
case eWindowType_child:
|
||||
default: // plugin, java, sheet
|
||||
case eWindowType_plugin:
|
||||
default: // sheet
|
||||
windowName = "paintArea";
|
||||
break;
|
||||
}
|
||||
|
@ -166,10 +166,7 @@ public:
|
||||
const nsTArray<nsIntRect>&,
|
||||
const nsTArray<nsIWidget::Configuration>&);
|
||||
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData);
|
||||
|
||||
virtual void* GetNativeData(PRUint32 aDataType);
|
||||
NS_IMETHOD SetBorderStyle(nsBorderStyle aBorderStyle);
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle);
|
||||
NS_IMETHOD SetIcon(const nsAString& aIconSpec);
|
||||
virtual nsIntPoint WidgetToScreenOffset();
|
||||
|
@ -351,7 +351,6 @@ nsWindow::nsWindow() : nsBaseWidget()
|
||||
mIsVisible = PR_FALSE;
|
||||
mHas3DBorder = PR_FALSE;
|
||||
mIsInMouseCapture = PR_FALSE;
|
||||
mIsPluginWindow = PR_FALSE;
|
||||
mIsTopWidgetWindow = PR_FALSE;
|
||||
mInScrollProcessing = PR_FALSE;
|
||||
mUnicodeWidget = PR_TRUE;
|
||||
@ -512,8 +511,6 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
}
|
||||
|
||||
if (nsnull != aInitData) {
|
||||
SetWindowType(aInitData->mWindowType);
|
||||
SetBorderStyle(aInitData->mBorderStyle);
|
||||
mPopupType = aInitData->mPopupHint;
|
||||
}
|
||||
|
||||
@ -563,12 +560,15 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
if (!mWnd)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Ugly Thinkpad Driver Hack (Bug 507222)
|
||||
// We create an invisible scrollbar to trick the
|
||||
// Trackpoint driver into sending us scrolling messages
|
||||
::CreateWindowW(L"SCROLLBAR", L"FAKETRACKPOINTSCROLLBAR",
|
||||
WS_CHILD | WS_VISIBLE, 0,0,0,0, mWnd, NULL,
|
||||
nsToolkit::mDllInstance, NULL);
|
||||
if (mWindowType != eWindowType_plugin &&
|
||||
mWindowType != eWindowType_invisible) {
|
||||
// Ugly Thinkpad Driver Hack (Bug 507222)
|
||||
// We create an invisible scrollbar to trick the
|
||||
// Trackpoint driver into sending us scrolling messages
|
||||
::CreateWindowW(L"SCROLLBAR", L"FAKETRACKPOINTSCROLLBAR",
|
||||
WS_CHILD | WS_VISIBLE, 0,0,0,0, mWnd, NULL,
|
||||
nsToolkit::mDllInstance, NULL);
|
||||
}
|
||||
|
||||
// call the event callback to notify about creation
|
||||
|
||||
@ -773,6 +773,7 @@ DWORD nsWindow::WindowStyle()
|
||||
DWORD style;
|
||||
|
||||
switch (mWindowType) {
|
||||
case eWindowType_plugin:
|
||||
case eWindowType_child:
|
||||
style = WS_OVERLAPPED;
|
||||
break;
|
||||
@ -843,6 +844,7 @@ DWORD nsWindow::WindowExStyle()
|
||||
{
|
||||
switch (mWindowType)
|
||||
{
|
||||
case eWindowType_plugin:
|
||||
case eWindowType_child:
|
||||
return 0;
|
||||
|
||||
@ -2213,7 +2215,6 @@ void* nsWindow::GetNativeData(PRUint32 aDataType)
|
||||
{
|
||||
switch (aDataType) {
|
||||
case NS_NATIVE_PLUGIN_PORT:
|
||||
mIsPluginWindow = 1;
|
||||
case NS_NATIVE_WIDGET:
|
||||
case NS_NATIVE_WINDOW:
|
||||
return (void*)mWnd;
|
||||
@ -4213,7 +4214,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
|
||||
{
|
||||
if (mWindowType != eWindowType_invisible &&
|
||||
mWindowType != eWindowType_plugin &&
|
||||
mWindowType != eWindowType_java &&
|
||||
mWindowType != eWindowType_toplevel) {
|
||||
// eWindowType_toplevel is the top level main frame window. Gesture support
|
||||
// there prevents the user from interacting with the title bar or nc
|
||||
@ -5726,7 +5726,7 @@ PRBool nsWindow::HandleScrollingPlugins(UINT aMsg, WPARAM aWParam,
|
||||
return PR_FALSE; // break
|
||||
}
|
||||
nsWindow* destWindow = GetNSWindowPtr(destWnd);
|
||||
if (!destWindow || destWindow->mIsPluginWindow) {
|
||||
if (!destWindow || destWindow->mWindowType == eWindowType_plugin) {
|
||||
// Some other app, or a plugin window.
|
||||
// Windows directs scrolling messages to the focused window.
|
||||
// However, Mozilla does not like plugins having focus, so a
|
||||
@ -6249,7 +6249,7 @@ LRESULT CALLBACK nsWindow::MozSpecialMouseProc(int code, WPARAM wParam, LPARAM l
|
||||
if (mozWin) {
|
||||
// If this window is windowed plugin window, the mouse events are not
|
||||
// sent to us.
|
||||
if (static_cast<nsWindow*>(mozWin)->mIsPluginWindow)
|
||||
if (static_cast<nsWindow*>(mozWin)->mWindowType == eWindowType_plugin)
|
||||
ScheduleHookTimer(ms->hwnd, (UINT)wParam);
|
||||
} else {
|
||||
ScheduleHookTimer(ms->hwnd, (UINT)wParam);
|
||||
|
@ -385,7 +385,6 @@ protected:
|
||||
PRPackedBool mIsInMouseCapture;
|
||||
PRPackedBool mInScrollProcessing;
|
||||
PRPackedBool mUnicodeWidget;
|
||||
PRPackedBool mIsPluginWindow;
|
||||
PRPackedBool mPainting;
|
||||
char mLeadByte;
|
||||
PRUint32 mBlurSuppressLevel;
|
||||
|
@ -357,6 +357,7 @@ DWORD nsWindow::WindowStyle()
|
||||
/* on CE, WS_OVERLAPPED == WS_BORDER | WS_CAPTION, so don't use OVERLAPPED, just set the
|
||||
* separate bits directly for clarity */
|
||||
switch (mWindowType) {
|
||||
case eWindowType_plugin:
|
||||
case eWindowType_child:
|
||||
style = WS_CHILD;
|
||||
break;
|
||||
|
@ -200,7 +200,8 @@ void nsBaseWidget::BaseCreate(nsIWidget *aParent,
|
||||
}
|
||||
|
||||
if (nsnull != aInitData) {
|
||||
PreCreateWidget(aInitData);
|
||||
mWindowType = aInitData->mWindowType;
|
||||
mBorderStyle = aInitData->mBorderStyle;
|
||||
}
|
||||
|
||||
if (aParent) {
|
||||
@ -530,12 +531,6 @@ NS_IMETHODIMP nsBaseWidget::GetWindowType(nsWindowType& aWindowType)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsBaseWidget::SetWindowType(nsWindowType aWindowType)
|
||||
{
|
||||
mWindowType = aWindowType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Window transparency methods
|
||||
@ -721,13 +716,6 @@ NS_METHOD nsBaseWidget::SetWindowClass(const nsAString& xulWinType)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_METHOD nsBaseWidget::SetBorderStyle(nsBorderStyle aBorderStyle)
|
||||
{
|
||||
mBorderStyle = aBorderStyle;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If the implementation of nsWindow supports borders this method MUST be overridden
|
||||
*
|
||||
|
@ -69,8 +69,6 @@ public:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData) { return NS_OK;}
|
||||
|
||||
// nsIWidget interface
|
||||
NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
NS_IMETHOD GetClientData(void*& aClientData);
|
||||
@ -100,7 +98,6 @@ public:
|
||||
NS_IMETHOD SetCursor(imgIContainer* aCursor,
|
||||
PRUint32 aHotspotX, PRUint32 aHotspotY);
|
||||
NS_IMETHOD GetWindowType(nsWindowType& aWindowType);
|
||||
NS_IMETHOD SetWindowType(nsWindowType aWindowType);
|
||||
virtual void SetTransparencyMode(nsTransparencyMode aMode);
|
||||
virtual nsTransparencyMode GetTransparencyMode();
|
||||
virtual void GetWindowClipRegion(nsTArray<nsIntRect>* aRects);
|
||||
@ -114,7 +111,6 @@ public:
|
||||
virtual gfxASurface* GetThebesSurface();
|
||||
NS_IMETHOD SetModal(PRBool aModal);
|
||||
NS_IMETHOD SetWindowClass(const nsAString& xulWinType);
|
||||
NS_IMETHOD SetBorderStyle(nsBorderStyle aBorderStyle);
|
||||
NS_IMETHOD SetBounds(const nsIntRect &aRect);
|
||||
NS_IMETHOD GetBounds(nsIntRect &aRect);
|
||||
NS_IMETHOD GetClientBounds(nsIntRect &aRect);
|
||||
|
Loading…
Reference in New Issue
Block a user