Bug 10301: Check base target for image maps

git-svn-id: svn://10.0.0.236/trunk@40679 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pollmann%netscape.com
1999-07-22 18:47:23 +00:00
parent f817e5220b
commit 203c71adbd
2 changed files with 20 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include "nsIDocument.h"
#include "nsINameSpaceManager.h"
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
class Area {
public:
@@ -880,6 +882,14 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
NS_RELEASE(baseUri);
#endif // NECKO
aTarget = area->mTarget;
if (mMap && (aTarget.Length() == 0)) {
nsIHTMLContent* content = nsnull;
nsresult result = mMap->QueryInterface(kIHTMLContentIID, (void**)&content);
if ((NS_OK == result) && content) {
content->GetBaseTarget(aTarget);
NS_RELEASE(content);
}
}
aAltText = area->mAltText;
*aSuppress = area->mSuppressFeedback;
return PR_TRUE;