Skip to content

Commit

Permalink
Backed out 3 changesets (bug 923512) for mochitest-2 bustage on a CLO…
Browse files Browse the repository at this point in the history
…SED TREE

Backed out changeset f8720d81b74f (bug 923512)
Backed out changeset f431232084b7 (bug 923512)
Backed out changeset dff51863663c (bug 923512)
  • Loading branch information
KWierso committed Aug 6, 2014
1 parent e71c465 commit 2c1bb01
Show file tree
Hide file tree
Showing 30 changed files with 173 additions and 455 deletions.
4 changes: 2 additions & 2 deletions content/base/public/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class Element : public FragmentOrElement
int32_t ScrollTop()
{
nsIScrollableFrame* sf = GetScrollFrame();
return sf ? sf->GetScrollPositionCSSPixels().y.value : 0;
return sf ? sf->GetScrollPositionCSSPixels().y : 0;
}
void SetScrollTop(int32_t aScrollTop)
{
Expand All @@ -741,7 +741,7 @@ class Element : public FragmentOrElement
int32_t ScrollLeft()
{
nsIScrollableFrame* sf = GetScrollFrame();
return sf ? sf->GetScrollPositionCSSPixels().x.value : 0;
return sf ? sf->GetScrollPositionCSSPixels().x : 0;
}
void SetScrollLeft(int32_t aScrollLeft)
{
Expand Down
4 changes: 2 additions & 2 deletions dom/canvas/CanvasRenderingContext2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ CanvasRenderingContext2D::ArcTo(double x1, double y1, double x2,
}

// Check for colinearity
dir = (p2.x - p1.x).value * (p0.y - p1.y).value + (p2.y - p1.y).value * (p1.x - p0.x).value;
dir = (p2.x - p1.x) * (p0.y - p1.y) + (p2.y - p1.y) * (p1.x - p0.x);
if (dir == 0) {
LineTo(p1.x, p1.y);
return;
Expand Down Expand Up @@ -4500,7 +4500,7 @@ CanvasPath::ArcTo(double x1, double y1, double x2, double y2, double radius,
}

// Check for colinearity
dir = (p2.x - p1.x).value * (p0.y - p1.y).value + (p2.y - p1.y).value * (p1.x - p0.x).value;
dir = (p2.x - p1.x) * (p0.y - p1.y) + (p2.y - p1.y) * (p1.x - p0.x);
if (dir == 0) {
LineTo(p1.x, p1.y);
return;
Expand Down
2 changes: 1 addition & 1 deletion dom/canvas/CanvasRenderingContext2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ typedef HTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement
// The spec says we should not draw shadows if the operator is OVER.
// If it's over and the alpha value is zero, nothing needs to be drawn.
return NS_GET_A(state.shadowColor) != 0 &&
(state.shadowBlur != 0.f || state.shadowOffset.x != 0.f || state.shadowOffset.y != 0.f);
(state.shadowBlur != 0 || state.shadowOffset.x != 0 || state.shadowOffset.y != 0);
}

mozilla::gfx::CompositionOp UsedOperation()
Expand Down
5 changes: 2 additions & 3 deletions dom/events/EventStateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1595,9 +1595,8 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
// fire drag gesture if mouse has moved enough
LayoutDeviceIntPoint pt = aEvent->refPoint +
LayoutDeviceIntPoint::FromUntyped(aEvent->widget->WidgetToScreenOffset());
LayoutDeviceIntPoint distance = pt - mGestureDownPoint;
if (Abs(distance.x.value) > SafeCast<uint32_t>(pixelThresholdX) ||
Abs(distance.y.value) > SafeCast<uint32_t>(pixelThresholdY)) {
if (DeprecatedAbs(pt.x - mGestureDownPoint.x) > pixelThresholdX ||
DeprecatedAbs(pt.y - mGestureDownPoint.y) > pixelThresholdY) {
if (Prefs::ClickHoldContextMenu()) {
// stop the click-hold before we fire off the drag gesture, in case
// it takes a long time
Expand Down
110 changes: 0 additions & 110 deletions gfx/2d/BaseCoord.h

This file was deleted.

12 changes: 6 additions & 6 deletions gfx/2d/BasePoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ namespace gfx {
* Sub parameter, and only use that subclass. This allows methods to safely
* cast 'this' to 'Sub*'.
*/
template <class T, class Sub, class Coord = T>
template <class T, class Sub>
struct BasePoint {
Coord x, y;
T x, y;

// Constructors
MOZ_CONSTEXPR BasePoint() : x(0), y(0) {}
MOZ_CONSTEXPR BasePoint(Coord aX, Coord aY) : x(aX), y(aY) {}
MOZ_CONSTEXPR BasePoint(T aX, T aY) : x(aX), y(aY) {}

void MoveTo(T aX, T aY) { x = aX; y = aY; }
void MoveBy(T aDx, T aDy) { x += aDx; y += aDy; }
Expand Down Expand Up @@ -67,15 +67,15 @@ struct BasePoint {
}

T Length() const {
return hypot(x.value, y.value);
return hypot(x, y);
}

// Round() is *not* rounding to nearest integer if the values are negative.
// They are always rounding as floor(n + 0.5).
// See https://bugzilla.mozilla.org/show_bug.cgi?id=410748#c14
Sub& Round() {
x = Coord(floor(T(x) + T(0.5)));
y = Coord(floor(T(y) + T(0.5)));
x = static_cast<T>(floor(x + 0.5));
y = static_cast<T>(floor(y + 0.5));
return *static_cast<Sub*>(this);
}

Expand Down
4 changes: 2 additions & 2 deletions gfx/2d/Blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ static const Float GAUSSIAN_SCALE_FACTOR = Float((3 * sqrt(2 * M_PI) / 4) * 1.5)
IntSize
AlphaBoxBlur::CalculateBlurRadius(const Point& aStd)
{
IntSize size(static_cast<int32_t>(floor(aStd.x * GAUSSIAN_SCALE_FACTOR + 0.5f)),
static_cast<int32_t>(floor(aStd.y * GAUSSIAN_SCALE_FACTOR + 0.5f)));
IntSize size(static_cast<int32_t>(floor(aStd.x * GAUSSIAN_SCALE_FACTOR + 0.5)),
static_cast<int32_t>(floor(aStd.y * GAUSSIAN_SCALE_FACTOR + 0.5)));

return size;
}
Expand Down
115 changes: 0 additions & 115 deletions gfx/2d/Coord.h

This file was deleted.

2 changes: 1 addition & 1 deletion gfx/2d/DrawTargetD2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2599,7 +2599,7 @@ DrawTargetD2D::SetupEffectForRadialGradient(const RadialGradientPattern *aPatter
mPrivateData->mEffect->GetVariableByName("DeviceSpaceToUserSpace")->
AsMatrix()->SetMatrix(matrix);

float A = dc.x.value * dc.x.value + dc.y.value * dc.y.value - dr * dr;
float A = dc.x * dc.x + dc.y * dc.y - dr * dr;

uint32_t offset = 0;
switch (stops->mStopCollection->GetExtendMode()) {
Expand Down
4 changes: 2 additions & 2 deletions gfx/2d/DrawTargetTiled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ DrawTargetTiled::Init(const TileSet& aTiles)
mTiles[i].mTileOrigin.x + mTiles[i].mDrawTarget->GetSize().width);
uint32_t newYMost = max(mRect.YMost(),
mTiles[i].mTileOrigin.y + mTiles[i].mDrawTarget->GetSize().height);
mRect.x = min(mRect.x, mTiles[i].mTileOrigin.x.value);
mRect.y = min(mRect.y, mTiles[i].mTileOrigin.y.value);
mRect.x = min(mRect.x, mTiles[i].mTileOrigin.x);
mRect.y = min(mRect.y, mTiles[i].mTileOrigin.y);
mRect.width = newXMost - mRect.x;
mRect.height = newYMost - mRect.y;
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/2d/HelpersD2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static inline bool IsPatternSupportedByD2D(const Pattern &aPattern)

Point diff = pat->mCenter2 - pat->mCenter1;

if (sqrt(diff.x.value * diff.x.value + diff.y.value * diff.y.value) >= pat->mRadius2) {
if (sqrt(diff.x * diff.x + diff.y * diff.y) >= pat->mRadius2) {
// Inner point lies outside the circle.
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions gfx/2d/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ FlattenedPath::QuadraticBezierTo(const Point &aCP1,
const Point &aCP2)
{
MOZ_ASSERT(!mCalculatedLength);
// We need to elevate the degree of this quadratic B�zier to cubic, so we're
// We need to elevate the degree of this quadratic Bézier to cubic, so we're
// going to add an intermediate control point, and recompute control point 1.
// The first and last control points remain the same.
// This formula can be found on http://fontforge.sourceforge.net/bezier.html
Expand Down Expand Up @@ -250,7 +250,7 @@ FlattenBezierCurveSegment(const BezierControlPoints &aControlPoints,
Point cp21 = currentCP.mCP2 - currentCP.mCP3;
Point cp31 = currentCP.mCP3 - currentCP.mCP1;

Float s3 = (cp31.x.value * cp21.y.value - cp31.y.value * cp21.x.value) / hypotf(cp21.x, cp21.y);
Float s3 = (cp31.x * cp21.y - cp31.y * cp21.x) / hypotf(cp21.x, cp21.y);

t = 2 * Float(sqrt(aTolerance / (3. * abs(s3))));

Expand All @@ -276,7 +276,7 @@ FindInflectionApproximationRange(BezierControlPoints aControlPoints,
Point cp21 = aControlPoints.mCP2 - aControlPoints.mCP1;
Point cp41 = aControlPoints.mCP4 - aControlPoints.mCP1;

if (cp21.x == 0.f && cp21.y == 0.f) {
if (cp21.x == 0 && cp21.y == 0) {
// In this case s3 becomes lim[n->0] (cp41.x * n) / n - (cp41.y * n) / n = cp41.x - cp41.y.

// Use the absolute value so that Min and Max will correspond with the
Expand All @@ -286,7 +286,7 @@ FindInflectionApproximationRange(BezierControlPoints aControlPoints,
return;
}

Float s3 = (cp41.x.value * cp21.y.value - cp41.y.value * cp21.x.value) / hypotf(cp21.x, cp21.y);
Float s3 = (cp41.x * cp21.y - cp41.y * cp21.x) / hypotf(cp21.x, cp21.y);

if (s3 == 0) {
// This means within the precision we have it can be approximated
Expand Down
Loading

0 comments on commit 2c1bb01

Please sign in to comment.