зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1542646 Part 9 - Fix else after return r=dholbert
This commit is contained in:
Родитель
52b651e168
Коммит
5f62f5b014
|
@ -65,7 +65,8 @@ void DOMSVGAngle::SetValueInSpecifiedUnits(float aValue, ErrorResult& rv) {
|
|||
if (mType == AnimValue) {
|
||||
rv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
|
||||
return;
|
||||
} else if (mType == BaseValue) {
|
||||
}
|
||||
if (mType == BaseValue) {
|
||||
mVal->SetBaseValueInSpecifiedUnits(aValue, mSVGElement);
|
||||
} else {
|
||||
mVal->mBaseVal = aValue;
|
||||
|
|
|
@ -212,8 +212,9 @@ float DOMSVGLength::GetValue(ErrorResult& aRv) {
|
|||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
}
|
||||
return value;
|
||||
} else if (mUnit == SVGLength_Binding::SVG_LENGTHTYPE_NUMBER ||
|
||||
mUnit == SVGLength_Binding::SVG_LENGTHTYPE_PX) {
|
||||
}
|
||||
if (mUnit == SVGLength_Binding::SVG_LENGTHTYPE_NUMBER ||
|
||||
mUnit == SVGLength_Binding::SVG_LENGTHTYPE_PX) {
|
||||
return mValue;
|
||||
}
|
||||
// else [SVGWG issue] Can't convert this length's value to user units
|
||||
|
|
|
@ -217,9 +217,8 @@ float SVGSVGElement::GetCurrentTimeAsFloat() {
|
|||
if (root) {
|
||||
double fCurrentTimeMs = double(root->GetCurrentTimeAsSMILTime());
|
||||
return (float)(fCurrentTimeMs / PR_MSEC_PER_SEC);
|
||||
} else {
|
||||
return 0.f;
|
||||
}
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
void SVGSVGElement::SetCurrentTime(float seconds) {
|
||||
|
@ -641,7 +640,8 @@ const SVGAnimatedViewBox& SVGSVGElement::GetViewBoxInternal() const {
|
|||
|
||||
if (viewElement && viewElement->mViewBox.HasRect()) {
|
||||
return viewElement->mViewBox;
|
||||
} else if (mSVGView && mSVGView->mViewBox.HasRect()) {
|
||||
}
|
||||
if (mSVGView && mSVGView->mViewBox.HasRect()) {
|
||||
return mSVGView->mViewBox;
|
||||
}
|
||||
|
||||
|
|
|
@ -207,30 +207,29 @@ already_AddRefed<SVGIRect> SVGTransformableElement::GetBBox(
|
|||
this, ToRect(nsSVGUtils::GetBBox(
|
||||
frame, nsSVGUtils::eBBoxIncludeFillGeometry |
|
||||
nsSVGUtils::eUseUserSpaceOfUseElement)));
|
||||
} else {
|
||||
uint32_t flags = 0;
|
||||
if (aOptions.mFill) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeFill;
|
||||
}
|
||||
if (aOptions.mStroke) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeStroke;
|
||||
}
|
||||
if (aOptions.mMarkers) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeMarkers;
|
||||
}
|
||||
if (aOptions.mClipped) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeClipped;
|
||||
}
|
||||
if (flags == 0) {
|
||||
return NS_NewSVGRect(this, 0, 0, 0, 0);
|
||||
}
|
||||
if (flags == nsSVGUtils::eBBoxIncludeMarkers ||
|
||||
flags == nsSVGUtils::eBBoxIncludeClipped) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeFill;
|
||||
}
|
||||
flags |= nsSVGUtils::eUseUserSpaceOfUseElement;
|
||||
return NS_NewSVGRect(this, ToRect(nsSVGUtils::GetBBox(frame, flags)));
|
||||
}
|
||||
uint32_t flags = 0;
|
||||
if (aOptions.mFill) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeFill;
|
||||
}
|
||||
if (aOptions.mStroke) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeStroke;
|
||||
}
|
||||
if (aOptions.mMarkers) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeMarkers;
|
||||
}
|
||||
if (aOptions.mClipped) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeClipped;
|
||||
}
|
||||
if (flags == 0) {
|
||||
return NS_NewSVGRect(this, 0, 0, 0, 0);
|
||||
}
|
||||
if (flags == nsSVGUtils::eBBoxIncludeMarkers ||
|
||||
flags == nsSVGUtils::eBBoxIncludeClipped) {
|
||||
flags |= nsSVGUtils::eBBoxIncludeFill;
|
||||
}
|
||||
flags |= nsSVGUtils::eUseUserSpaceOfUseElement;
|
||||
return NS_NewSVGRect(this, ToRect(nsSVGUtils::GetBBox(frame, flags)));
|
||||
}
|
||||
|
||||
already_AddRefed<SVGMatrix> SVGTransformableElement::GetCTM() {
|
||||
|
|
|
@ -20,7 +20,8 @@ using namespace mozilla::gfx;
|
|||
static float ClampFactor(float aFactor) {
|
||||
if (aFactor > 1) {
|
||||
return 1;
|
||||
} else if (aFactor < 0) {
|
||||
}
|
||||
if (aFactor < 0) {
|
||||
MOZ_ASSERT_UNREACHABLE("A negative value should not have been parsed.");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,8 @@ nsresult nsSVGImageFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
nsChangeHint_InvalidateRenderingObservers);
|
||||
nsSVGUtils::ScheduleReflowSVG(this);
|
||||
return NS_OK;
|
||||
} else if (aAttribute == nsGkAtoms::preserveAspectRatio) {
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::preserveAspectRatio) {
|
||||
// We don't paint the content of the image using display lists, therefore
|
||||
// we have to invalidate for this children-only transform changes since
|
||||
// there is no layer tree to notice that the transform changed and
|
||||
|
|
Загрузка…
Ссылка в новой задаче