gecko-dev/layout/svg
Nicholas Nethercote 489c83b1dd Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel.
gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.

This patch removes the implicit constructor and replaces it with an explicit
conversion function:

  gfxRect ThebesRect(const IntRect&)

This is the obvious outcome of removing the constructor.

But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!

So this patch also changes these conversion. It moves this existing function:

  Rect ToRect(const IntRect&)

from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.

The rest of the patch deals with fall-out from these changes. The call sites
change as follows:

- IntRect-to-gfxRect conversions:
  - old: implicit
  - new: ThebesRect()

- IntRect-to-Rect conversions:
  - old: ToRect()
  - new: IntRectToRect()

--HG--
extra : rebase_source : e4e4c2ad10b36ecad4d57d1630158f3374e403be
2015-11-11 14:23:14 -08:00
..
crashtests Bug 1222812 - add a null check in case there is no old style. r=dholbert 2015-11-11 21:31:32 +00:00
resources/content
tests
moz.build Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron 2015-11-04 20:57:35 +11:00
nsCSSFilterInstance.cpp Bug 1223215 (part 2) - Remove a ToSize() call. r=jwatt. 2015-11-08 20:23:54 -08:00
nsCSSFilterInstance.h
nsFilterInstance.cpp Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel. 2015-11-11 14:23:14 -08:00
nsFilterInstance.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsISVGChildFrame.h
nsISVGSVGFrame.h
nsSVGAFrame.cpp
nsSVGClipPathFrame.cpp Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGClipPathFrame.h Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGContainerFrame.cpp
nsSVGContainerFrame.h
nsSVGEffects.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGEffects.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGFilterFrame.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGFilterFrame.h
nsSVGFilterInstance.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGFilterInstance.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGFilterPaintCallback.h
nsSVGForeignObjectFrame.cpp
nsSVGForeignObjectFrame.h
nsSVGGenericContainerFrame.cpp
nsSVGGenericContainerFrame.h
nsSVGGFrame.cpp
nsSVGGFrame.h
nsSVGGradientFrame.cpp Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron 2015-11-04 20:57:35 +11:00
nsSVGGradientFrame.h Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron 2015-11-04 20:57:35 +11:00
nsSVGImageFrame.cpp Bug 1210560 - Part 2: Convert some simple users to use PushGroupForBlendBack. r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGInnerSVGFrame.cpp
nsSVGInnerSVGFrame.h
nsSVGIntegrationUtils.cpp Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGIntegrationUtils.h Bug 1220923 - Make nsIntRegion a typedef for IntRegionTyped<UnknownUnits>. r=nical 2015-11-04 11:49:49 -05:00
nsSVGMarkerFrame.cpp
nsSVGMarkerFrame.h Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
nsSVGMaskFrame.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGMaskFrame.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGMaskFrameNEON.cpp
nsSVGMaskFrameNEON.h
nsSVGOuterSVGFrame.cpp Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
nsSVGOuterSVGFrame.h
nsSVGPaintServerFrame.h Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron 2015-11-04 20:57:35 +11:00
nsSVGPathGeometryFrame.cpp Bug 1222812 - add a null check in case there is no old style. r=dholbert 2015-11-11 21:31:32 +00:00
nsSVGPathGeometryFrame.h
nsSVGPatternFrame.cpp Bug 1210560 - Part 2: Convert some simple users to use PushGroupForBlendBack. r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGPatternFrame.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGStopFrame.cpp
nsSVGSwitchFrame.cpp
nsSVGUseFrame.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsSVGUtils.cpp Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt r=jrmuizel 2015-11-11 16:15:39 +01:00
nsSVGUtils.h Bug 1207741 - Remove gfxIntSize. r=nical. 2015-09-23 11:49:05 -07:00
svg.css Bug 803562 - force -moz-appearance: none on foreignObject elements. r=dbaron 2015-11-02 19:17:48 +00:00
SVGFEContainerFrame.cpp
SVGFEImageFrame.cpp
SVGFELeafFrame.cpp
SVGFEUnstyledLeafFrame.cpp
SVGImageContext.h
SVGTextFrame.cpp Bug 1210560 - Part 2: Convert some simple users to use PushGroupForBlendBack. r=jrmuizel 2015-11-11 16:15:39 +01:00
SVGTextFrame.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
SVGViewFrame.cpp