diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index 331a73495d3b..4ee5c53f8a0a 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -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 diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 92e0056435c0..b83273fda098 100644 --- a/layout/generic/nsFlexContainerFrame.h +++ b/layout/generic/nsFlexContainerFrame.h @@ -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