Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc

This commit is contained in:
Mats Palmgren 2014-06-28 10:13:13 +00:00
parent 6366f43016
commit d11737c8ef
37 changed files with 166 additions and 159 deletions

View File

@ -22,10 +22,10 @@ public:
void Display(nsAString& aValue);
void TextAlign(nsAString& aValue);
void TextIndent(nsAString& aValue);
void MarginLeft(nsAString& aValue) { Margin(css::eSideLeft, aValue); }
void MarginRight(nsAString& aValue) { Margin(css::eSideRight, aValue); }
void MarginTop(nsAString& aValue) { Margin(css::eSideTop, aValue); }
void MarginBottom(nsAString& aValue) { Margin(css::eSideBottom, aValue); }
void MarginLeft(nsAString& aValue) { Margin(eSideLeft, aValue); }
void MarginRight(nsAString& aValue) { Margin(eSideRight, aValue); }
void MarginTop(nsAString& aValue) { Margin(eSideTop, aValue); }
void MarginBottom(nsAString& aValue) { Margin(eSideBottom, aValue); }
static void FormatColor(const nscolor& aValue, nsString& aFormattedValue);
static void FormatFontStyle(const nscoord& aValue, nsAString& aFormattedValue);
@ -36,7 +36,7 @@ private:
StyleInfo(const StyleInfo&) MOZ_DELETE;
StyleInfo& operator = (const StyleInfo&) MOZ_DELETE;
void Margin(css::Side aSide, nsAString& aValue);
void Margin(Side aSide, nsAString& aValue);
dom::Element* mElement;
nsRefPtr<nsStyleContext> mStyleContext;

View File

@ -87,7 +87,7 @@ struct gfxRect :
return gfxPoint(0.0, 0.0);
}
gfxPoint CCWCorner(mozilla::css::Side side) const {
gfxPoint CCWCorner(mozilla::Side side) const {
switch (side) {
case NS_SIDE_TOP: return TopLeft();
case NS_SIDE_RIGHT: return TopRight();
@ -97,7 +97,7 @@ struct gfxRect :
MOZ_CRASH("Incomplete switch");
}
gfxPoint CWCorner(mozilla::css::Side side) const {
gfxPoint CWCorner(mozilla::Side side) const {
switch (side) {
case NS_SIDE_TOP: return TopRight();
case NS_SIDE_RIGHT: return BottomRight();

View File

@ -303,7 +303,7 @@ protected:
nsIFrame* inlineFrame = GetPrevContinuation(aFrame);
while (inlineFrame) {
if (!mLeftBorderData.mFrame &&
!(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
!inlineFrame->GetSkipSides().Left()) {
mLeftBorderData.mFrame = inlineFrame;
}
nsRect rect = inlineFrame->GetRect();
@ -321,7 +321,7 @@ protected:
inlineFrame = aFrame;
while (inlineFrame) {
if (!mLeftBorderData.mFrame &&
!(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
!inlineFrame->GetSkipSides().Left()) {
mLeftBorderData.mFrame = inlineFrame;
}
nsRect rect = inlineFrame->GetRect();
@ -362,7 +362,7 @@ static void DrawBorderImage(nsPresContext* aPresContext,
const nsRect& aBorderArea,
const nsStyleBorder& aStyleBorder,
const nsRect& aDirtyRect,
int aSkipSides);
Sides aSkipSides);
static nscolor MakeBevelColor(mozilla::css::Side whichSide, uint8_t style,
nscolor aBackgroundColor,
@ -439,10 +439,10 @@ GetRadii(nsIFrame* aForFrame, const nsStyleBorder& aBorder,
nsSize frameSize = aForFrame->GetSize();
if (&aBorder == aForFrame->StyleBorder() &&
frameSize == aOrigBorderArea.Size()) {
haveRoundedCorners = aForFrame->GetBorderRadii(sz, sz, 0, radii);
haveRoundedCorners = aForFrame->GetBorderRadii(sz, sz, Sides(), radii);
} else {
haveRoundedCorners =
nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, frameSize, sz, 0, radii);
nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, frameSize, sz, Sides(), radii);
}
if (haveRoundedCorners) {
auto d2a = aForFrame->PresContext()->AppUnitsPerDevPixel();
@ -561,7 +561,7 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
const nsRect& aDirtyRect,
const nsRect& aBorderArea,
nsStyleContext* aStyleContext,
int aSkipSides)
Sides aSkipSides)
{
PROFILER_LABEL("nsCSSRendering", "PaintBorder",
js::ProfileEntry::Category::GRAPHICS);
@ -606,7 +606,7 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
const nsRect& aBorderArea,
const nsStyleBorder& aStyleBorder,
nsStyleContext* aStyleContext,
int aSkipSides)
Sides aSkipSides)
{
SN("++ PaintBorder");
@ -660,7 +660,7 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
ctx->Save();
if (::IsBoxDecorationSlice(aStyleBorder)) {
if (aSkipSides == 0) {
if (aSkipSides.IsEmpty()) {
// No continuations most likely, or ::first-letter that wants all border-
// sides on the first continuation.
joinedBorderArea = aBorderArea;
@ -675,7 +675,7 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
} else {
MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
"Should use aBorderArea for box-decoration-break:clone");
MOZ_ASSERT(aForFrame->GetSkipSides() == 0,
MOZ_ASSERT(aForFrame->GetSkipSides().IsEmpty(),
"Should not skip sides for box-decoration-break:clone except "
"::first-letter/line continuations or other frame types that "
"don't have borders but those shouldn't reach this point.");
@ -801,7 +801,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
// get the radius for our outline
nsIFrame::ComputeBorderRadii(ourOutline->mOutlineRadius, aBorderArea.Size(),
outerRect.Size(), 0, twipsRadii);
outerRect.Size(), Sides(), twipsRadii);
// Get our conversion values
nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
@ -1201,7 +1201,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(),
"unexpected size");
nsSize sz = frameRect.Size();
hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, Sides(), twipsRadii);
if (hasBorderRadius) {
ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
}
@ -1230,7 +1230,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0));
}
int skipSides = aForFrame->GetSkipSides();
Sides skipSides = aForFrame->GetSkipSides();
for (uint32_t i = shadows->Length(); i > 0; --i) {
nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1);
if (shadowItem->mInset)
@ -1325,25 +1325,25 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
// Clip the shadow so that we only get the part that applies to aForFrame.
nsRect fragmentClip = shadowRectPlusBlur;
if (skipSides) {
if (skipSides & SIDE_BIT_LEFT) {
if (!skipSides.IsEmpty()) {
if (skipSides.Left()) {
nscoord xmost = fragmentClip.XMost();
fragmentClip.x = aFrameArea.x;
fragmentClip.width = xmost - fragmentClip.x;
}
if (skipSides & SIDE_BIT_RIGHT) {
if (skipSides.Right()) {
nscoord xmost = fragmentClip.XMost();
nscoord overflow = xmost - aFrameArea.XMost();
if (overflow > 0) {
fragmentClip.width -= overflow;
}
}
if (skipSides & SIDE_BIT_TOP) {
if (skipSides.Top()) {
nscoord ymost = fragmentClip.YMost();
fragmentClip.y = aFrameArea.y;
fragmentClip.height = ymost - fragmentClip.y;
}
if (skipSides & SIDE_BIT_BOTTOM) {
if (skipSides.Bottom()) {
nscoord ymost = fragmentClip.YMost();
nscoord overflow = ymost - aFrameArea.YMost();
if (overflow > 0) {
@ -1414,7 +1414,7 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
// if the frame does.
nscoord twipsRadii[8];
nsSize sz = frameRect.Size();
bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, Sides(), twipsRadii);
const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
gfxCornerSizes innerRadii;
@ -3296,7 +3296,7 @@ DrawBorderImage(nsPresContext* aPresContext,
const nsRect& aBorderArea,
const nsStyleBorder& aStyleBorder,
const nsRect& aDirtyRect,
int aSkipSides)
Sides aSkipSides)
{
NS_PRECONDITION(aStyleBorder.IsBorderImageLoaded(),
"drawing border image that isn't successfully loaded");
@ -3329,7 +3329,7 @@ DrawBorderImage(nsPresContext* aPresContext,
nsRect borderImgArea;
nsMargin borderWidths(aStyleBorder.GetComputedBorder());
nsMargin imageOutset(aStyleBorder.GetImageOutset());
if (::IsBoxDecorationSlice(aStyleBorder) && aSkipSides != 0) {
if (::IsBoxDecorationSlice(aStyleBorder) && !aSkipSides.IsEmpty()) {
borderImgArea =
::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aStyleBorder);
if (borderImgArea.IsEqualEdges(aBorderArea)) {

View File

@ -279,6 +279,8 @@ struct nsBackgroundLayerState {
};
struct nsCSSRendering {
typedef nsIFrame::Sides Sides;
/**
* Initialize any static variables used by nsCSSRendering.
*/
@ -308,8 +310,8 @@ struct nsCSSRendering {
/**
* Render the border for an element using css rendering rules
* for borders. aSkipSides is a bitmask of the sides to skip
* when rendering. If 0 then no sides are skipped.
* for borders. aSkipSides says which sides to skip
* when rendering, the default is to skip none.
*/
static void PaintBorder(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
@ -317,11 +319,12 @@ struct nsCSSRendering {
const nsRect& aDirtyRect,
const nsRect& aBorderArea,
nsStyleContext* aStyleContext,
int aSkipSides = 0);
Sides aSkipSides = Sides());
/**
* Like PaintBorder, but taking an nsStyleBorder argument instead of
* getting it from aStyleContext.
* getting it from aStyleContext. aSkipSides says which sides to skip
* when rendering, the default is to skip none.
*/
static void PaintBorderWithStyleBorder(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
@ -330,13 +333,12 @@ struct nsCSSRendering {
const nsRect& aBorderArea,
const nsStyleBorder& aBorderStyle,
nsStyleContext* aStyleContext,
int aSkipSides = 0);
Sides aSkipSides = Sides());
/**
* Render the outline for an element using css rendering rules
* for borders. aSkipSides is a bitmask of the sides to skip
* when rendering. If 0 then no sides are skipped.
* for borders.
*/
static void PaintOutline(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,

View File

@ -15,8 +15,6 @@
#include "nsLayoutUtils.h"
#include "RestyleTracker.h"
using namespace mozilla::css;
namespace mozilla {
void DestroyStickyScrollContainer(void* aPropertyValue)

View File

@ -1038,7 +1038,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
aReflowState.ComputedBSize() != NS_AUTOHEIGHT &&
ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
LogicalMargin blockDirExtras = aReflowState.ComputedLogicalBorderPadding();
if (GetLogicalSkipSides() & (LOGICAL_SIDE_B_START)) {
if (GetLogicalSkipSides().BStart()) {
blockDirExtras.BStart(wm) = 0;
} else {
// Bottom margin never causes us to create continuations, so we

View File

@ -48,18 +48,19 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
SetFlag(BRS_ISFIRSTINFLOW, aFrame->GetPrevInFlow() == nullptr);
SetFlag(BRS_ISOVERFLOWCONTAINER, IS_TRUE_OVERFLOW_CONTAINER(aFrame));
int logicalSkipSides = aFrame->GetLogicalSkipSides(&aReflowState);
nsIFrame::LogicalSides logicalSkipSides =
aFrame->GetLogicalSkipSides(&aReflowState);
mBorderPadding.ApplySkipSides(logicalSkipSides);
// Note that mContainerWidth is the physical width!
mContainerWidth = aReflowState.ComputedWidth() + mBorderPadding.LeftRight(wm);
if ((aBStartMarginRoot && !(logicalSkipSides & LOGICAL_SIDE_B_START)) ||
if ((aBStartMarginRoot && !logicalSkipSides.BStart()) ||
0 != mBorderPadding.BStart(wm)) {
SetFlag(BRS_ISBSTARTMARGINROOT, true);
SetFlag(BRS_APPLYBSTARTMARGIN, true);
}
if ((aBEndMarginRoot && !(logicalSkipSides & LOGICAL_SIDE_B_END)) ||
if ((aBEndMarginRoot && !logicalSkipSides.BEnd()) ||
0 != mBorderPadding.BEnd(wm)) {
SetFlag(BRS_ISBENDMARGINROOT, true);
}

View File

@ -110,10 +110,12 @@ nsColumnSetFrame::PaintColumnRule(nsRenderingContext* aCtx,
contentRect.y);
nsRect lineRect(linePt, ruleSize);
// Remember, we only have the "left" "border". Skip everything else.
Sides skipSides(mozilla::eSideBitsTopBottom);
skipSides |= mozilla::eSideBitsRight;
nsCSSRendering::PaintBorderWithStyleBorder(presContext, *aCtx, this,
aDirtyRect, lineRect, border, StyleContext(),
// Remember, we only have the "left" "border". Skip everything else
(1 << NS_SIDE_TOP | 1 << NS_SIDE_RIGHT | 1 << NS_SIDE_BOTTOM));
skipSides);
child = nextSibling;
nextSibling = nextSibling->GetNextSibling();

View File

@ -378,7 +378,7 @@ nsFirstLetterFrame::GetLogicalBaseline(WritingMode aWritingMode) const
return mBaseline;
}
int
nsIFrame::LogicalSides
nsFirstLetterFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (GetPrevContinuation()) {
@ -387,7 +387,7 @@ nsFirstLetterFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) c
// properties that could trigger a call to GetSkipSides. Then again,
// it's not really an error to call GetSkipSides on any frame, so
// that's why we handle it properly.
return LOGICAL_SIDES_ALL;
return LogicalSides(LOGICAL_SIDES_ALL);
}
return 0; // first continuation displays all sides
return LogicalSides(); // first continuation displays all sides
}

View File

@ -60,7 +60,7 @@ public:
virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const MOZ_OVERRIDE;
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
//override of nsFrame method
virtual nsresult GetChildFrameContainingOffset(int32_t inContentOffset,

View File

@ -21,7 +21,6 @@
#include "mozilla/LinkedList.h"
using namespace mozilla;
using namespace mozilla::css;
using namespace mozilla::layout;
// Convenience typedefs for helper classes that we forward-declare in .h file
@ -74,8 +73,8 @@ enum AxisEdgeType {
};
// This array maps each axis orientation to a pair of corresponding
// [start, end] physical mozilla::css::Side values.
static const Side
// [start, end] physical mozilla::Side values.
static const mozilla::Side
kAxisOrientationToSidesMap[eNumAxisOrientationTypes][eNumAxisEdges] = {
{ eSideLeft, eSideRight }, // eAxis_LR
{ eSideRight, eSideLeft }, // eAxis_RL
@ -155,7 +154,7 @@ PhysicalPosFromLogicalPos(nscoord aLogicalPosn,
}
static nscoord
MarginComponentForSide(const nsMargin& aMargin, Side aSide)
MarginComponentForSide(const nsMargin& aMargin, mozilla::Side aSide)
{
switch (aSide) {
case eSideLeft:
@ -174,7 +173,7 @@ MarginComponentForSide(const nsMargin& aMargin, Side aSide)
}
static nscoord&
MarginComponentForSide(nsMargin& aMargin, Side aSide)
MarginComponentForSide(nsMargin& aMargin, mozilla::Side aSide)
{
switch (aSide) {
case eSideLeft:
@ -415,15 +414,15 @@ public:
// ===================
const nsMargin& GetMargin() const { return mMargin; }
// Returns the margin component for a given mozilla::css::Side
nscoord GetMarginComponentForSide(Side aSide) const
// Returns the margin component for a given mozilla::Side
nscoord GetMarginComponentForSide(mozilla::Side aSide) const
{ return MarginComponentForSide(mMargin, aSide); }
// Returns the total space occupied by this item's margins in the given axis
nscoord GetMarginSizeInAxis(AxisOrientationType aAxis) const
{
Side startSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_Start];
Side endSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_End];
mozilla::Side startSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_Start];
mozilla::Side endSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_End];
return GetMarginComponentForSide(startSide) +
GetMarginComponentForSide(endSide);
}
@ -432,16 +431,16 @@ public:
// ==========================
const nsMargin& GetBorderPadding() const { return mBorderPadding; }
// Returns the border+padding component for a given mozilla::css::Side
nscoord GetBorderPaddingComponentForSide(Side aSide) const
// Returns the border+padding component for a given mozilla::Side
nscoord GetBorderPaddingComponentForSide(mozilla::Side aSide) const
{ return MarginComponentForSide(mBorderPadding, aSide); }
// Returns the total space occupied by this item's borders and padding in
// the given axis
nscoord GetBorderPaddingSizeInAxis(AxisOrientationType aAxis) const
{
Side startSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_Start];
Side endSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_End];
mozilla::Side startSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_Start];
mozilla::Side endSide = kAxisOrientationToSidesMap[aAxis][eAxisEdge_End];
return GetBorderPaddingComponentForSide(startSide) +
GetBorderPaddingComponentForSide(endSide);
}
@ -551,7 +550,7 @@ public:
}
// Setter for margin components (for resolving "auto" margins)
void SetMarginComponentForSide(Side aSide, nscoord aLength)
void SetMarginComponentForSide(mozilla::Side aSide, nscoord aLength)
{
MOZ_ASSERT(mIsFrozen, "main size should be resolved before this");
MarginComponentForSide(mMargin, aSide) = aLength;
@ -1273,7 +1272,7 @@ FlexItem::GetBaselineOffsetFromOuterCrossEdge(AxisOrientationType aCrossAxis,
"Only expecting to be doing baseline computations when the "
"cross axis is vertical");
Side sideToMeasureFrom = kAxisOrientationToSidesMap[aCrossAxis][aEdge];
mozilla::Side sideToMeasureFrom = kAxisOrientationToSidesMap[aCrossAxis][aEdge];
nscoord marginTopToBaseline = mAscent + mMargin.top;
@ -1299,7 +1298,7 @@ FlexItem::GetNumAutoMarginsInAxis(AxisOrientationType aAxis) const
uint32_t numAutoMargins = 0;
const nsStyleSides& styleMargin = mFrame->StyleMargin()->mMargin;
for (uint32_t i = 0; i < eNumAxisEdges; i++) {
Side side = kAxisOrientationToSidesMap[aAxis][i];
mozilla::Side side = kAxisOrientationToSidesMap[aAxis][i];
if (styleMargin.GetUnit(side) == eStyleUnit_Auto) {
numAutoMargins++;
}
@ -1327,7 +1326,7 @@ public:
// axis we're tracking.
void EnterMargin(const nsMargin& aMargin)
{
Side side = kAxisOrientationToSidesMap[mAxis][eAxisEdge_Start];
mozilla::Side side = kAxisOrientationToSidesMap[mAxis][eAxisEdge_Start];
mPosition += MarginComponentForSide(aMargin, side);
}
@ -1335,7 +1334,7 @@ public:
// we're tracking.
void ExitMargin(const nsMargin& aMargin)
{
Side side = kAxisOrientationToSidesMap[mAxis][eAxisEdge_End];
mozilla::Side side = kAxisOrientationToSidesMap[mAxis][eAxisEdge_End];
mPosition += MarginComponentForSide(aMargin, side);
}
@ -2093,7 +2092,7 @@ MainAxisPositionTracker::ResolveAutoMarginsInMainAxis(FlexItem& aItem)
if (mNumAutoMarginsInMainAxis) {
const nsStyleSides& styleMargin = aItem.Frame()->StyleMargin()->mMargin;
for (uint32_t i = 0; i < eNumAxisEdges; i++) {
Side side = kAxisOrientationToSidesMap[mAxis][i];
mozilla::Side side = kAxisOrientationToSidesMap[mAxis][i];
if (styleMargin.GetUnit(side) == eStyleUnit_Auto) {
// NOTE: This integer math will skew the distribution of remainder
// app-units towards the end, which is fine.
@ -2429,7 +2428,7 @@ SingleLineCrossAxisPositionTracker::
// Give each auto margin a share of the space.
const nsStyleSides& styleMargin = aItem.Frame()->StyleMargin()->mMargin;
for (uint32_t i = 0; i < eNumAxisEdges; i++) {
Side side = kAxisOrientationToSidesMap[mAxis][i];
mozilla::Side side = kAxisOrientationToSidesMap[mAxis][i];
if (styleMargin.GetUnit(side) == eStyleUnit_Auto) {
MOZ_ASSERT(aItem.GetMarginComponentForSide(side) == 0,
"Expecting auto margins to have value '0' before we "
@ -3113,7 +3112,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
// though.)
nscoord availableHeightForContent = aReflowState.AvailableHeight();
if (availableHeightForContent != NS_UNCONSTRAINEDSIZE &&
!(GetSkipSides() & (1 << NS_SIDE_TOP))) {
!GetSkipSides().Top()) {
availableHeightForContent -= aReflowState.ComputedPhysicalBorderPadding().top;
// (Don't let that push availableHeightForContent below zero, though):
availableHeightForContent = std::max(availableHeightForContent, 0);

View File

@ -952,52 +952,51 @@ nsIFrame::GetUsedPadding() const
return padding;
}
int
nsIFrame::Sides
nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return Sides();
}
// Convert the logical skip sides to physical sides using the frame's
// writing mode
WritingMode writingMode = GetWritingMode();
int logicalSkip = GetLogicalSkipSides(aReflowState);
int skip = 0;
LogicalSides logicalSkip = GetLogicalSkipSides(aReflowState);
Sides skip;
if (logicalSkip & LOGICAL_SIDE_B_START) {
if (logicalSkip.BStart()) {
if (writingMode.IsVertical()) {
skip |= 1 << (writingMode.IsVerticalLR() ? NS_SIDE_LEFT : NS_SIDE_RIGHT);
skip |= writingMode.IsVerticalLR() ? eSideBitsLeft : eSideBitsRight;
} else {
skip |= 1 << NS_SIDE_TOP;
skip |= eSideBitsTop;
}
}
if (logicalSkip & LOGICAL_SIDE_B_END) {
if (logicalSkip.BEnd()) {
if (writingMode.IsVertical()) {
skip |= 1 << (writingMode.IsVerticalLR() ? NS_SIDE_RIGHT : NS_SIDE_LEFT);
skip |= writingMode.IsVerticalLR() ? eSideBitsRight : eSideBitsLeft;
} else {
skip |= 1 << NS_SIDE_BOTTOM;
skip |= eSideBitsBottom;
}
}
if (logicalSkip & LOGICAL_SIDE_I_START) {
if (logicalSkip.IStart()) {
if (writingMode.IsVertical()) {
skip |= 1 << NS_SIDE_TOP;
skip |= eSideBitsTop;
} else {
skip |= 1 << (writingMode.IsBidiLTR() ? NS_SIDE_LEFT : NS_SIDE_RIGHT);
skip |= writingMode.IsBidiLTR() ? eSideBitsLeft : eSideBitsRight;
}
}
if (logicalSkip & LOGICAL_SIDE_I_END) {
if (logicalSkip.IEnd()) {
if (writingMode.IsVertical()) {
skip |= 1 << NS_SIDE_BOTTOM;
skip |= eSideBitsBottom;
} else {
skip |= 1 << (writingMode.IsBidiLTR() ? NS_SIDE_RIGHT : NS_SIDE_LEFT);
skip |= writingMode.IsBidiLTR() ? eSideBitsRight : eSideBitsLeft;
}
}
return skip;
}
@ -1143,7 +1142,7 @@ bool
nsIFrame::ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
Sides aSkipSides,
nscoord aRadii[8])
{
// Percentages are relative to whichever side they're on.
@ -1164,28 +1163,28 @@ nsIFrame::ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
}
}
if (aSkipSides & (1 << NS_SIDE_TOP)) {
if (aSkipSides.Top()) {
aRadii[NS_CORNER_TOP_LEFT_X] = 0;
aRadii[NS_CORNER_TOP_LEFT_Y] = 0;
aRadii[NS_CORNER_TOP_RIGHT_X] = 0;
aRadii[NS_CORNER_TOP_RIGHT_Y] = 0;
}
if (aSkipSides & (1 << NS_SIDE_RIGHT)) {
if (aSkipSides.Right()) {
aRadii[NS_CORNER_TOP_RIGHT_X] = 0;
aRadii[NS_CORNER_TOP_RIGHT_Y] = 0;
aRadii[NS_CORNER_BOTTOM_RIGHT_X] = 0;
aRadii[NS_CORNER_BOTTOM_RIGHT_Y] = 0;
}
if (aSkipSides & (1 << NS_SIDE_BOTTOM)) {
if (aSkipSides.Bottom()) {
aRadii[NS_CORNER_BOTTOM_RIGHT_X] = 0;
aRadii[NS_CORNER_BOTTOM_RIGHT_Y] = 0;
aRadii[NS_CORNER_BOTTOM_LEFT_X] = 0;
aRadii[NS_CORNER_BOTTOM_LEFT_Y] = 0;
}
if (aSkipSides & (1 << NS_SIDE_LEFT)) {
if (aSkipSides.Left()) {
aRadii[NS_CORNER_BOTTOM_LEFT_X] = 0;
aRadii[NS_CORNER_BOTTOM_LEFT_Y] = 0;
aRadii[NS_CORNER_TOP_LEFT_X] = 0;
@ -1246,7 +1245,7 @@ nsIFrame::OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets)
/* virtual */ bool
nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
int aSkipSides, nscoord aRadii[8]) const
Sides aSkipSides, nscoord aRadii[8]) const
{
if (IsThemed()) {
// When we're themed, the native theme code draws the border and

View File

@ -4338,7 +4338,7 @@ ReduceRadii(nscoord aXBorder, nscoord aYBorder,
bool
ScrollFrameHelper::GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
Sides aSkipSides,
nscoord aRadii[8]) const
{
if (!mOuter->nsContainerFrame::GetBorderRadii(aFrameSize, aBorderArea,

View File

@ -39,6 +39,7 @@ namespace mozilla {
class ScrollFrameHelper : public nsIReflowCallback {
public:
typedef nsIFrame::Sides Sides;
typedef mozilla::CSSIntPoint CSSIntPoint;
typedef mozilla::layout::ScrollbarActivity ScrollbarActivity;
@ -72,7 +73,7 @@ public:
bool aPositioned);
bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
int aSkipSides, nscoord aRadii[8]) const;
Sides aSkipSides, nscoord aRadii[8]) const;
// nsIReflowCallback
virtual bool ReflowFinished() MOZ_OVERRIDE;
@ -480,7 +481,7 @@ public:
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
Sides aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
}
@ -829,7 +830,7 @@ public:
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
Sides aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
}

View File

@ -408,6 +408,8 @@ public:
typedef mozilla::layout::FrameChildListIterator ChildListIterator;
typedef mozilla::layout::FrameChildListArrayIterator ChildListArrayIterator;
typedef mozilla::gfx::Matrix Matrix;
typedef mozilla::Sides Sides;
typedef mozilla::LogicalSides LogicalSides;
NS_DECL_QUERYFRAME_TARGET(nsIFrame)
@ -917,10 +919,10 @@ public:
* Return whether any radii are nonzero.
*/
static bool ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
nscoord aRadii[8]);
const nsSize& aFrameSize,
const nsSize& aBorderArea,
Sides aSkipSides,
nscoord aRadii[8]);
/*
* Given a set of border radii for one box (e.g., border box), convert
@ -946,7 +948,7 @@ public:
*/
virtual bool GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
Sides aSkipSides,
nscoord aRadii[8]) const;
bool GetBorderRadii(nscoord aRadii[8]) const;
@ -2303,8 +2305,10 @@ public:
bool ClearOverflowRects();
/**
* Determine whether borders should not be painted on certain sides of the
* frame.
* Determine whether borders, padding, margins etc should NOT be applied
* on certain sides of the frame.
* @see mozilla::Sides in gfx/2d/BaseMargin.h
* @see mozilla::LogicalSides in layout/generic/WritingModes.h
*
* @note (See also bug 743402, comment 11) GetSkipSides() checks to see
* if this frame has a previous or next continuation to determine
@ -2314,10 +2318,10 @@ public:
* passed in, indicating that it should be used to determine if sides
* should be skipped during reflow.
*/
int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const;
virtual int
Sides GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const;
virtual LogicalSides
GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const {
return 0;
return LogicalSides();
}
/**

View File

@ -1836,14 +1836,14 @@ nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
}
#endif
int
nsIFrame::LogicalSides
nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (nullptr != GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -118,7 +118,7 @@ public:
uint32_t aFlags = 0) const MOZ_OVERRIDE;
#endif
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
nsresult GetIntrinsicImageSize(nsSize& aSize);

View File

@ -880,15 +880,15 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext,
//////////////////////////////////////////////////////////////////////
int
nsIFrame::LogicalSides
nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (!IsFirst()) {
nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
if ((GetStateBits() & NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) ||
@ -922,7 +922,7 @@ nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
// a split should skip the "start" side. But figuring out which part of
// the split we are involves getting our first continuation, which might be
// expensive. So don't bother if we already have the relevant bits set.
if (skip != LOGICAL_SIDES_I_BOTH) {
if (skip != LogicalSides(LOGICAL_SIDES_I_BOTH)) {
// We're missing one of the skip bits, so check whether we need to set it.
// Only get the first continuation once, as an optimization.
nsIFrame* firstContinuation = FirstContinuation();

View File

@ -127,7 +127,7 @@ protected:
nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
void ReflowFrames(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,

View File

@ -235,19 +235,19 @@ nsSplittableFrame::GetEffectiveComputedBSize(const nsHTMLReflowState& aReflowSta
return std::max(0, bSize);
}
int
nsIFrame::LogicalSides
nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
return LOGICAL_SIDES_B_BOTH;
return LogicalSides(LOGICAL_SIDES_B_BOTH);
}
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -95,7 +95,7 @@ protected:
/**
* @see nsIFrame::GetLogicalSkipSides()
*/
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
#ifdef DEBUG
virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent) MOZ_OVERRIDE;

View File

@ -1964,7 +1964,7 @@ void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
{
// for visual debug
int skipSides = 0;
Sides skipSides;
nsPresContext* presContext = mFrame->PresContext();
nsStyleContext* styleContext = mFrame->StyleContext();
nsRect rect = mRect + ToReferenceFrame();

View File

@ -14,10 +14,11 @@
// XXX fold this into nsStyleContext and group by nsStyleXXX struct
// Indices into border/padding/margin arrays
#define NS_SIDE_TOP mozilla::css::eSideTop
#define NS_SIDE_RIGHT mozilla::css::eSideRight
#define NS_SIDE_BOTTOM mozilla::css::eSideBottom
#define NS_SIDE_LEFT mozilla::css::eSideLeft
namespace mozilla {
namespace css {
typedef mozilla::Side Side;
}
}
#define NS_FOR_CSS_SIDES(var_) for (mozilla::css::Side var_ = NS_SIDE_TOP; var_ <= NS_SIDE_LEFT; var_++)
static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {

View File

@ -201,11 +201,11 @@ public:
nscoord aSize,
bool aStart);
BCPixelSize GetCorner(mozilla::css::Side& aCornerOwner,
BCPixelSize GetCorner(mozilla::Side& aCornerOwner,
bool& aBevel) const;
void SetCorner(BCPixelSize aSubSize,
mozilla::css::Side aOwner,
mozilla::Side aOwner,
bool aBevel);
bool IsLeftStart() const;
@ -229,7 +229,7 @@ protected:
unsigned mTopOwner: 4; // owner of top border
unsigned mLeftStart: 1; // set if this is the start of a vertical border segment
unsigned mTopStart: 1; // set if this is the start of a horizontal border segment
unsigned mCornerSide: 2; // mozilla::css::Side of the owner of the upper left corner relative to the corner
unsigned mCornerSide: 2; // mozilla::Side of the owner of the upper left corner relative to the corner
unsigned mCornerBevel: 1; // is the corner beveled (only two segments, perpendicular, not dashed or dotted).
};
@ -449,16 +449,16 @@ inline void BCData::SetTopEdge(BCBorderOwner aOwner,
mTopStart = aStart;
}
inline BCPixelSize BCData::GetCorner(mozilla::css::Side& aOwnerSide,
inline BCPixelSize BCData::GetCorner(mozilla::Side& aOwnerSide,
bool& aBevel) const
{
aOwnerSide = mozilla::css::Side(mCornerSide);
aOwnerSide = mozilla::Side(mCornerSide);
aBevel = (bool)mCornerBevel;
return mCornerSubSize;
}
inline void BCData::SetCorner(BCPixelSize aSubSize,
mozilla::css::Side aOwnerSide,
mozilla::Side aOwnerSide,
bool aBevel)
{
mCornerSubSize = aSubSize;

View File

@ -728,7 +728,7 @@ nsTableCellMap::Dump(char* aString) const
printf("***** bottom borders *****\n");
nscoord size;
BCBorderOwner owner;
mozilla::css::Side side;
mozilla::Side side;
bool segStart;
bool bevel;
int32_t colIndex;
@ -970,7 +970,7 @@ nsTableCellMap::ResetTopStart(uint8_t aSide,
// top/left at that location. If the new location is at the right or bottom edge of the
// table, then store it one of the special arrays (right most borders, bottom most borders).
void
nsTableCellMap::SetBCBorderEdge(mozilla::css::Side aSide,
nsTableCellMap::SetBCBorderEdge(mozilla::Side aSide,
nsCellMap& aCellMap,
uint32_t aCellMapStart,
uint32_t aRowIndex,
@ -1070,7 +1070,7 @@ nsTableCellMap::SetBCBorderCorner(Corner aCorner,
uint32_t aCellMapStart,
uint32_t aRowIndex,
uint32_t aColIndex,
mozilla::css::Side aOwner,
mozilla::Side aOwner,
nscoord aSubSize,
bool aBevel,
bool aIsBottomRight)
@ -2584,7 +2584,7 @@ void nsCellMap::Dump(bool aIsBorderCollapse) const
if (aIsBorderCollapse) {
nscoord size;
BCBorderOwner owner;
mozilla::css::Side side;
mozilla::Side side;
bool segStart;
bool bevel;
for (int32_t i = 0; i <= 2; i++) {

View File

@ -204,7 +204,7 @@ public:
uint32_t aXPos,
bool aIsLowerRight = false);
void SetBCBorderEdge(mozilla::css::Side aEdge,
void SetBCBorderEdge(mozilla::Side aEdge,
nsCellMap& aCellMap,
uint32_t aCellMapStart,
uint32_t aYPos,
@ -219,7 +219,7 @@ public:
uint32_t aCellMapStart,
uint32_t aYPos,
uint32_t aXPos,
mozilla::css::Side aOwner,
mozilla::Side aOwner,
nscoord aSubSize,
bool aBevel,
bool aIsBottomRight = false);

View File

@ -545,15 +545,15 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
}
int
nsIFrame::LogicalSides
nsTableCellFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (nullptr != GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}
@ -1109,7 +1109,7 @@ nsBCTableCellFrame::GetUsedBorder() const
/* virtual */ bool
nsBCTableCellFrame::GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
Sides aSkipSides,
nscoord aRadii[8]) const
{
NS_FOR_CSS_HALF_CORNERS(corner) {

View File

@ -222,7 +222,7 @@ public:
virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
protected:
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState= nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState= nullptr) const MOZ_OVERRIDE;
/**
* GetBorderOverflow says how far the cell's own borders extend
@ -301,7 +301,7 @@ public:
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
virtual bool GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
Sides aSkipSides,
nscoord aRadii[8]) const MOZ_OVERRIDE;
// Get the *inner half of the border only*, in twips.

View File

@ -328,15 +328,15 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID,
}
}
int
nsIFrame::LogicalSides
nsTableColGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (nullptr != GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -207,7 +207,7 @@ protected:
void InsertColsReflow(int32_t aColIndex,
const nsFrameList::Slice& aCols);
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
// data members
int32_t mColCount;

View File

@ -1383,7 +1383,7 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
if (StyleVisibility()->IsVisible()) {
if (!IsBorderCollapse()) {
int skipSides = GetSkipSides();
Sides skipSides = GetSkipSides();
nsRect rect(aPt, mRect.Size());
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
aDirtyRect, rect, mStyleContext, skipSides);
@ -1397,15 +1397,15 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
}
}
int
nsIFrame::LogicalSides
nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
// frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
// account for pagination
if (nullptr != GetPrevInFlow()) {

View File

@ -580,7 +580,7 @@ protected:
void InitChildReflowState(nsHTMLReflowState& aReflowState);
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
public:
bool IsRowInserted() const;

View File

@ -589,15 +589,15 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
}
int
nsIFrame::LogicalSides
nsTableRowFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (nullptr != GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -244,7 +244,7 @@ protected:
bool aBorderCollapse,
nsTableCellReflowState& aReflowState);
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
// row-specific methods

View File

@ -253,15 +253,15 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aLists, item, DisplayRows);
}
int
nsIFrame::LogicalSides
nsTableRowGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
return LogicalSides();
}
int skip = 0;
LogicalSides skip;
if (nullptr != GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -334,7 +334,7 @@ protected:
bool aBorderCollapse,
nsHTMLReflowState& aReflowState);
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
void PlaceChild(nsPresContext* aPresContext,
nsRowGroupReflowState& aReflowState,

View File

@ -123,7 +123,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsGroupBoxFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect) {
int skipSides = 0;
Sides skipSides;
const nsStyleBorder* borderStyleData = StyleBorder();
const nsMargin& border = borderStyleData->GetComputedBorder();
nscoord yoff = 0;