зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1326209 part 1 - Make nsCSSRendering::DrawTableBorderSegment take nscolor for background color. r=dholbert
MozReview-Commit-ID: sSPtxzIf9H --HG-- extra : rebase_source : 7d0f60f14f63ddba840037e12637ab9b56b6a6fe
This commit is contained in:
Родитель
e8852fe6a8
Коммит
70cf8ed908
|
@ -4464,17 +4464,17 @@ GetDashInfo(nscoord aBorderLength,
|
|||
}
|
||||
|
||||
void
|
||||
nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
||||
uint8_t aBorderStyle,
|
||||
nscolor aBorderColor,
|
||||
const nsStyleBackground* aBGColor,
|
||||
const nsRect& aBorder,
|
||||
int32_t aAppUnitsPerDevPixel,
|
||||
int32_t aAppUnitsPerCSSPixel,
|
||||
uint8_t aStartBevelSide,
|
||||
nscoord aStartBevelOffset,
|
||||
uint8_t aEndBevelSide,
|
||||
nscoord aEndBevelOffset)
|
||||
nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
||||
uint8_t aBorderStyle,
|
||||
nscolor aBorderColor,
|
||||
nscolor aBGColor,
|
||||
const nsRect& aBorder,
|
||||
int32_t aAppUnitsPerDevPixel,
|
||||
int32_t aAppUnitsPerCSSPixel,
|
||||
uint8_t aStartBevelSide,
|
||||
nscoord aStartBevelOffset,
|
||||
uint8_t aEndBevelSide,
|
||||
nscoord aEndBevelOffset)
|
||||
{
|
||||
bool horizontal = ((eSideTop == aStartBevelSide) || (eSideBottom == aStartBevelSide));
|
||||
nscoord twipsPerPixel = NSIntPixelsToAppUnits(1, aAppUnitsPerCSSPixel);
|
||||
|
@ -4564,8 +4564,7 @@ nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
|||
// FIXME: In theory, this should use the visited-dependent
|
||||
// background color, but I don't care.
|
||||
nscolor bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove,
|
||||
aBGColor->mBackgroundColor,
|
||||
aBorderColor);
|
||||
aBGColor, aBorderColor);
|
||||
nsRect rect(aBorder);
|
||||
nscoord half;
|
||||
if (horizontal) { // top, bottom
|
||||
|
@ -4604,7 +4603,7 @@ nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
|||
// FIXME: In theory, this should use the visited-dependent
|
||||
// background color, but I don't care.
|
||||
bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove,
|
||||
aBGColor->mBackgroundColor, aBorderColor);
|
||||
aBGColor, aBorderColor);
|
||||
if (horizontal) {
|
||||
rect.y = rect.y + half;
|
||||
rect.height = aBorder.height - half;
|
||||
|
|
|
@ -714,17 +714,17 @@ struct nsCSSRendering {
|
|||
|
||||
// Draw a border segment in the table collapsing border model without
|
||||
// beveling corners
|
||||
static void DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
||||
uint8_t aBorderStyle,
|
||||
nscolor aBorderColor,
|
||||
const nsStyleBackground* aBGColor,
|
||||
const nsRect& aBorderRect,
|
||||
int32_t aAppUnitsPerDevPixel,
|
||||
int32_t aAppUnitsPerCSSPixel,
|
||||
uint8_t aStartBevelSide = 0,
|
||||
nscoord aStartBevelOffset = 0,
|
||||
uint8_t aEndBevelSide = 0,
|
||||
nscoord aEndBevelOffset = 0);
|
||||
static void DrawTableBorderSegment(DrawTarget& aDrawTarget,
|
||||
uint8_t aBorderStyle,
|
||||
nscolor aBorderColor,
|
||||
nscolor aBGColor,
|
||||
const nsRect& aBorderRect,
|
||||
int32_t aAppUnitsPerDevPixel,
|
||||
int32_t aAppUnitsPerCSSPixel,
|
||||
uint8_t aStartBevelSide = 0,
|
||||
nscoord aStartBevelOffset = 0,
|
||||
uint8_t aEndBevelSide = 0,
|
||||
nscoord aEndBevelOffset = 0);
|
||||
|
||||
// NOTE: pt, dirtyRect, lineSize, ascent, offset in the following
|
||||
// structs are non-rounded device pixels, not app units.
|
||||
|
|
|
@ -6362,7 +6362,7 @@ public:
|
|||
nsTableCellMap* mTableCellMap;
|
||||
nsCellMap* mCellMap;
|
||||
WritingMode mTableWM;
|
||||
const nsStyleBackground* mTableBgColor;
|
||||
nscolor mTableBgColor;
|
||||
nsTableFrame::RowGroupArray mRowGroups;
|
||||
|
||||
nsTableRowGroupFrame* mPrevRg;
|
||||
|
@ -6480,7 +6480,7 @@ BCPaintBorderIterator::BCPaintBorderIterator(nsTableFrame* aTable)
|
|||
|
||||
nsIFrame* bgFrame =
|
||||
nsCSSRendering::FindNonTransparentBackgroundFrame(aTable);
|
||||
mTableBgColor = bgFrame->StyleBackground();
|
||||
mTableBgColor = bgFrame->StyleBackground()->mBackgroundColor;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче