зеркало из https://github.com/mozilla/gecko-dev.git
Bug 859021 - Fix remaining MSVC build warnings and remove the MSVC exemption for FAIL_ON_WARNINGS in content/svg/content/src. r=dholbert
This commit is contained in:
Родитель
07c194820d
Коммит
a0aa442cbe
|
@ -454,7 +454,7 @@ DOMSVGPathSegList::RemoveItem(uint32_t aIndex,
|
|||
InternalList().mData.RemoveElementsAt(internalIndex, 1 + argCount);
|
||||
mItems.RemoveElementAt(aIndex);
|
||||
|
||||
UpdateListIndicesFromIndex(aIndex, -(argCount + 1));
|
||||
UpdateListIndicesFromIndex(aIndex, 0 - (argCount + 1));
|
||||
|
||||
Element()->DidChangePathSegList(emptyOrOldValue);
|
||||
if (AttrIsAnimating()) {
|
||||
|
@ -529,7 +529,7 @@ DOMSVGPathSegList::
|
|||
}
|
||||
animVal->mItems.RemoveElementAt(aIndex);
|
||||
|
||||
animVal->UpdateListIndicesFromIndex(aIndex, -(1 + aArgCountForItem));
|
||||
animVal->UpdateListIndicesFromIndex(aIndex, 0 - (1 + aArgCountForItem));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -12,9 +12,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
LIBRARY_NAME = gkcontentsvg_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
ifndef _MSC_VER
|
||||
FAIL_ON_WARNINGS = 1
|
||||
endif # !_MSC_VER
|
||||
|
||||
CPPSRCS = \
|
||||
DOMSVGAnimatedLengthList.cpp \
|
||||
|
@ -158,6 +156,7 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "mozilla/dom/SVGAElement.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "mozilla/dom/SVGAElementBinding.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsSVGString.h"
|
||||
|
@ -47,7 +46,7 @@ NS_IMPL_ISUPPORTS_INHERITED5(SVGAElement, SVGAElementBase,
|
|||
|
||||
SVGAElement::SVGAElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
: SVGAElementBase(aNodeInfo),
|
||||
Link(this)
|
||||
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -260,13 +260,13 @@ SVGContentUtils::AngleBisect(float a1, float a2)
|
|||
{
|
||||
float delta = fmod(a2 - a1, static_cast<float>(2*M_PI));
|
||||
if (delta < 0) {
|
||||
delta += 2*M_PI;
|
||||
delta += static_cast<float>(2*M_PI);
|
||||
}
|
||||
/* delta is now the angle from a1 around to a2, in the range [0, 2*M_PI) */
|
||||
float r = a1 + delta/2;
|
||||
if (delta >= M_PI) {
|
||||
/* the arc from a2 to a1 is smaller, so use the ray on that side */
|
||||
r += M_PI;
|
||||
r += static_cast<float>(M_PI);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -98,15 +98,15 @@ inline static float GetAbsUnitsPerAbsUnit(uint8_t aUnits, uint8_t aPerUnit)
|
|||
|
||||
float CSSAbsoluteUnitConversionFactors[5][5] = { // columns: cm, mm, in, pt, pc
|
||||
// cm per...:
|
||||
{ 1.0, 0.1, 2.54, 0.035277777777777778, 0.42333333333333333 },
|
||||
{ 1.0f, 0.1f, 2.54f, 0.035277777777777778f, 0.42333333333333333f },
|
||||
// mm per...:
|
||||
{ 10.0, 1.0, 25.4, 0.35277777777777778, 4.2333333333333333 },
|
||||
{ 10.0f, 1.0f, 25.4f, 0.35277777777777778f, 4.2333333333333333f },
|
||||
// in per...:
|
||||
{ 0.39370078740157481, 0.039370078740157481, 1.0, 0.013888888888888889, 0.16666666666666667 },
|
||||
{ 0.39370078740157481f, 0.039370078740157481f, 1.0f, 0.013888888888888889f, 0.16666666666666667f },
|
||||
// pt per...:
|
||||
{ 28.346456692913386, 2.8346456692913386, 72.0, 1.0, 12.0 },
|
||||
{ 28.346456692913386f, 2.8346456692913386f, 72.0f, 1.0f, 12.0f },
|
||||
// pc per...:
|
||||
{ 2.3622047244094489, 0.23622047244094489, 6.0, 0.083333333333333333, 1.0 }
|
||||
{ 2.3622047244094489f, 0.23622047244094489f, 6.0f, 0.083333333333333333f, 1.0f }
|
||||
};
|
||||
|
||||
// First absolute unit is SVG_LENGTHTYPE_CM = 6
|
||||
|
|
|
@ -719,13 +719,13 @@ GenerateNormal(float *N, const uint8_t *data, int32_t stride,
|
|||
{ { -1, -2, -1}, { 1, 2, 1}, { 0, 0, 0} },
|
||||
{ { -1, -2, 0}, { 1, 2, 0}, { 0, 0, 0} } } };
|
||||
static const float FACTORx[3][3] =
|
||||
{ { 2.0 / 3.0, 1.0 / 3.0, 2.0 / 3.0 },
|
||||
{ { 2.0f / 3.0f, 1.0f / 3.0f, 2.0f / 3.0f },
|
||||
{ 1.0 / 2.0, 1.0 / 4.0, 1.0 / 2.0 },
|
||||
{ 2.0 / 3.0, 1.0 / 3.0, 2.0 / 3.0 } };
|
||||
{ 2.0f / 3.0f, 1.0f / 3.0f, 2.0f / 3.0f } };
|
||||
static const float FACTORy[3][3] =
|
||||
{ { 2.0 / 3.0, 1.0 / 2.0, 2.0 / 3.0 },
|
||||
{ 1.0 / 3.0, 1.0 / 4.0, 1.0 / 3.0 },
|
||||
{ 2.0 / 3.0, 1.0 / 2.0, 2.0 / 3.0 } };
|
||||
{ { 2.0f / 3.0f, 1.0 / 2.0, 2.0f / 3.0f },
|
||||
{ 1.0f / 3.0f, 1.0 / 4.0, 1.0f / 3.0f },
|
||||
{ 2.0f / 3.0f, 1.0 / 2.0, 2.0f / 3.0f } };
|
||||
|
||||
// degenerate cases
|
||||
if (surfaceWidth == 1 || surfaceHeight == 1) {
|
||||
|
@ -820,7 +820,7 @@ nsSVGFELightingElement::Filter(nsSVGFilterInstance *instance,
|
|||
if (!distantLight && !pointLight && !spotLight)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
const float radPerDeg = M_PI/180.0;
|
||||
const float radPerDeg = static_cast<float>(M_PI/180.0);
|
||||
|
||||
float L[3];
|
||||
if (distantLight) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче