#43457 split nsStyleSpacing into 4 smaller structures: nsStyleBorder, nsStylePadding, nsStyleMargin, nsStyleOutline. Review=attinasi. Pending Approval: buster.

This commit is contained in:
pierre%netscape.com 2001-01-20 22:50:28 +00:00
Родитель 62bf433a35
Коммит 60e1cb503e
1 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -413,8 +413,8 @@ nsScrollFrame::CreateScrollingView(nsIPresContext* aPresContext)
mStyleContext->GetStyleData(eStyleStruct_Position);
const nsStyleColor* color = (const nsStyleColor*)
mStyleContext->GetStyleData(eStyleStruct_Color);
const nsStyleSpacing* spacing = (const nsStyleSpacing*)
mStyleContext->GetStyleData(eStyleStruct_Spacing);
const nsStyleBorder* borderStyle = (const nsStyleBorder*)
mStyleContext->GetStyleData(eStyleStruct_Border);
const nsStyleDisplay* display = (const nsStyleDisplay*)
mStyleContext->GetStyleData(eStyleStruct_Display);
@ -503,7 +503,7 @@ nsScrollFrame::CreateScrollingView(nsIPresContext* aPresContext)
// Set the scrolling view's insets to whatever our border is
nsMargin border;
if (!spacing->GetBorder(border)) {
if (!borderStyle->GetBorder(border)) {
NS_NOTYETIMPLEMENTED("percentage border");
border.SizeTo(0, 0, 0, 0);
}
@ -675,7 +675,7 @@ nsScrollFrame::Reflow(nsIPresContext* aPresContext,
// Calculate the amount of space needed for borders
nsMargin border;
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
if (!aReflowState.mStyleBorder->GetBorder(border)) {
NS_NOTYETIMPLEMENTED("percentage border");
border.SizeTo(0, 0, 0, 0);
}
@ -947,14 +947,17 @@ nsScrollFrame::Paint(nsIPresContext* aPresContext,
if (display->IsVisible()) {
// Paint our border only (no background)
const nsStyleSpacing* spacing = (const nsStyleSpacing*)
mStyleContext->GetStyleData(eStyleStruct_Spacing);
const nsStyleBorder* border = (const nsStyleBorder*)
mStyleContext->GetStyleData(eStyleStruct_Border);
const nsStyleOutline* outline = (const nsStyleOutline*)
mStyleContext->GetStyleData(eStyleStruct_Outline);
nsRect rect(0, 0, mRect.width, mRect.height);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, 0);
aDirtyRect, rect, *border, mStyleContext, 0);
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, 0);
aDirtyRect, rect, *border, *outline, mStyleContext, 0);
}
}