Граф коммитов

109 Коммитов

Автор SHA1 Сообщение Дата
longsonr eb0a735bca Bug 1517185 - Move nsSVGEnum to the mozilla namespace and rename it as SVGEnum r=jwatt
--HG--
rename : dom/svg/nsSVGEnum.cpp => dom/svg/SVGEnum.cpp
rename : dom/svg/nsSVGEnum.h => dom/svg/SVGEnum.h
extra : amend_source : faf1423f0eecafceae6ede115759d06fa061faf2
2019-01-02 18:24:11 +00:00
Daniel Holbert 44acfc60f7 Backed out changeset c796403f5a29 since it landed with wrong bug number
--HG--
rename : dom/svg/SVGEnum.cpp => dom/svg/nsSVGEnum.cpp
rename : dom/svg/SVGEnum.h => dom/svg/nsSVGEnum.h
2019-01-02 10:44:12 -08:00
longsonr 69a6be5b17 Bug 1517108 - Move nsSVGEnum to the mozilla namespace and rename it as SVGEnum r=jwatt
--HG--
rename : dom/svg/nsSVGEnum.cpp => dom/svg/SVGEnum.cpp
rename : dom/svg/nsSVGEnum.h => dom/svg/SVGEnum.h
2019-01-02 18:24:11 +00:00
longsonr 3d04ba9c9e Bug 1515187 - Part 4 Rename nsSVGElement to SVGElement and put it in the mozilla:dom namespace r=dholbert
--HG--
rename : dom/svg/nsSVGElement.cpp => dom/svg/SVGElement.cpp
rename : dom/svg/nsSVGElement.h => dom/svg/SVGElement.h
2018-12-21 08:58:14 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Robert Longson 728a3f36fc Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt 2018-02-18 15:53:13 +00:00
Jeff Muizelaar 167ea61674 Bug 1438631. Use a similar drawtarget when painting masks. r=mstange
Avoiding an offscreen drawtarget will avoid using Direct2D with webrender,
let us record the masking operation, and also give us OMTP.
2018-02-16 15:52:45 -05:00
Samathy Barratt d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt 0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00:00
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Jonathan Watt 341ea5e4f1 Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
Jonathan Watt 0e4feb75d3 Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr
--HG--
rename : layout/svg/nsSVGEffects.cpp => layout/svg/SVGObserverUtils.cpp
rename : layout/svg/nsSVGEffects.h => layout/svg/SVGObserverUtils.h
2017-08-30 14:14:46 +01:00
cku f1fd114ae6 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : 068eb69d634cfc5150d7cb864c366e719a025859
2017-09-04 14:04:17 +08:00
Phil Ringnalda e761d397b7 Backed out 3 changesets (bug 1396489) for unexpected assertion failures
Backed out changeset 75ffa3ed13d5 (bug 1396489)
Backed out changeset fc779b639aeb (bug 1396489)
Backed out changeset dcfd73044bba (bug 1396489)

MozReview-Commit-ID: DvGlDLZF2nO
2017-09-04 21:09:04 -07:00
cku afd9919b06 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : afd9cb051e35856070e3451215e4bba79396af7e
2017-09-04 14:04:17 +08:00
Bobby Holley a61ee7166e Bug 1394156 - Make static_casts of mContent use GetContent(). r=emilio
This was done with: perl -pi -e 's/\(mContent\)/\(GetContent\(\)\)/g' *.cpp

MozReview-Commit-ID: 7ugPKf5ypGw
2017-08-27 10:45:59 -07:00
Louis Chang 1a9594b12b Bug 1385745 Part 1 - Add BBoxFlags::eIncludeOnlyCurrentFrameForNonSVGElement to determine whether include all continuations while computing bbox of a html frame. r=cjku,heycam
MozReview-Commit-ID: Fx11LjhBcrM

--HG--
extra : rebase_source : 6a46553d77f940186d4e7ff2c744b1ccd19e3dad
2017-08-17 09:52:17 +08:00
Jeff Muizelaar cf6d4425f4 Bug 1359527. Fixup DrawTarget::IntoLuminance mismerge. r=mchang
This adds back the NEON code and fixes up a couple of other pieces
2017-06-09 10:57:44 -04:00
Mason Chang 1520cb158b Bug 1359527. Part 1 - Add DrawTarget::IntoLuminance r=jrmuizel 2017-06-02 11:13:36 -07:00
Jeff Muizelaar 783be16285 Bug 1367147. Draw alpha masks to A8 surfaces and use them directly. r=jwatt
This can keep things on the GPU and makes it better for recording surfaces.
2017-05-26 22:32:24 -04:00
cku 51288e6cfe Bug 1351440 - Part 3. Pass imgDrawingParams to nsSVGMaskFrame::GetMaskForMaskedFrame. r=jwatt
The reason of this change is the same as for Part 2, except this commit fixes
nsSVGMaskFrame::GetMaskForMaskedFrame rather than PaintSVG.

MozReview-Commit-ID: DS0eG6eKDgs
2017-05-18 22:03:45 +02:00
cku d85d3ab378 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF
2017-05-18 22:03:41 +02:00
Sebastian Hengst 41f1727bf4 Backed out changeset f3460d42d23c (bug 1351440) 2017-05-18 21:15:35 +02:00
Sebastian Hengst 635d32e534 Backed out changeset 3240cd94bf4b (bug 1351440) 2017-05-18 21:15:30 +02:00
cku 0fcc7571b7 Bug 1351440 - Part 3. Pass imgDrawingParams to nsSVGMaskFrame::GetMaskForMaskedFrame. r=jwatt
The reason of this change is the same as for Part 2, except this commit fixes
nsSVGMaskFrame::GetMaskForMaskedFrame rather than PaintSVG.

MozReview-Commit-ID: DS0eG6eKDgs

--HG--
extra : rebase_source : 696bf495edc98a390f49ff0638165724521460b1
extra : source : 95f38c2c8b57134504e7fbe03d1637866e3e65ba
2017-05-08 21:27:20 +08:00
cku eaa4406688 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF

--HG--
extra : rebase_source : 66c9a9e391c2f9e142575f42fd47b37334ec5752
extra : source : 97a08873177c0f18edffdb1b5589c77843a50553
2017-05-05 17:19:43 +08:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
cku 2d993f6812 Bug 1360343 - ensure maskSurface is not null before dereference, since it can be null because of OOM or gfx device reset. r=dvander
MozReview-Commit-ID: HX2qsWLZpMg

--HG--
extra : rebase_source : 046befc11151461a682842c31e2ce39247a5e1d8
2017-04-28 11:48:21 +08:00
cku 8abb48b629 Bug 877661 - Part 1. Pass decode flag down to GetMaskForMaskedFrame. r=tnikkel
MozReview-Commit-ID: 9KhIWp1rHzb

--HG--
extra : rebase_source : 8c3d3c95ba7ada05673ba637cd542f41e9ce9f90
2017-03-27 11:10:48 +08:00
cku 251e635682 Bug 1345853 - Part 2. If the transform matrix is singular, return DrawResult::SUCCESS, instead of DrawResult::BAD_ARGS r=tnikkel
According to bug 1345853 comment 5, tn said:
You probably want to return whatever was drawn there regardless of the
DrawResult. SVGMaskFrame has the same problem. Keep in mind that DrawResult is
only reporting on how drawing of any images went, not the drawing of anything
else. Also looking over the patches from bug 1258510 I see a couple places where
BAD_ARGS is returned if the transform matrix is singular. We would want to
return SUCCESS in that case I think, because we drew what we were instructed to
draw.

MozReview-Commit-ID: 5XcDuKQwXTJ

--HG--
extra : rebase_source : 5c558d469148e0cb3cfe9365aed1a4a65c572532
2017-03-16 12:06:36 +08:00
cku 148bb081ca Bug 1345853 - Part 1. Pass DrawResult from nsSVGPatternFrame::PaintPattern back to nsDisplaySVGGeometry::Paint. r=mstange,tnikkel
I did many change in many files in this patch. But the goal is pretty simple: To
pass the return value of nsSVGPatternFrame::PaintPattern back to the caller
(nsDisplaySVGGeometry). My suggestion is to review this patch right from
nsSVGPatternFrame.cpp.

I made two mistakes in bug 1258510
1. We should not return directly at [1]. RemoveStateBits at l418 will be skip.
2. nsSVGPatternFrame::PaintPattern should return both SourceSurface and draw
result, so that we can update UpdateDrawResult in display item.

All the other changes are to
1. make sure the return value of nsSVGPatternFrame::PaintPattern goes back to
nsDisplaySVGGeometry::Paint correctly.
2. Since the return value of nsSVGPatternFrame::PaintPattern change, we need
modify all existed callers.

I also filed bug 1346124 for handle the returning value of PaintMarkers.

[1] https://hg.mozilla.org/mozilla-central/file/c0700bedb4f7/layout/svg/nsSVGPatternFrame.cpp#l415

MozReview-Commit-ID: Iq9RPQ6Omz0

--HG--
extra : rebase_source : ca7a35bb9f5e27880d5dc62e03feb91b6ac3435d
2017-03-21 10:12:23 +08:00
cku 064e7ac757 Bug 1345946 - Part 1. Make SVG masks, gradients and patterns use the frame bounds when applied to outer-<svg>. r=jwatt
MozReview-Commit-ID: H6AravwRd2i

--HG--
extra : rebase_source : 6a11dbf529e37e343b06d0d7496789f3f7b17525
2017-03-14 13:26:05 +08:00
Jonathan Watt 2773e5508d Bug 1349477, part 4 - Use AutoReferenceChainGuard in nsSVGMaskFrame. r=longsonr
MozReview-Commit-ID: 5tVLBcTOLQZ
2017-02-21 10:47:22 +00:00
Jonathan Watt e331fb83fd Bug 1349244 - Rename nsISVGChildFrame to nsSVGDisplayableFrame to reduce confusion. r=longsonr
MozReview-Commit-ID: IQCv2ebZbwk

--HG--
rename : layout/svg/nsISVGChildFrame.h => layout/svg/nsSVGDisplayableFrame.h
2017-02-09 18:24:31 +00:00
Sebastian Hengst e4de847b3c Backed out changeset 836d16519edf (bug 1345853) for frequently failing its own test pattern-big-image.html. r=backout 2017-03-17 21:54:01 +01:00
Sebastian Hengst e35416592f Backed out changeset a46f3da8aba6 (bug 1345853) 2017-03-17 21:53:24 +01:00
cku 3d3a05d1ee Bug 1345853 - Part 2. If the transform matrix is singular, return DrawResult::SUCCESS, instead of DrawResult::BAD_ARGS r=tnikkel
According to bug 1345853 comment 5, tn said:
You probably want to return whatever was drawn there regardless of the
DrawResult. SVGMaskFrame has the same problem. Keep in mind that DrawResult is
only reporting on how drawing of any images went, not the drawing of anything
else. Also looking over the patches from bug 1258510 I see a couple places where
BAD_ARGS is returned if the transform matrix is singular. We would want to
return SUCCESS in that case I think, because we drew what we were instructed to
draw.

MozReview-Commit-ID: 5XcDuKQwXTJ

--HG--
extra : rebase_source : ba764df599844c9eb179736f61d6c7f6ee46c9fc
2017-03-16 12:06:36 +08:00
cku e2d44c26bf Bug 1345853 - Part 1. Pass DrawResult from nsSVGPatternFrame::PaintPattern back to nsDisplaySVGGeometry::Paint. r=mstange,tnikkel
I did many change in many files in this patch. But the goal is pretty simple: To
pass the return value of nsSVGPatternFrame::PaintPattern back to the caller
(nsDisplaySVGGeometry). My suggestion is to review this patch right from
nsSVGPatternFrame.cpp.

I made two mistakes in bug 1258510
1. We should not return directly at [1]. RemoveStateBits at l418 will be skip.
2. nsSVGPatternFrame::PaintPattern should return both SourceSurface and draw
result, so that we can update UpdateDrawResult in display item.

All the other changes are to
1. make sure the return value of nsSVGPatternFrame::PaintPattern goes back to
nsDisplaySVGGeometry::Paint correctly.
2. Since the return value of nsSVGPatternFrame::PaintPattern change, we need
modify all existed callers.

I also filed bug 1346124 for handle the returning value of PaintMarkers.

[1] https://hg.mozilla.org/mozilla-central/file/c0700bedb4f7/layout/svg/nsSVGPatternFrame.cpp#l415

MozReview-Commit-ID: Iq9RPQ6Omz0

--HG--
extra : rebase_source : bc338b1a33f1dbf209706577b2455315dfb855e2
2017-03-16 12:17:19 +08:00
Daniel Holbert 2fcc3e7e4f Bug 1345202 part 2: Add "using namespace mozilla::image" to all layout/svg/*.cpp files that use the DrawResult type. r=TYLin
(DrawResult is really mozilla::image::DrawResult.)

MozReview-Commit-ID: 77OMdTEfibV

--HG--
extra : rebase_source : 75f6f616e5f99b00a81219ce93e0fdb28e84fe92
2017-03-07 20:07:00 -08:00
cku 1d2f5b0218 Bug 1330286 - Part 1. Replace CAIRO draw target by platfrom specific target. r=mstange
MozReview-Commit-ID: LPOCgUxIONb

--HG--
extra : rebase_source : 89326ea1cb5e65bc36993696c1c2feaecfc36dc5
2017-01-11 18:14:16 +08:00
Iris Hsiao 0d0bc16680 Backed out changeset e54b0201b200 (bug 1330286) 2017-01-16 16:28:43 +08:00
cku 133f456101 Bug 1330286 - Part 1. Replace CAIRO draw target by platfrom specific target. r=mstange
MozReview-Commit-ID: LPOCgUxIONb

--HG--
extra : rebase_source : 595ddd92a259bbfb737f0c6fd92a9e376db536c2
2017-01-11 18:14:16 +08:00
cku d476a5e983 Bug 1325865 - Part 1. Remove double transform. r=longsonr+218550
For an SVG container element(such as g/svg etc) used in mask, we apply
transform of it twice:
1. The first time is in nsSVGMaskFrame::GetMaskForMaskedFrame. We apply
   transform by eAllTransforms(= eUserSpaceToParent + eChildToUserSpace)
2. The second time is in nsSVGDisplayContainerFrame::PaintSVG. We apply
   transform by eChildToUserSpace

So, totally we apply 1 * eUserSpaceToParent + 2 * eChildToUserSpace. This
patch is trying to remove this one extra eChildToUserSpace.

MozReview-Commit-ID: 2pQCsrCIPNA

--HG--
extra : rebase_source : 27fe1648eb80d9c4d5111bbaec7ec38d80a0a8ac
2017-01-13 17:02:09 +08:00