mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Added failure check for call to nsStyleData::GetBorder()
This commit is contained in:
parent
aeb0cab209
commit
2ba05e9bf2
@ -1803,7 +1803,9 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
|
||||
nsRect paddingArea(aBorderArea);
|
||||
nsMargin border;
|
||||
|
||||
aSpacing.GetBorder(border);
|
||||
if (!aSpacing.GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
paddingArea.Deflate(border);
|
||||
|
||||
// The actual dirty rect is the intersection of the padding area and the
|
||||
|
@ -235,7 +235,9 @@ nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
||||
if (mOuterFocusStyle) {
|
||||
// get the outer focus border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mOuterFocusStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(focusBorderAndPadding);
|
||||
if (!spacing->GetBorderPadding(focusBorderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return focusBorderAndPadding;
|
||||
@ -249,7 +251,9 @@ nsButtonFrameRenderer::GetButtonBorderAndPadding()
|
||||
|
||||
nsMargin borderAndPadding(0,0,0,0);
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)context ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(borderAndPadding);
|
||||
if (!spacing->GetBorderPadding(borderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
return borderAndPadding;
|
||||
}
|
||||
|
||||
@ -278,7 +282,9 @@ nsButtonFrameRenderer::GetButtonInnerFocusBorderAndPadding()
|
||||
if (mInnerFocusStyle) {
|
||||
// get the outer focus border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mInnerFocusStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(innerFocusBorderAndPadding);
|
||||
if (!spacing->GetBorderPadding(innerFocusBorderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return innerFocusBorderAndPadding;
|
||||
@ -292,7 +298,9 @@ nsButtonFrameRenderer::GetButtonOutlineBorderAndPadding()
|
||||
if (mOutlineStyle) {
|
||||
// get the outline border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mOutlineStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(borderAndPadding);
|
||||
if (!spacing->GetBorderPadding(borderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return borderAndPadding;
|
||||
|
@ -200,7 +200,9 @@ nsFieldSetFrame::Paint(nsIPresContext& aPresContext,
|
||||
nscoord onePixel = NSIntPixelsToTwips(1, p2t);
|
||||
|
||||
nsMargin border;
|
||||
spacing->GetBorder(border);
|
||||
if (!spacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
|
||||
nscoord yoff = 0;
|
||||
|
||||
|
@ -324,6 +324,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
||||
// Subtract out the borders
|
||||
nsMargin border;
|
||||
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
border.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
//XXX: Should just get the border.top when needed instead of
|
||||
|
@ -244,7 +244,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
nsMargin border;
|
||||
|
||||
// Get the border values
|
||||
aReflowState.mStyleSpacing->GetBorder(border);
|
||||
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
rv = aKidFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow);
|
||||
|
@ -327,7 +327,9 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
||||
nsMargin border;
|
||||
nsFrameState kidState;
|
||||
|
||||
kidReflowState.mStyleSpacing->GetBorder(border);
|
||||
if (!kidReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
kidFrame->GetFrameState(&kidState);
|
||||
|
||||
// First check the combined area
|
||||
|
@ -425,7 +425,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext,
|
||||
const nsStyleSpacing* blockSpacing;
|
||||
|
||||
cbrs->frame->GetStyleData(eStyleStruct_Spacing, (const nsStyleStruct*&)blockSpacing);
|
||||
blockSpacing->GetBorder(blockBorder);
|
||||
if (!blockSpacing->GetBorder(blockBorder)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
placeholderOffset.x -= blockBorder.top;
|
||||
placeholderOffset.y -= blockBorder.bottom;
|
||||
}
|
||||
|
@ -244,7 +244,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
nsMargin border;
|
||||
|
||||
// Get the border values
|
||||
aReflowState.mStyleSpacing->GetBorder(border);
|
||||
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
rv = aKidFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow);
|
||||
|
@ -327,7 +327,9 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
||||
nsMargin border;
|
||||
nsFrameState kidState;
|
||||
|
||||
kidReflowState.mStyleSpacing->GetBorder(border);
|
||||
if (!kidReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
kidFrame->GetFrameState(&kidState);
|
||||
|
||||
// First check the combined area
|
||||
|
@ -425,7 +425,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext,
|
||||
const nsStyleSpacing* blockSpacing;
|
||||
|
||||
cbrs->frame->GetStyleData(eStyleStruct_Spacing, (const nsStyleStruct*&)blockSpacing);
|
||||
blockSpacing->GetBorder(blockBorder);
|
||||
if (!blockSpacing->GetBorder(blockBorder)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
placeholderOffset.x -= blockBorder.top;
|
||||
placeholderOffset.y -= blockBorder.bottom;
|
||||
}
|
||||
|
@ -310,6 +310,7 @@ nsScrollFrame::CreateScrollingView(nsIPresContext& aPresContext)
|
||||
// Set the scrolling view's insets to whatever our border is
|
||||
nsMargin border;
|
||||
if (!spacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
border.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
scrollingView->SetControlInsets(border);
|
||||
@ -503,6 +504,7 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
|
||||
// Calculate the amount of space needed for borders
|
||||
nsMargin border;
|
||||
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
border.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,9 @@ nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
||||
if (mOuterFocusStyle) {
|
||||
// get the outer focus border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mOuterFocusStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(focusBorderAndPadding);
|
||||
if (!spacing->GetBorderPadding(focusBorderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return focusBorderAndPadding;
|
||||
@ -249,7 +251,9 @@ nsButtonFrameRenderer::GetButtonBorderAndPadding()
|
||||
|
||||
nsMargin borderAndPadding(0,0,0,0);
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)context ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(borderAndPadding);
|
||||
if (!spacing->GetBorderPadding(borderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
return borderAndPadding;
|
||||
}
|
||||
|
||||
@ -278,7 +282,9 @@ nsButtonFrameRenderer::GetButtonInnerFocusBorderAndPadding()
|
||||
if (mInnerFocusStyle) {
|
||||
// get the outer focus border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mInnerFocusStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(innerFocusBorderAndPadding);
|
||||
if (!spacing->GetBorderPadding(innerFocusBorderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return innerFocusBorderAndPadding;
|
||||
@ -292,7 +298,9 @@ nsButtonFrameRenderer::GetButtonOutlineBorderAndPadding()
|
||||
if (mOutlineStyle) {
|
||||
// get the outline border and padding
|
||||
const nsStyleSpacing* spacing = (const nsStyleSpacing*)mOutlineStyle ->GetStyleData(eStyleStruct_Spacing);
|
||||
spacing->GetBorderPadding(borderAndPadding);
|
||||
if (!spacing->GetBorderPadding(borderAndPadding)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
}
|
||||
|
||||
return borderAndPadding;
|
||||
|
@ -200,7 +200,9 @@ nsFieldSetFrame::Paint(nsIPresContext& aPresContext,
|
||||
nscoord onePixel = NSIntPixelsToTwips(1, p2t);
|
||||
|
||||
nsMargin border;
|
||||
spacing->GetBorder(border);
|
||||
if (!spacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
|
||||
nscoord yoff = 0;
|
||||
|
||||
|
@ -324,6 +324,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
||||
// Subtract out the borders
|
||||
nsMargin border;
|
||||
if (!aReflowState.mStyleSpacing->GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
border.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
//XXX: Should just get the border.top when needed instead of
|
||||
|
@ -1803,7 +1803,9 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
|
||||
nsRect paddingArea(aBorderArea);
|
||||
nsMargin border;
|
||||
|
||||
aSpacing.GetBorder(border);
|
||||
if (!aSpacing.GetBorder(border)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage border");
|
||||
}
|
||||
paddingArea.Deflate(border);
|
||||
|
||||
// The actual dirty rect is the intersection of the padding area and the
|
||||
|
Loading…
Reference in New Issue
Block a user