mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 22:07:41 +00:00
Bug 870555 part 2: Add nsFlexContainerFrame::GetSkipSides specialization. r=mats
This commit is contained in:
parent
27d4bf0217
commit
1d54bb4dfb
@ -1056,6 +1056,26 @@ nsFlexContainerFrame::GetType() const
|
|||||||
return nsGkAtoms::flexContainerFrame;
|
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
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsFlexContainerFrame::GetFrameName(nsAString& aResult) const
|
nsFlexContainerFrame::GetFrameName(nsAString& aResult) const
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
|
GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||||
|
virtual int GetSkipSides() const MOZ_OVERRIDE;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user