mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1317937: Rename nsImageMap::mContainsBlockContents to mConsiderWholeSubtree so it is more descriptive of what it actually does. r=mats
MozReview-Commit-ID: 4TpkkWmMIrc --HG-- extra : rebase_source : cfe444f66bc17f74fe05e6ca58383ecf042fdbd2
This commit is contained in:
parent
110cc1954a
commit
397cbc598a
@ -677,9 +677,9 @@ void CircleArea::GetRect(nsIFrame* aFrame, nsRect& aRect)
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
nsImageMap::nsImageMap() :
|
||||
mImageFrame(nullptr),
|
||||
mContainsBlockContents(false)
|
||||
nsImageMap::nsImageMap()
|
||||
: mImageFrame(nullptr)
|
||||
, mConsiderWholeSubtree(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -762,7 +762,7 @@ nsImageMap::SearchForAreas(nsIContent* aParent, bool& aFoundArea,
|
||||
aFoundArea = true;
|
||||
AddArea(child);
|
||||
|
||||
// Continue to next child. This stops mContainsBlockContents from
|
||||
// Continue to next child. This stops mConsiderWholeSubtree from
|
||||
// getting set. It also makes us ignore children of <area>s which
|
||||
// is consistent with how we react to dynamic insertion of such
|
||||
// children.
|
||||
@ -777,7 +777,7 @@ nsImageMap::SearchForAreas(nsIContent* aParent, bool& aFoundArea,
|
||||
}
|
||||
|
||||
if (child->IsElement()) {
|
||||
mContainsBlockContents = true;
|
||||
mConsiderWholeSubtree = true;
|
||||
SearchForAreas(child, aFoundArea, aFoundAnchor);
|
||||
}
|
||||
}
|
||||
@ -791,7 +791,7 @@ nsImageMap::UpdateAreas()
|
||||
|
||||
bool foundArea = false;
|
||||
bool foundAnchor = false;
|
||||
mContainsBlockContents = false;
|
||||
mConsiderWholeSubtree = false;
|
||||
|
||||
SearchForAreas(mMap, foundArea, foundAnchor);
|
||||
#ifdef ACCESSIBILITY
|
||||
@ -888,7 +888,7 @@ nsImageMap::Draw(nsIFrame* aFrame, DrawTarget& aDrawTarget,
|
||||
void
|
||||
nsImageMap::MaybeUpdateAreas(nsIContent *aContent)
|
||||
{
|
||||
if (aContent == mMap || mContainsBlockContents) {
|
||||
if (aContent == mMap || mConsiderWholeSubtree) {
|
||||
UpdateAreas();
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,11 @@ protected:
|
||||
nsImageFrame* mImageFrame; // the frame that owns us
|
||||
nsCOMPtr<nsIContent> mMap;
|
||||
AutoTArray<Area*, 8> mAreas; // almost always has some entries
|
||||
bool mContainsBlockContents;
|
||||
|
||||
// This is set when we search for all area children and tells us whether we
|
||||
// should consider the whole subtree or just direct children when we get
|
||||
// content notifications about changes inside the map subtree.
|
||||
bool mConsiderWholeSubtree;
|
||||
};
|
||||
|
||||
#endif /* nsImageMap_h */
|
||||
|
Loading…
Reference in New Issue
Block a user