void nsImageMap::MaybeUpdateAreas(nsIContent *aContent) { if (aContent == mMap || mContainsBlockContents) { UpdateAreas(); } }
nsresult nsImageMap::Init(nsImageFrame* aImageFrame, nsIContent* aMap) { NS_PRECONDITION(aMap, "null ptr"); if (!aMap) { return NS_ERROR_NULL_POINTER; } mImageFrame = aImageFrame; mMap = aMap; mMap->AddMutationObserver(this); // "Compile" the areas in the map into faster access versions return UpdateAreas(); }
nsresult nsImageMap::Init(nsIPresShell* aPresShell, nsIFrame* aImageFrame, nsIDOMHTMLMapElement* aMap) { NS_PRECONDITION(nsnull != aMap, "null ptr"); if (nsnull == aMap) { return NS_ERROR_NULL_POINTER; } mPresShell = aPresShell; mImageFrame = aImageFrame; mMap = do_QueryInterface(aMap); NS_ASSERTION(mMap, "aMap is not an nsIContent!"); mMap->AddMutationObserver(this); // "Compile" the areas in the map into faster access versions return UpdateAreas(); }