Bug 870555 part 2: Add nsFlexContainerFrame::GetSkipSides specialization. r=mats

This commit is contained in:
Daniel Holbert 2013-05-09 20:10:49 -07:00
parent 27d4bf0217
commit 1d54bb4dfb
2 changed files with 21 additions and 0 deletions

View File

@ -1056,6 +1056,26 @@ nsFlexContainerFrame::GetType() const
return nsGkAtoms::flexContainerFrame;
}
/* virtual */
int
nsFlexContainerFrame::GetSkipSides() const
{
// (same as nsBlockFrame's GetSkipSides impl)
if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
}
int skip = 0;
if (GetPrevInFlow()) {
skip |= 1 << NS_SIDE_TOP;
}
nsIFrame* nif = GetNextInFlow();
if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) {
skip |= 1 << NS_SIDE_BOTTOM;
}
return skip;
}
#ifdef DEBUG
NS_IMETHODIMP
nsFlexContainerFrame::GetFrameName(nsAString& aResult) const

View File

@ -50,6 +50,7 @@ public:
GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
virtual int GetSkipSides() const MOZ_OVERRIDE;
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif // DEBUG