Compare commits

...

4 Commits

Author SHA1 Message Date
syd%netscape.com
9ef1ad9fbc Checked in patch for bug 148889, approval to PR1_BRANCH from ADT.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@123483 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 00:48:57 +00:00
syd%netscape.com
10b01c369c Checked in patch for 135737. approval from adt, reviews noted in bug
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@123188 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 21:09:42 +00:00
sspitzer%netscape.com
104c8fe8d7 fix for bugscape bug #15485. turbo users can get password prompts
for AOL mail and netscape web mail accounts *after* they exit.
r/sr=mscott.  a=putterman


git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121355 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-12 21:17:16 +00:00
bryner%netscape.com
34f7e107ff Fix undefined entities in hiddenWindow.xul, the cause of missing menus on Mac when no windows are open (bug 143141). r=jag, sr=hewitt, a=asa.
git-svn-id: svn://10.0.0.236/branches/NETSCAPE_7_0_PR1_BRANCH@121233 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-10 01:20:04 +00:00
6 changed files with 111 additions and 8 deletions

View File

@@ -786,8 +786,6 @@ nsObjectFrame::CreateWidget(nsIPresContext* aPresContext,
view->GetWidget(*getter_AddRefs(win));
if (win)
win->SetBackgroundColor(color->mBackgroundColor);
else
NS_ASSERTION(win, "failed to get widget to set background color on");
break;
}
}
@@ -1400,7 +1398,7 @@ nsObjectFrame::ContentChanged(nsIPresContext* aPresContext,
return rv;
}
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint * aOrigin)
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindowless, nsPoint * aOrigin)
{
NS_ENSURE_ARG_POINTER(aPresContext);
NS_ENSURE_ARG_POINTER(aOrigin);
@@ -1411,6 +1409,29 @@ nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, n
GetOffsetFromView(aPresContext, origin, &parentWithView);
// if it's windowless, let's make sure we have our origin set right
// it may need to be corrected, like after scrolling
if (aWindowless && parentWithView) {
nsPoint correction(0,0);
nsCOMPtr<nsIViewManager> parentVM;
parentWithView->GetViewManager(*getter_AddRefs(parentVM));
// Walk up all the views and add up their positions. This will give us our
// absolute position which is what we want to give the plugin
nsIView* theView = parentWithView;
while (theView) {
nsCOMPtr<nsIViewManager> vm;
theView->GetViewManager(*getter_AddRefs(vm));
if (vm != parentVM)
break;
theView->GetPosition(&correction.x, &correction.y);
origin += correction;
theView->GetParent(theView);
}
}
float t2p;
aPresContext->GetTwipsToPixels(&t2p);
aOrigin->x = NSTwipsToIntPixels(origin.x, t2p);
@@ -1461,7 +1482,7 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
return rv;
nsPoint origin;
GetWindowOriginInPixels(aPresContext, &origin);
GetWindowOriginInPixels(aPresContext, windowless, &origin);
window->x = origin.x;
window->y = origin.y;
@@ -1683,6 +1704,15 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
doupdatewindow = PR_TRUE;
}
/*
* Layout now has an optimized way of painting. Now we always get
* a new drawing surface, sized to be just what's needed. Windowsless
* plugins need a transform applied to their origin so they paint
* in the right place. Since |SetWindow| is no longer being used
* to tell the plugin where it is, we dispatch a NPWindow through
* |HandleEvent| to tell the plugin when its window moved
*/
// Get the offset of the DC
nsTransform2D* rcTransform;
aRenderingContext.GetCurrentTransform(rcTransform);
@@ -1695,8 +1725,62 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
doupdatewindow = PR_TRUE;
}
if(doupdatewindow)
inst->SetWindow(window);
// if our location or visible area has changed, we need to tell the plugin
if(doupdatewindow) {
#ifdef XP_WIN // Windowless plugins on windows need a special event to update their location, see bug 135737
// first, lets find out how big the window is, in pixels
nsCOMPtr<nsIPresShell> shell;
nsCOMPtr<nsIViewManager> vm;
aPresContext->GetShell(getter_AddRefs(shell));
if (shell) {
shell->GetViewManager(getter_AddRefs(vm));
if (vm) {
nsIView* view;
vm->GetRootView(view);
if (view) {
nsCOMPtr<nsIWidget> win;
view->GetWidget(*getter_AddRefs(win));
if (win) {
nsRect visibleRect;
win->GetBounds(visibleRect);
// next, get our plugin's rect so we can intersect it with the visible rect so we
// can tell the plugin where and how much to paint
GetWindowOriginInPixels(aPresContext, window->type, &origin);
nsRect winlessRect = nsRect(origin, nsSize(window->width, window->height));
winlessRect.IntersectRect(winlessRect, visibleRect);
// now check our cached window and only update plugin if something has changed
if (mWindowlessRect != winlessRect) {
mWindowlessRect = winlessRect;
WINDOWPOS winpos;
memset(&winpos, 0, sizeof(winpos));
winpos.x = mWindowlessRect.x;
winpos.y = mWindowlessRect.y;
winpos.cx = mWindowlessRect.width;
winpos.cy = mWindowlessRect.height;
// finally, update the plugin by sending it a WM_WINDOWPOSCHANGED event
nsPluginEvent pluginEvent;
pluginEvent.event = 0x0047;
pluginEvent.wParam = 0;
pluginEvent.lParam = (uint32)&winpos;
PRBool eventHandled = PR_FALSE;
inst->HandleEvent(&pluginEvent, &eventHandled);
mInstanceOwner->ReleasePluginPort((nsPluginPort *)winpos.hwnd);
}
}
}
}
}
#endif
inst->SetWindow(window);
}
mInstanceOwner->Paint(aDirtyRect, hdc);
}

View File

@@ -161,13 +161,14 @@ protected:
nsresult NotifyContentObjectWrapper();
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint* aOrigin);
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindoless, nsPoint* aOrigin);
private:
nsPluginInstanceOwner *mInstanceOwner;
nsIURI *mFullURL;
nsIFrame *mFirstChild;
nsIWidget *mWidget;
nsRect mWindowlessRect;
};

View File

@@ -2354,6 +2354,15 @@ nsresult nsImapIncomingServer::GetUnverifiedSubFolders(nsIFolder *parentFolder,
return rv;
}
NS_IMETHODIMP nsImapIncomingServer::ForgetSessionPassword()
{
nsresult rv = nsMsgIncomingServer::ForgetSessionPassword();
NS_ENSURE_SUCCESS(rv,rv);
m_userAuthenticated = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP nsImapIncomingServer::GetServerRequiresPasswordForBiff(PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);

View File

@@ -93,6 +93,7 @@ NS_IMETHOD GetCanUndoDeleteOnServer(PRBool *canUndoDeleteOnServer);
NS_IMETHOD GetServerRequiresPasswordForBiff(PRBool *_retval);
NS_IMETHOD OnUserOrHostNameChanged(const char *oldName, const char *newName);
NS_IMETHOD GetNumIdleConnections(PRInt32 *aNumIdleConnections);
NS_IMETHOD ForgetSessionPassword();
protected:
nsresult GetFolder(const char* name, nsIMsgFolder** pFolder);
nsresult ResetFoldersToUnverified(nsIFolder *parentFolder);

View File

@@ -1199,7 +1199,13 @@ NS_IMETHODIMP ns4xPluginInstance :: GetScriptablePeer(void * *aScriptablePeer)
return NS_ERROR_NULL_POINTER;
*aScriptablePeer = nsnull;
return GetValue(nsPluginInstanceVariable_ScriptableInstance, aScriptablePeer);
nsresult rv = GetValue(nsPluginInstanceVariable_ScriptableInstance, aScriptablePeer);
if (NS_SUCCEEDED(rv) && *aScriptablePeer) {
// scriptable plugins should always be cached to avoid the crash in
// XPCWrappedNativeProto::~XPCWrappedNativeProto call from js_GC, bug 148889
SetCached(PR_TRUE);
}
return rv;
}

View File

@@ -42,6 +42,8 @@ Contributor(s): ______________________________________. -->
%buildDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % navigatorTitleDTD SYSTEM "chrome://navigator/locale/navigator-title.dtd" >
%navigatorTitleDTD;
]>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"