зеркало из https://github.com/mozilla/gecko-dev.git
#43457 split nsStyleSpacing into 4 smaller structures: nsStyleBorder, nsStylePadding, nsStyleMargin, nsStyleOutline. Review=attinasi. Pending Approval: buster.
This commit is contained in:
Родитель
62bf433a35
Коммит
60e1cb503e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче