зеркало из https://github.com/mozilla/pjs.git
Changed Paint() to use the parent frame's color style struct. We can't use our
color style struct because we're a pseudo frame and so the style system forces us to have a transparent background
This commit is contained in:
Родитель
417a329fa3
Коммит
b19ff5f472
|
@ -1058,19 +1058,18 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext,
|
||||||
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||||
|
|
||||||
if (disp->mVisible) {
|
if (disp->mVisible) {
|
||||||
const nsStyleColor* myColor =
|
const nsStyleSpacing* spacing =
|
||||||
(const nsStyleColor*)mStyleContext->GetStyleData(eStyleStruct_Color);
|
|
||||||
const nsStyleSpacing* mySpacing =
|
|
||||||
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
|
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
|
||||||
NS_ASSERTION(nsnull != myColor, "null style color");
|
|
||||||
NS_ASSERTION(nsnull != mySpacing, "null style spacing");
|
// Use our parent's color style structure, because we're a pseudo frame
|
||||||
if (nsnull!=mySpacing)
|
// and that the style system marks us as having a transparent background
|
||||||
{
|
const nsStyleColor* color;
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
mGeometricParent->GetStyleData(eStyleStruct_Color, (nsStyleStruct*&)color);
|
||||||
aDirtyRect, mRect, *myColor);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
||||||
aDirtyRect, mRect, *mySpacing, 0);
|
aDirtyRect, mRect, *color);
|
||||||
}
|
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, mRect, *spacing, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for debug...
|
// for debug...
|
||||||
|
|
|
@ -1058,19 +1058,18 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext,
|
||||||
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||||
|
|
||||||
if (disp->mVisible) {
|
if (disp->mVisible) {
|
||||||
const nsStyleColor* myColor =
|
const nsStyleSpacing* spacing =
|
||||||
(const nsStyleColor*)mStyleContext->GetStyleData(eStyleStruct_Color);
|
|
||||||
const nsStyleSpacing* mySpacing =
|
|
||||||
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
|
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
|
||||||
NS_ASSERTION(nsnull != myColor, "null style color");
|
|
||||||
NS_ASSERTION(nsnull != mySpacing, "null style spacing");
|
// Use our parent's color style structure, because we're a pseudo frame
|
||||||
if (nsnull!=mySpacing)
|
// and that the style system marks us as having a transparent background
|
||||||
{
|
const nsStyleColor* color;
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
mGeometricParent->GetStyleData(eStyleStruct_Color, (nsStyleStruct*&)color);
|
||||||
aDirtyRect, mRect, *myColor);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
||||||
aDirtyRect, mRect, *mySpacing, 0);
|
aDirtyRect, mRect, *color);
|
||||||
}
|
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, mRect, *spacing, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for debug...
|
// for debug...
|
||||||
|
|
Загрузка…
Ссылка в новой задаче