mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 16:57:36 +00:00
Add View Image item to link popup menu in mfcembed to catch image links. b=194954 r=chak@netscape.com sr=alecf@netscape.com
This commit is contained in:
parent
0658c7676a
commit
89396637a2
@ -387,6 +387,20 @@ void CBrowserFrame::BrowserFrameGlueObj::ShowContextMenu(PRUint32 aContextFlags,
|
||||
// Update the view with the new LinkUrl
|
||||
// Note that this string is in UCS2 format
|
||||
pThis->m_wndBrowserView.SetCtxMenuLinkUrl(strUrlUcs2);
|
||||
|
||||
// Test if there is an image URL as well
|
||||
nsCOMPtr<nsIURI> imgURI;
|
||||
aInfo->GetImageSrc(getter_AddRefs(imgURI));
|
||||
if(imgURI)
|
||||
{
|
||||
nsCAutoString strImgSrcUtf8;
|
||||
imgURI->GetSpec(strImgSrcUtf8);
|
||||
if(!strImgSrcUtf8.IsEmpty())
|
||||
{
|
||||
// Set the new Img Src
|
||||
pThis->m_wndBrowserView.SetCtxMenuImageSrc(NS_ConvertUTF8toUCS2(strImgSrcUtf8));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(aContextFlags & nsIContextMenuListener2::CONTEXT_IMAGE)
|
||||
{
|
||||
|
@ -229,6 +229,8 @@ BEGIN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&View Page Source", ID_VIEW_SOURCE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "View &Image", ID_VIEW_IMAGE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save &Page As...", ID_FILE_SAVE_AS
|
||||
MENUITEM "Save &Link As...", ID_SAVE_LINK_AS
|
||||
MENUITEM "&Copy Link Location", ID_COPY_LINK_LOCATION
|
||||
|
Loading…
x
Reference in New Issue
Block a user