Commit Graph

74 Commits

Author SHA1 Message Date
Bas Schouten
f83e6fd87c Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt r=jrmuizel 2015-11-11 16:15:39 +01:00
Nathan Froyd
e4e2da55c9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nathan Froyd
5254890206 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Nicholas Nethercote
0c9936d9d3 Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
Matt Woodrow
eba3e78ca6 Bug 1205087 - Make nsSVGIntegrationUtils paint frame continuations manually since combining them meant that our reference frame wasn't an ancestor of all painted frames. r=roc 2015-09-24 18:26:34 -04:00
Nicholas Nethercote
f7e8a9e813 Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.
2015-09-23 11:49:05 -07:00
Ehsan Akhgari
5cccea6f0f Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Andrea Marchesini
5a32f7fa5a Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Jonathan Watt
da19355486 Bug 1091321, part 7 - Convert nsSVGFilterPaintCallback and related code from nsRenderingContext to gfxContext. r=longsonr 2014-10-31 20:08:54 +00:00
Jonathan Watt
27ab0a8ad9 Bug 1091321, part 6 - Convert nsSVGUtils::PaintFrameWithEffects and related code from nsRenderingContext to gfxContext. r=longsonr 2014-10-31 20:08:54 +00:00
Jonathan Watt
79fb6f75d1 Bug 1091321, part 3 - Convert nsFilterInstance::PaintFilteredFrame and related code from nsRenderingContext to gfxContext. r=longsonr 2014-10-31 20:08:54 +00:00
Jonathan Watt
0f53ed4ee5 Bug 1091321, part 1 - Convert nsSVGClipPathFrame::ApplyClipOrPaintClipMask and related code from nsRenderingContext to gfxContext. r=longsonr 2014-10-31 20:08:53 +00:00
Jonathan Watt
8d978a8274 Bug 651021 - Make nsRenderingContext a stack class. r=jrmuizel 2014-10-31 20:08:49 +00:00
Jonathan Watt
d266467576 Bug 1086708 - Rename the snapping variant of NSRectToRect to NSRectToSnappedRect. r=mattwoodrow 2014-10-22 12:29:06 +01:00
Max Vujovic
309beb718d Bug 1083241 - Call gfx->Paint in PaintFrameWithEffects when there is blending. r=roc 2014-10-17 11:37:54 -07:00
Jonathan Watt
9f1b24df01 Bug 1085167, part 2 - Get rid of nsRenderingContext's DeviceContext and any need for it to know about app-units-per-device-pixel. r=mattwoodrow
--HG--
extra : rebase_source : d8fb804f03a1cc4635d6acd7f66f5f21962de6d3
2014-10-20 10:55:49 +01:00
Jonathan Watt
7ebfcab431 Bug 1085160 - Port the code that uses nsRenderingContext::IntersectClip() to Moz2D. r=mattwoodrow
--HG--
extra : rebase_source : 54226509a1b16efdc76f92f202cc2be07cf43ab4
2014-10-20 10:55:48 +01:00
Jonathan Watt
f193009b79 Bug 1073964 - Pass a const DrawTarget* through to nsSVGPaintServerFrame::GetPaintServerPattern so that it can create a pattern of the appropriate type. r=Bas 2014-09-29 14:15:19 +01:00
Dirk Schulze
574693bd9c Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Markus Stange
05fdbbaad2 Bug 1073103 - Rename ThebesLayer to PaintedLayer. r=roc
--HG--
rename : gfx/layers/basic/BasicThebesLayer.cpp => gfx/layers/basic/BasicPaintedLayer.cpp
rename : gfx/layers/basic/BasicThebesLayer.h => gfx/layers/basic/BasicPaintedLayer.h
rename : gfx/layers/client/ClientThebesLayer.cpp => gfx/layers/client/ClientPaintedLayer.cpp
rename : gfx/layers/client/ClientThebesLayer.h => gfx/layers/client/ClientPaintedLayer.h
rename : gfx/layers/client/ClientTiledThebesLayer.cpp => gfx/layers/client/ClientTiledPaintedLayer.cpp
rename : gfx/layers/client/ClientTiledThebesLayer.h => gfx/layers/client/ClientTiledPaintedLayer.h
rename : gfx/layers/composite/ThebesLayerComposite.cpp => gfx/layers/composite/PaintedLayerComposite.cpp
rename : gfx/layers/composite/ThebesLayerComposite.h => gfx/layers/composite/PaintedLayerComposite.h
rename : gfx/layers/d3d10/ThebesLayerD3D10.cpp => gfx/layers/d3d10/PaintedLayerD3D10.cpp
rename : gfx/layers/d3d10/ThebesLayerD3D10.h => gfx/layers/d3d10/PaintedLayerD3D10.h
rename : gfx/layers/d3d9/ThebesLayerD3D9.cpp => gfx/layers/d3d9/PaintedLayerD3D9.cpp
rename : gfx/layers/d3d9/ThebesLayerD3D9.h => gfx/layers/d3d9/PaintedLayerD3D9.h
2014-09-26 13:06:08 -04:00
Matt Woodrow
f46ede4015 Bug 1054838, part 2 - Remove callers of DrawTarget::Mask. r=Bas,jwatt 2014-09-12 08:20:12 +01:00
Jonathan Watt
7d7c2bb810 Bug 1064056, part 2 - Convert nsRenderingContext::Translate() consumers to use gfxContext::SetMatrix()/Multiply(). r=Bas 2014-09-11 07:48:10 +01:00
Jonathan Watt
bef1d04697 Bug 1064056, part 1 - Convert nsRenderingContext::AutoPushTranslation consumers to use gfxContext::SetMatrix()/Multiply(). r=Bas 2014-09-11 07:48:09 +01:00
Jonathan Watt
302df746ef Bug 1065127 - Avoid Matrix().Translate()/Scale()/Rotate() multiplication in lots of places. r=Bas 2014-09-10 14:26:12 +01:00
Carsten "Tomcat" Book
0495ac7e6b Backed out changeset e6b766d8a815 (bug 1065127) for bustage 2014-09-10 14:30:36 +02:00
Jonathan Watt
78718dbf93 Bug 1065127 - Avoid Matrix().Translate()/Scale()/Rotate() multiplication in lots of places. r=Bas
--HG--
extra : rebase_source : ef075258c31973c4943b9b3a9229685a9bb83917
2014-09-10 11:45:42 +01:00
Jonathan Watt
c2a6ecc0ec Bug 932771, part 3 - Make PaintSVG painting work by passing transforms down, rather than walking up the tree using GetCanvasTM. r=longsonr 2014-08-29 20:42:07 +01:00
Jonathan Watt
611f420f83 Bug 1052913 - Clean up some nsSVGClipPathFrame code and add some documentation to make it clearer. r=dholbert 2014-08-13 13:36:32 +01:00
Jonathan Watt
5b5a18e51d Bug 1049256, part 1 - Convert SVG hit-testing to act on an SVG user space point instead of calling nsSVGUtils::GetCanvasTM(). r=longsonr 2014-08-07 08:09:31 +01:00
Daniel Holbert
9a7ed6c756 (no bug) Drop end-of-line whitespace in SVG filter code. (whitespace-only, so DONTBUILD) 2014-07-31 17:37:35 -07:00
Jonathan Watt
777971eedc Bug 1025553, part 6 - Remove gfxMatrix::Multiply(). r=Bas 2014-07-11 08:07:07 +01:00
Jonathan Watt
b9a9b70e8d Bug 1025553, part 3 - Give gfxMatrix::Invert() the same semantics as Moz2D's Matrix::Invert(). r=Bas 2014-07-11 08:06:39 +01:00
Jonathan Watt
c357a2bd6b Bug 987194 - Convert SVG masking to Moz2D. r=mattwoodrow 2014-06-23 05:45:31 +01:00
Markus Stange
2d595cf6e4 Bug 1000382 - Don't simplify the invalidation region before calling nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects. r=roc
--HG--
extra : rebase_source : a0eb465b54735c13e7b1934c3f6379ef74fd3f35
2014-04-24 10:25:17 +02:00
Markus Stange
7cfec060c6 Bug 997735 - Use consistent offset both in nsSVGIntegrationUtils::PaintFramesWithEffects and in nsFilterInstance::GetUserSpaceToFrameSpaceInCSSPxTransform. r=roc 2014-04-23 11:47:54 +02:00
Markus Stange
185d706431 Bug 997735 - Rename nsSVGIntegrationUtils::GetOffsetToUserSpace to GetOffsetToBoundingBox. r=roc
There are three spaces that nsSVGIntegrationUtils needs to convert between. I'll call them "frame space", "bounding box frame space" and "user space".

"Bounding box frame space" has its origin at the top left of the union of a frame's border boxes over all continuations.

For SVG frames, "frame space" and "bounding box frame space" are the same because SVG frames don't have multiple continuations.

For non-SVG frames, "bounding box frame space" and "user space" are the same.

However, for SVG frames, "bounding box frame space" and "user space" are different! For example, for a <rect x="100" y="100">, the point 0,0 in frame space is at the rect's top left corner, but the point 0,0 in user space is 100,100 pixels away from the rect's corner.

nsSVGIntegrationUtils::GetOffsetToUserSpace took the non-SVG viewpoint, but it's misleading for SVG frames.
2014-04-23 11:47:31 +02:00
Daniel Holbert
727250afa8 Bug 991285 part 1: Consistently allocate nsRenderingContext instances on the heap. r=roc 2014-04-15 12:54:10 -07:00
Max Vujovic
9e4b8fc70d Bug 948265 - Split out rendering code from nsSVGFilterInstance into nsFilterInstance. r=roc
--HG--
rename : layout/svg/nsSVGFilterInstance.cpp => layout/svg/nsFilterInstance.cpp
rename : layout/svg/nsSVGFilterInstance.h => layout/svg/nsFilterInstance.h
2014-02-24 10:22:58 -05:00
Max Vujovic
04fbe6b40b Bug 948265 - Pass an nsStyleFilter chain instead of an nsSVGFilterFrame into nsSVGFilterInstance. r=roc 2014-02-24 10:22:58 -05:00
Arnaud Sourioux
02b48ee29a Bug 974687 - Part 2: Fix more than 80cols issues caused by MOZ_OVERRIDE annotation. r=dholbert 2014-02-24 09:41:56 -05:00
Arnaud Sourioux
94fd6d0fd6 Bug 974687 - Part 1: Add about 300 MOZ_OVERRIDE in layout/. r=dholbert 2014-02-24 09:41:56 -05:00
L. David Baron
c3109dc9e2 Bug 480888 patch 1: Rename ComputeOutlineAndEffectsRect to ComputeEffectsRect. r=roc 2014-02-14 21:29:12 -08:00
Max Vujovic
2b722685f9 Bug 948265 - [CSS Filters] Change nsSVGFilterProperty to track an nsStyleFilter chain instead of a single nsIURI and nsSVGFilterFrame. r=roc 2014-02-09 20:31:03 -08:00
Max Vujovic
c040ed0337 Bug 948265 - [CSS Filters] Make nsSVGIntegrationUtils and nsSVGUtils call nsSVGFilterInstance directly instead of through nsSVGFilterFrame. r=roc 2014-02-06 10:42:35 -08:00
Ryan VanderMeulen
c81970ba83 Backed out changeset d4251829067b (bug 948265) for bustage.
CLOSED TREE
2014-02-07 11:05:39 -05:00
Max Vujovic
e71610817d Bug 948265 - [CSS Filters] Make nsSVGIntegrationUtils and nsSVGUtils call nsSVGFilterInstance directly instead of through nsSVGFilterFrame. r=roc 2014-02-07 10:48:39 -05:00
L. David Baron
6d9425e5a1 Bug 91419 patch 9: Fix comments and debugging output referring to "special" frames. r=mats 2014-02-06 17:45:33 -08:00
L. David Baron
98ca7cd11c Bug 91419 patch 5: Rename everything with SpecialSibling to IBSplitSibling. r=mats 2014-02-06 17:45:31 -08:00
Nicholas Cameron
70c2b3fb45 Bug 700926. Change DrawPaintServer to DrawableFromPaintServer. r=roc 2014-01-31 16:36:42 +13:00
Benoit Jacob
28ff3ad25f Bug 959380 - 4/5 - Make gfxContentType a typed enum - r=jrmuizel
find . -type f | grep -v '\./obj' | grep -v '\.hg' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)GFX_CONTENT_\(COLOR\|ALPHA\|COLOR_ALPHA\|SENTINEL\)\($\|[^A-Za-z0-9_]\)/\1gfxContentType::\2\3/g'
2014-01-23 13:26:40 -05:00