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

17 Коммитов

Автор SHA1 Сообщение Дата
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
Jonathan Watt 49d27ff112 Bug 1350706 - Get rid of nsSVGDisplayableFrame::GetCoveredRegion and its overrides. r=longsonr 2017-02-27 11:43:16 +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 48bd77677c Bug 1345202 part 3: Add a few more required 'using' and #include statements in layout/svg. r=TYLin
Specifically:
 - SVGGeometryFrame.cpp has several uses the type SVGGeometryElement which is
   really mozilla::dom::SVGGeometryElement. So I'm adding a 'using' decl for
   the 'mozilla::dom' namespace (and I'm dropping a now-unnecessary explicit
   dom:: prefix from another type there).
 - SVGImageContext.cpp calls several functions on nsIFrame (PresContext() &
   StyleSVG() at least). So I'm adding an #include for nsIFrame.h.
 - nsSVGMarkerFrame.cpp uses the type SVGGeometryFrame, which is really
   mozilla::SVGGeometryFrame. So I'm adding a 'using' decl for
   the 'mozilla' namespace.

MozReview-Commit-ID: AlCrocHhPtr

--HG--
extra : rebase_source : 8fe64f35179954813c00188587e0d7724f17791c
2017-03-07 20:10:29 -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
Jonathan Watt ed3cbebef6 Bug 1335610 - Revert bogus code added to SVGGeometryFrame::PaintSVG in bug 1325865. r=longsonr 2017-01-16 10:04:16 +00: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
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