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

240 Коммитов

Автор SHA1 Сообщение Дата
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
Sebastian Hengst 00458fa236 Backed out changeset 2ea1279576d2 (bug 1351440) 2017-05-18 21:15:26 +02:00
cku c412dd10b9 Bug 1351440 - Part 4. Pass imgDrawingParams to nsSVGPaintServerFrame::GetPaintServerPattern. r=jwatt
The reason of this change is the same as for Part 2, except that this commit fixes
nsSVGPaintServerFrame::GetPaintServerPattern rather than PaintSVG.

Commit-ID: 691YrKZ0Lm9
MozReview-Commit-ID: KSnFhCndFUk

--HG--
extra : rebase_source : 3397613129fff6023833cdc3bd639f0d2b151652
extra : source : fa29f1920a88d88bcf0f5239462d32ee8955895c
2017-05-09 02:14:08 +08: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
Robert Longson 9a974578a0 Bug 1352258 - default fallback for context-fill to black to match default fill colour r=jwatt 2017-05-03 22:00:40 +01:00
Wes Kocher 5b73758a65 Merge m-c to inbound, a=merge
MozReview-Commit-ID: ILz91Vj4gT5
2017-05-02 17:39:58 -07:00
Robert Longson 0c1b6c1fcc Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01: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
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
cku 8be5ee7510 Bug 1349741 - Part 1. Correct the transform matrix of a context that pass to nsFilterInstance::PaintFilteredFrame. r=mstange
MozReview-Commit-ID: 9BISQehlSgG

--HG--
extra : rebase_source : b24635e2e9c790906fd823aad456da12a9fdff16
2017-04-13 11:10:58 +08:00
Iris Hsiao a59e2ae25b Backed out changeset f6a3307c3a8d (bug 1349741)
--HG--
extra : rebase_source : f08659b2489fa6c9205570b62c8a74d768296519
2017-04-13 15:14:54 +08:00
cku 781ff666e3 Bug 1349741 - Part 1. Correct the transform matrix of a context that pass to nsFilterInstance::PaintFilteredFrame. r=mstange
MozReview-Commit-ID: 9BISQehlSgG

--HG--
extra : rebase_source : b24635e2e9c790906fd823aad456da12a9fdff16
2017-04-13 11:10:58 +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 a55d02afd1 Bug 1345853 - Part 4. Pass sync decode flag down to nsSVGPatternFrame::PaintPattern. r=tnikkel
MozReview-Commit-ID: 1bHMINhs121

--HG--
extra : rebase_source : 8da9c0d77dd9a32be392f43d3be266d365894b3a
2017-03-25 03:19:18 +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
Jonathan Watt 3a0faf6e5a Bug 1350725 - Get rid of the GetUserToCanvasTM call in nsSVGUtils::PaintFrameWithEffects. r=longsonr 2017-02-27 12:46:18 +00:00
Jonathan Watt 49d27ff112 Bug 1350706 - Get rid of nsSVGDisplayableFrame::GetCoveredRegion and its overrides. r=longsonr 2017-02-27 11:43:16 +00:00
cku a52259bf72 Bug 1349462 - Part 1. Rename IsSVGText as IsInSVGTextSubtree. r=heycam
MozReview-Commit-ID: LTo6c8tTtaf

--HG--
extra : rebase_source : bc6913c42cca141d7a3098fdd4dcc72fbf146b5a
2017-03-23 15:29:11 +08:00
cku e4f16b779e Bug 1348564 - Part 1. Fix crash in nsSVGUtils::GetBBox. r=jwatt
This change fixes the code so that it does not assume that frames with the
NS_FRAME_SVG_LAYOUT bit set implement nsISVGChildFrame. This assumption is
incorrect since there are many SVG frame types that do not inherit
nsISVGChildFrame (such as nsSVGGradientFrame).

MozReview-Commit-ID: 9dCZAhJk3E0

--HG--
extra : rebase_source : 346755b3215b38560ab57e87cf12585b4a869d65
2017-03-22 18:56:53 +08:00
cku 21d49e1368 Bug 1348430 - Part 1. (Main) Correct value pass to nsFilterInstance::PaintFilteredFrame in nsSVGUtil. r=mstange
There are two places that use nsFilterInstance::PaintFilteredFrame. One is
nsSVGIntegrationUtil::PaintFilter, we do take care of it in bug 1224207.
Another path is at nsSVGUtils::PaintFrameWithEffects, apparently I missed that
path while working on bug 1224207.

MozReview-Commit-ID: K4MjKa4ZpCR

--HG--
extra : rebase_source : 46696b620b210348052fe554b15abf0c3adedc72
2017-03-20 01:30:32 +08: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
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
cku 8f0a57337e Bug 1320036 - Part 1. Correct objectBoundingBox region of a filter applied to an outer SVG element. r=jwatt
MozReview-Commit-ID: 8frACVe2gFE

--HG--
extra : rebase_source : f796c7ae084cc2af0960a0702167fe8211aa083a
extra : source : 43b17a8af53a4684abb4379a3fba95c9d424c77f
2017-03-15 18:36:53 +08:00
cku dc40936bd9 Bug 1336480 - Part 1. Apply suface limitation in nsFilterInstance::ComputeNeededBoxes. r=mstange
There is no need to limit output space bounds in
nsFilterInstance::OutputFilterSpaceBounds(), it's just far too early.
MozReview-Commit-ID: 9i9huKDGxq6

--HG--
extra : rebase_source : 3f7a16fe27f661e79087c6a302235b01f65169d5
2017-02-21 00:08:38 +08:00
Daniel Holbert 2bf2cfcd23 (no bug) Tweak some source files in layout to have correct number of newline characters at the end (exactly 1). (no review, whitespace-only, DONTBUILD)
MozReview-Commit-ID: 1hEEkCMy0pL
2017-02-22 08:58:50 -08:00
cku 947d682907 Bug 1287492 - (followup) Rename GetNearestSVGParent backto GetNearestSVGViewport. r=me
According to jwatt's suggestion, rename back to original name.
MozReview-Commit-ID: 8dUo7ZWoac6

--HG--
extra : rebase_source : 0beb263ca4c99597661da37dca14943637fd4e9e
2017-02-14 23:19:58 +08:00
cku 0af1fba5ed Bug 1287492 - Part 2. Rewrite nsSVGUtils::GetNearestSVGViewport r=mstange
GetNearestSVGViewport is not used anymore, rewrite it, Part 3 will need this new
version.
MozReview-Commit-ID: GNJXICG9akj

--HG--
extra : rebase_source : 7498404cdafca7563ad93d685efac7c606a7ff0b
2017-02-09 22:36:17 +08:00
cku 2d91b08fdf Bug 1224207 - Part 6. Move GetCSSPxToDevPxMatrix to nsSVGUtils. r=mstange
To use GetCSSPxToDevPxMatrix in nsFilterInstance, pull this untility function down
to nsSVGUtils; Otherwise, we have to include nsSVGIntegrationUtils header in
nsFilterIntance, which is ok but not good I think.

MozReview-Commit-ID: 6SGtwj4EE1S

--HG--
extra : rebase_source : f75c904602f7f0f4ad0e4bdb5786c3a405a86be6
2017-01-24 23:22:43 +08:00
Iris Hsiao 6fbbd6b7c2 Backed out 8 changesets (bug 1224207) for Win8 Reftest failures
Backed out changeset 2fce8d53b105 (bug 1224207)
Backed out changeset c31e96bf56d0 (bug 1224207)
Backed out changeset 587cde853b75 (bug 1224207)
Backed out changeset 7faefd871e00 (bug 1224207)
Backed out changeset 15f62c3ec366 (bug 1224207)
Backed out changeset 9448e628569e (bug 1224207)
Backed out changeset 958379e4f61c (bug 1224207)
Backed out changeset d23079bc188e (bug 1224207)
2017-02-08 17:53:07 +08:00
cku 0faeebe858 Bug 1224207 - Part 6. Move GetCSSPxToDevPxMatrix to nsSVGUtils. r=mstange
To use GetCSSPxToDevPxMatrix in nsFilterInstance, pull this untility function down
to nsSVGUtils; Otherwise, we have to include nsSVGIntegrationUtils header in
nsFilterIntance, which is ok but not good I think.

MozReview-Commit-ID: 6SGtwj4EE1S

--HG--
extra : rebase_source : ff6c6173c599afe630aa8b16330a0d1fc667ced8
2017-01-24 23:22:43 +08:00
cku 08b8ea9a74 Bug 1334554 - Handle the return value of nsFilterInstance::PaintFilteredFrame r=mstange
MozReview-Commit-ID: 79gddAmRjnp

--HG--
extra : rebase_source : a5652db96f271c5e367aedda1e2e607bec404fe4
2017-01-28 02:54:38 +08:00
Jonathan Watt e61c653d41 Bug 1058040, part 10 - Allow SVGImageContext to store an SVGContextPaint and have VectorImage propagate it. r=dholbert 2017-01-11 01:48:29 +00:00
cku 5064a33bd2 Bug 537623 - Part 1. Remove extra translation for <use> element in nsSVGUtils. r=longsonr+218550
For nsSVGUtils::FrameSpaceInCSSPxToUserSpace:
If we give a nsSVGUseFrame to this function, it will return <use>'s x/y as
translation vector, which is not necessary. A point (a, b) in frame's
coordinate space should keep (a, b) in <use>'s coordinate space with no change.

Since we remove extra translation in nsSVGUtils::FrameSpaceInCSSPxToUserSpace,
aslo update nsSVGUtils::GetBBox accordingly.

MozReview-Commit-ID: BMjSonjoWd2

--HG--
extra : source : e32814fc5ab6fdb9e723b8109aa8f398b1c883f6
extra : histedit_source : 564968d47a3d95fde8e5b83c55148b63c1feb085
2017-01-17 17:06:16 +08:00
Iris Hsiao 6dbea17a8e Backed out changeset e32814fc5ab6 (bug 537623) 2017-01-18 11:25:25 +08:00
cku 47cf7545f7 Bug 537623 - Part 1. Remove extra translation for <use> element in nsSVGUtils.
For nsSVGUtils::FrameSpaceInCSSPxToUserSpace:
If we give a nsSVGUseFrame to this function, it will return <use>'s x/y as
translation vector, which is not necessary. A point (a, b) in frame's
coordinate space should keep (a, b) in <use>'s coordinate space with no change.

Since we remove extra translation in nsSVGUtils::FrameSpaceInCSSPxToUserSpace,
aslo update nsSVGUtils::GetBBox accordingly.

MozReview-Commit-ID: BMjSonjoWd2

--HG--
extra : rebase_source : da629ba4464534a89718db1cd5b9705261ae4a4d
2017-01-17 17:06:16 +08:00
Robert Longson 1bae76206e Bug 1239100 - Implement SVGGeometryElement interface. r=cam r=peterv
--HG--
rename : dom/svg/nsSVGPathGeometryElement.cpp => dom/svg/SVGGeometryElement.cpp
rename : dom/svg/nsSVGPathGeometryElement.h => dom/svg/SVGGeometryElement.h
rename : dom/svg/nsSVGPolyElement.cpp => dom/svg/SVGPolyElement.cpp
rename : dom/svg/nsSVGPolyElement.h => dom/svg/SVGPolyElement.h
rename : layout/svg/nsSVGPathGeometryFrame.cpp => layout/svg/SVGGeometryFrame.cpp
rename : layout/svg/nsSVGPathGeometryFrame.h => layout/svg/SVGGeometryFrame.h
2016-12-18 11:11:47 +00:00
Sebastian Hengst cdeb642a1b Backed out changeset 0b44e8715bf5 (bug 1239100) for build bustage (SVGGeometryElement.webidl missing). r=backout
--HG--
rename : dom/svg/SVGGeometryElement.cpp => dom/svg/nsSVGPathGeometryElement.cpp
rename : dom/svg/SVGGeometryElement.h => dom/svg/nsSVGPathGeometryElement.h
rename : dom/svg/SVGPolyElement.cpp => dom/svg/nsSVGPolyElement.cpp
rename : dom/svg/SVGPolyElement.h => dom/svg/nsSVGPolyElement.h
rename : layout/svg/SVGGeometryFrame.cpp => layout/svg/nsSVGPathGeometryFrame.cpp
rename : layout/svg/SVGGeometryFrame.h => layout/svg/nsSVGPathGeometryFrame.h
2016-12-18 11:42:51 +01:00
Robert Longson 783bfbb1e4 Bug 1239100 - Implement SVGGeometryElement interface. r=cam r=peterv
--HG--
rename : dom/svg/nsSVGPathGeometryElement.cpp => dom/svg/SVGGeometryElement.cpp
rename : dom/svg/nsSVGPathGeometryElement.h => dom/svg/SVGGeometryElement.h
rename : dom/svg/nsSVGPolyElement.cpp => dom/svg/SVGPolyElement.cpp
rename : dom/svg/nsSVGPolyElement.h => dom/svg/SVGPolyElement.h
rename : layout/svg/nsSVGPathGeometryFrame.cpp => layout/svg/SVGGeometryFrame.cpp
rename : layout/svg/nsSVGPathGeometryFrame.h => layout/svg/SVGGeometryFrame.h
2016-12-18 09:54:02 +00:00
cku 6bfb4458b1 Bug 1322286 - Part 1. Check maskFrame pointer value before dereference. r=mstange
MozReview-Commit-ID: oXVxT8h1vz

--HG--
extra : rebase_source : 98412675f1a37dce330dcc1567e8b63198c8deb7
2016-12-06 17:09:11 -10:00
cku fb19c45aa9 Bug 1322330 - Part 2. Implement EffectProperties::HasInvalidClipPath. r=longsonr+218550
MozReview-Commit-ID: F3m4UZ0ET9x

--HG--
extra : rebase_source : aa11ea80bc566f287095ad91f721a2f70870c13c
2016-12-06 21:28:47 -10:00
cku 932164f048 Bug 1322330 - Part 1. Remove EffectProperties::GetFirstMaskFrame and implement EffectProperties::HasInvalidMaskOrClipPathResource. r=longsonr+218550
MozReview-Commit-ID: 4nfhL7btNFT

--HG--
extra : rebase_source : 37748f1858f9ea42e849cb02ef086183b8a52458
2016-12-06 16:12:36 -10:00
cku 5ee6e3966a Bug 1319667 - Part 2. Move DrawResult from function parameter of PaintClipMask to the return value. r=mstange
Enlight by "Bug 1314536 - Part 1"

MozReview-Commit-ID: Iogdh7LWsWa

--HG--
extra : rebase_source : aacc88ac39551aeb5ffbb84a11580a0d2eec73cc
2016-11-24 00:08:13 +08:00
cku 6a4c5689f0 Bug 1319667 - Part 1. Allow mask longhands apply to SVG elements. r=mstange
Originally, we use the follwoing statement to determine whether generate mask
for an SVG element:
aUsage.shouldGenerateMaskLayer =
  maskFrames.Length() == 1 && maskFrames[0];

maskFrames[0] is not null only if that mask resource is an SVG-mask. That means
we will not generate mask for image mask to any SVG one.

MozReview-Commit-ID: 4QiifC6J0UR

--HG--
extra : rebase_source : aa90599fc4955c0eb6e5d9d10c168b8643c32e03
2016-11-23 13:51:36 +08:00
cku 31495768f7 Bug 1314536 - Part 2. Implement MixModeBlender to simplify nsSVGUtils::PaintFrameWithEffects. r=mstange
MozReview-Commit-ID: JBlj7nApsbT

--HG--
extra : rebase_source : 470a6759cbd1725111c66f69fb32eab1653ec52e
2016-11-16 12:16:20 +08:00
cku f1ae46cbdd Bug 1314536 - Part 1. Implement/use nsSVGMaskFrame::MaskParams and add a test case for nested mask-mode usage in SVG mask. r=mstange
MozReview-Commit-ID: SkU6F5fJ9b

--HG--
extra : rebase_source : d25e8ab2bc0bc3efad78a04705c9aef40119f91f
2016-11-16 12:59:52 +08:00
Phil Ringnalda 7ab6adac90 Backed out 3 changesets (bug 1314536) for Android "'Pair' does not name a type" build bustage
Backed out changeset 16632b726b19 (bug 1314536)
Backed out changeset 2effc920decf (bug 1314536)
Backed out changeset b0aa89236bb2 (bug 1314536)
2016-11-18 18:48:49 -08:00