Fix context menu flags when right mousing on an image on a page that has a background image. Fix mfcembed menu code to exercise this functionality. b=178988 r=chak@netscape.c sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@138353 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1566,19 +1566,19 @@ ChromeContextMenuListener :: ContextMenu ( nsIDOMEvent* aMouseEvent )
|
||||
}
|
||||
else if (tag.Equals(NS_LITERAL_STRING("html"), nsCaseInsensitiveStringComparator()))
|
||||
{
|
||||
// first check if this is a background image that the user was trying to click on
|
||||
// and if the listener is ready for that (only nsIContextMenuListener2 and up)
|
||||
if (menuInfoImpl && menuInfoImpl->HasBackgroundImage(node)) {
|
||||
flags2 |= nsIContextMenuListener2::CONTEXT_BACKGROUND_IMAGE;
|
||||
targetDOMnode = node;
|
||||
}
|
||||
|
||||
if (!flags && !flags2) {
|
||||
// only care about this if no other context was found.
|
||||
flags |= nsIContextMenuListener::CONTEXT_DOCUMENT;
|
||||
flags2 |= nsIContextMenuListener2::CONTEXT_DOCUMENT;
|
||||
targetDOMnode = node;
|
||||
}
|
||||
if (!(flags & nsIContextMenuListener::CONTEXT_IMAGE)) {
|
||||
// first check if this is a background image that the user was trying to click on
|
||||
// and if the listener is ready for that (only nsIContextMenuListener2 and up)
|
||||
if (menuInfoImpl && menuInfoImpl->HasBackgroundImage(node)) {
|
||||
flags2 |= nsIContextMenuListener2::CONTEXT_BACKGROUND_IMAGE;
|
||||
}
|
||||
}
|
||||
break; // exit do-while
|
||||
}
|
||||
else if ( tag.EqualsWithConversion("object", PR_TRUE) || /* XXX what about images and documents? */
|
||||
|
||||
Reference in New Issue
Block a user