mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Remove nsStyleBorder::GetActualBorder, since it now does the same thing as nsStyleBorder::GetComputedBorder. (Bug 713643, patch 3) r=bzbarsky
This commit is contained in:
parent
72fec78c49
commit
9e7a3546cf
@ -1363,7 +1363,7 @@ nsCSSRendering::PaintBackground(nsPresContext* aPresContext,
|
||||
static bool
|
||||
IsOpaqueBorderEdge(const nsStyleBorder& aBorder, mozilla::css::Side aSide)
|
||||
{
|
||||
if (aBorder.GetActualBorder().Side(aSide) == 0)
|
||||
if (aBorder.GetComputedBorder().Side(aSide) == 0)
|
||||
return true;
|
||||
switch (aBorder.GetBorderStyle(aSide)) {
|
||||
case NS_STYLE_BORDER_STYLE_SOLID:
|
||||
@ -2605,7 +2605,7 @@ DrawBorderImage(nsPresContext* aPresContext,
|
||||
value = imgDimension;
|
||||
slice.Side(s) = NS_lround(value);
|
||||
|
||||
nsMargin borderWidths(aStyleBorder.GetActualBorder());
|
||||
nsMargin borderWidths(aStyleBorder.GetComputedBorder());
|
||||
coord = aStyleBorder.mBorderImageWidth.Get(s);
|
||||
switch (coord.GetUnit()) {
|
||||
case eStyleUnit_Coord: // absolute dimension
|
||||
|
@ -276,7 +276,7 @@ nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
||||
if (!mOuterFocusStyle->GetStylePadding()->GetPadding(result)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage padding");
|
||||
}
|
||||
result += mOuterFocusStyle->GetStyleBorder()->GetActualBorder();
|
||||
result += mOuterFocusStyle->GetStyleBorder()->GetComputedBorder();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -315,7 +315,7 @@ nsButtonFrameRenderer::GetButtonInnerFocusBorderAndPadding()
|
||||
if (!mInnerFocusStyle->GetStylePadding()->GetPadding(result)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage padding");
|
||||
}
|
||||
result += mInnerFocusStyle->GetStyleBorder()->GetActualBorder();
|
||||
result += mInnerFocusStyle->GetStyleBorder()->GetComputedBorder();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -145,7 +145,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// clips to our padding box for <input>s but not <button>s, unless
|
||||
// they have non-visible overflow..
|
||||
if (IsInput() || GetStyleDisplay()->mOverflowX != NS_STYLE_OVERFLOW_VISIBLE) {
|
||||
nsMargin border = GetStyleBorder()->GetActualBorder();
|
||||
nsMargin border = GetStyleBorder()->GetComputedBorder();
|
||||
nsRect rect(aBuilder->ToReferenceFrame(this), GetSize());
|
||||
rect.Deflate(border);
|
||||
nscoord radii[8];
|
||||
|
@ -372,7 +372,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
|
||||
nsresult rv;
|
||||
// Get the border values
|
||||
const nsMargin& border = aReflowState.mStyleBorder->GetActualBorder();
|
||||
const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder();
|
||||
|
||||
nscoord availWidth = aContainingBlockWidth;
|
||||
if (availWidth == -1) {
|
||||
|
@ -733,8 +733,8 @@ nsFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
|
||||
const nsStyleBorder* oldBorder = aOldStyleContext->PeekStyleBorder();
|
||||
if (oldBorder) {
|
||||
oldValue = oldBorder->GetActualBorder();
|
||||
newValue = GetStyleBorder()->GetActualBorder();
|
||||
oldValue = oldBorder->GetComputedBorder();
|
||||
newValue = GetStyleBorder()->GetComputedBorder();
|
||||
if (oldValue != newValue &&
|
||||
!props.Get(UsedBorderProperty())) {
|
||||
props.Set(UsedBorderProperty(), new nsMargin(oldValue));
|
||||
@ -745,9 +745,10 @@ nsFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
imgIRequest *oldBorderImage = aOldStyleContext
|
||||
? aOldStyleContext->GetStyleBorder()->GetBorderImage()
|
||||
: nsnull;
|
||||
// FIXME (Bug 759996): The following is no longer true.
|
||||
// For border-images, we can't be as conservative (we need to set the
|
||||
// new loaders if there has been any change) since the CalcDifference
|
||||
// call depended on the result of GetActualBorder() and that result
|
||||
// call depended on the result of GetComputedBorder() and that result
|
||||
// depends on whether the image has loaded, start the image load now
|
||||
// so that we'll get notified when it completes loading and can do a
|
||||
// restyle. Otherwise, the image might finish loading from the
|
||||
@ -846,7 +847,7 @@ nsIFrame::GetUsedBorder() const
|
||||
if (b) {
|
||||
border = *b;
|
||||
} else {
|
||||
border = GetStyleBorder()->GetActualBorder();
|
||||
border = GetStyleBorder()->GetComputedBorder();
|
||||
}
|
||||
return border;
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ nsHTMLReflowState::CalculateHorizBorderPaddingMargin(
|
||||
nscoord* aInsideBoxSizing,
|
||||
nscoord* aOutsideBoxSizing)
|
||||
{
|
||||
const nsMargin& border = mStyleBorder->GetActualBorder();
|
||||
const nsMargin& border = mStyleBorder->GetComputedBorder();
|
||||
nsMargin padding, margin;
|
||||
|
||||
// See if the style system can provide us the padding directly
|
||||
@ -2001,7 +2001,7 @@ nsCSSOffsetState::InitOffsets(nscoord aContainingBlockWidth,
|
||||
mComputedBorderPadding = *aBorder;
|
||||
}
|
||||
else {
|
||||
mComputedBorderPadding = frame->GetStyleBorder()->GetActualBorder();
|
||||
mComputedBorderPadding = frame->GetStyleBorder()->GetComputedBorder();
|
||||
}
|
||||
mComputedBorderPadding += mComputedPadding;
|
||||
|
||||
|
@ -509,9 +509,9 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
|
||||
// Note that differences in mBorder don't affect rendering (which should only
|
||||
// use mComputedBorder), so don't need to be tested for here.
|
||||
// XXXbz we should be able to return a more specific change hint for
|
||||
// at least GetActualBorder() differences...
|
||||
// at least GetComputedBorder() differences...
|
||||
if (mTwipsPerPixel != aOther.mTwipsPerPixel ||
|
||||
GetActualBorder() != aOther.GetActualBorder() ||
|
||||
GetComputedBorder() != aOther.GetComputedBorder() ||
|
||||
mFloatEdge != aOther.mFloatEdge ||
|
||||
mBorderImageOutset != aOther.mBorderImageOutset ||
|
||||
(shadowDifference & nsChangeHint_ReflowFrame))
|
||||
|
@ -775,12 +775,6 @@ struct nsStyleBorder {
|
||||
mComputedBorder.Side(aSide) = roundedWidth;
|
||||
}
|
||||
|
||||
// Returns the computed border.
|
||||
inline const nsMargin& GetActualBorder() const
|
||||
{
|
||||
return mComputedBorder;
|
||||
}
|
||||
|
||||
// Get the computed border (plus rounding). This does consider the
|
||||
// effects of 'border-style: none', but does not consider
|
||||
// 'border-image'.
|
||||
@ -800,7 +794,7 @@ struct nsStyleBorder {
|
||||
// value is rounded to the nearest device pixel by NS_ROUND_BORDER_TO_PIXELS.
|
||||
nscoord GetActualBorderWidth(mozilla::css::Side aSide) const
|
||||
{
|
||||
return GetActualBorder().Side(aSide);
|
||||
return GetComputedBorder().Side(aSide);
|
||||
}
|
||||
|
||||
PRUint8 GetBorderStyle(mozilla::css::Side aSide) const
|
||||
|
@ -1008,7 +1008,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsBCTableCellFrame)
|
||||
nsMargin*
|
||||
nsTableCellFrame::GetBorderWidth(nsMargin& aBorder) const
|
||||
{
|
||||
aBorder = GetStyleBorder()->GetActualBorder();
|
||||
aBorder = GetStyleBorder()->GetComputedBorder();
|
||||
return &aBorder;
|
||||
}
|
||||
|
||||
|
@ -2406,7 +2406,7 @@ void GetSeparateModelBorderPadding(const nsHTMLReflowState* aReflowState,
|
||||
// mComputedBorderPadding or we don't and then we get the padding
|
||||
// wrong!
|
||||
const nsStyleBorder* border = aStyleContext.GetStyleBorder();
|
||||
aBorderPadding = border->GetActualBorder();
|
||||
aBorderPadding = border->GetComputedBorder();
|
||||
if (aReflowState) {
|
||||
aBorderPadding += aReflowState->mComputedPadding;
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ nsBox::GetBorder(nsMargin& aMargin)
|
||||
}
|
||||
}
|
||||
|
||||
aMargin = GetStyleBorder()->GetActualBorder();
|
||||
aMargin = GetStyleBorder()->GetComputedBorder();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ nsGroupBoxFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
|
||||
nsPoint aPt, const nsRect& aDirtyRect) {
|
||||
PRIntn skipSides = 0;
|
||||
const nsStyleBorder* borderStyleData = GetStyleBorder();
|
||||
const nsMargin& border = borderStyleData->GetActualBorder();
|
||||
const nsMargin& border = borderStyleData->GetComputedBorder();
|
||||
nscoord yoff = 0;
|
||||
nsPresContext* presContext = PresContext();
|
||||
|
||||
|
@ -671,7 +671,7 @@ nsListBoxBodyFrame::ComputeIntrinsicWidth(nsBoxLayoutState& aBoxLayoutState)
|
||||
|
||||
if (styleContext->GetStylePadding()->GetPadding(margin))
|
||||
width += margin.LeftRight();
|
||||
width += styleContext->GetStyleBorder()->GetActualBorder().LeftRight();
|
||||
width += styleContext->GetStyleBorder()->GetComputedBorder().LeftRight();
|
||||
if (styleContext->GetStyleMargin()->GetMargin(margin))
|
||||
width += margin.LeftRight();
|
||||
|
||||
|
@ -143,7 +143,7 @@ GetBorderPadding(nsStyleContext* aContext, nsMargin& aMargin)
|
||||
if (!aContext->GetStylePadding()->GetPadding(aMargin)) {
|
||||
NS_NOTYETIMPLEMENTED("percentage padding");
|
||||
}
|
||||
aMargin += aContext->GetStyleBorder()->GetActualBorder();
|
||||
aMargin += aContext->GetStyleBorder()->GetComputedBorder();
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user