зеркало из https://github.com/mozilla/gecko-dev.git
sync to nsStyleSpacing api changes
This commit is contained in:
Родитель
b1e4b9dddd
Коммит
a74065d6fc
|
@ -650,10 +650,11 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext,
|
|||
nsIFrame* aForFrame,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aBounds,
|
||||
const nsStyleBorder& aStyle,
|
||||
const nsStyleSpacing& aStyle,
|
||||
PRIntn aSkipSides)
|
||||
{
|
||||
const nsMargin& border = aStyle.mSize;
|
||||
nsMargin border;
|
||||
aStyle.CalcBorderFor(aForFrame, border);
|
||||
if ((0 == border.left) && (0 == border.right) &&
|
||||
(0 == border.top) && (0 == border.bottom)) {
|
||||
// Empty border area
|
||||
|
@ -666,34 +667,34 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext,
|
|||
|
||||
//see if any sides are dotted or dashed
|
||||
for (PRIntn cnt = 0; cnt < 4; cnt++) {
|
||||
if ((aStyle.mStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) ||
|
||||
(aStyle.mStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) {
|
||||
if ((aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) ||
|
||||
(aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cnt < 4) {
|
||||
// Draw the dashed/dotted lines first
|
||||
DrawDashedSides(cnt, aRenderingContext, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside,
|
||||
DrawDashedSides(cnt, aRenderingContext, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside,
|
||||
aSkipSides);
|
||||
}
|
||||
|
||||
// Draw all the other sides
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_TOP))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_TOP, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_TOP, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_LEFT))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_LEFT, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_LEFT, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_BOTTOM))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_BOTTOM, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_BOTTOM, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_RIGHT))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_RIGHT, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_RIGHT, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
nsIFrame* aForFrame,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aBounds,
|
||||
const nsStyleBorder& aStyle,
|
||||
const nsStyleSpacing& aStyle,
|
||||
PRIntn aSkipSides);
|
||||
|
||||
/**
|
||||
|
|
|
@ -650,10 +650,11 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext,
|
|||
nsIFrame* aForFrame,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aBounds,
|
||||
const nsStyleBorder& aStyle,
|
||||
const nsStyleSpacing& aStyle,
|
||||
PRIntn aSkipSides)
|
||||
{
|
||||
const nsMargin& border = aStyle.mSize;
|
||||
nsMargin border;
|
||||
aStyle.CalcBorderFor(aForFrame, border);
|
||||
if ((0 == border.left) && (0 == border.right) &&
|
||||
(0 == border.top) && (0 == border.bottom)) {
|
||||
// Empty border area
|
||||
|
@ -666,34 +667,34 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext,
|
|||
|
||||
//see if any sides are dotted or dashed
|
||||
for (PRIntn cnt = 0; cnt < 4; cnt++) {
|
||||
if ((aStyle.mStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) ||
|
||||
(aStyle.mStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) {
|
||||
if ((aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) ||
|
||||
(aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cnt < 4) {
|
||||
// Draw the dashed/dotted lines first
|
||||
DrawDashedSides(cnt, aRenderingContext, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside,
|
||||
DrawDashedSides(cnt, aRenderingContext, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside,
|
||||
aSkipSides);
|
||||
}
|
||||
|
||||
// Draw all the other sides
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_TOP))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_TOP, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_TOP, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_LEFT))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_LEFT, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_LEFT, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_BOTTOM))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_BOTTOM, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_BOTTOM, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
if (0 == (aSkipSides & (1<<NS_SIDE_RIGHT))) {
|
||||
DrawSide(aRenderingContext, NS_SIDE_RIGHT, aStyle.mStyle,
|
||||
aStyle.mColor, inside, outside);
|
||||
DrawSide(aRenderingContext, NS_SIDE_RIGHT, aStyle.mBorderStyle,
|
||||
aStyle.mBorderColor, inside, outside);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
nsIFrame* aForFrame,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aBounds,
|
||||
const nsStyleBorder& aStyle,
|
||||
const nsStyleSpacing& aStyle,
|
||||
PRIntn aSkipSides);
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче