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

3012 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 42fd33ff9c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ELENTh08Be7
2017-04-29 11:10:31 +02:00
Sebastian Hengst b10380c0c8 Backed out changeset de8bbf1eb200 (bug 1359762) for failing reftest context-fill-01.html. r=backout 2017-04-28 22:54:00 +02:00
Jonathan Watt a585601edc Bug 1359762 - Only allow SVG images to use context paint if they're from chrome:// or resource://. r=dholbert
MozReview-Commit-ID: 5vaPp4Y8zMd
2017-04-13 19:47:51 +01:00
Jonathan Watt 1689905b0b Bug 1350010, part 4 - Require '-moz-context-properties' on elements linking to SVG images using context paint. r=heycam
MozReview-Commit-ID: 4SgXupGx29P
2017-04-12 12:47:32 +01: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
Jonathan Watt 40205887ee Bug 1359486 - Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
MozReview-Commit-ID: 7TL9cfWsiED
2017-04-05 11:44:16 +01:00
Sebastian Hengst e55101c5c8 Backed out changeset 85d3d629fa4a (bug 1359486) for crashing in 480345-1.html. r=backout 2017-04-25 19:44:03 +02:00
Jonathan Watt 1ba9dbe74f Bug 1359486 - Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
MozReview-Commit-ID: 7TL9cfWsiED
2017-04-05 11:44:16 +01:00
Jonathan Watt 78700a27ae Bug 1358690, part 1 - Allow SVGImageContext::MaybeInitAndStoreContextPaint to be passed an existing SVGImageContext. r=dholbert 2017-03-28 11:43:15 +01:00
Jonathan Watt c42adf48d9 Bug 1358828, part 1 - Add some missing includes. r=longsonr
MozReview-Commit-ID: 3nDDATmCkJV
2017-03-27 12:49:21 +01:00
Jonathan Watt 80319e98e0 Bug 1358794, part 1 - If necessary, synthesize a viewBox for SVG embedded via SVG <image>. r=longsonr
MozReview-Commit-ID: DuKOqfxCUW8
2017-03-25 15:57:29 +00:00
cku 71f1a61edb Bug 1357432 - Part 2. Implement nsSVGEffects::GetBaseURLForLocalRef to export local-ref-url-resolving logic. r=heycam
ResolveURLUsingLocalRef is designed to be internally used by
nsSVGEffects::Get-{SVGEffect}-URI functions. Since we also need it in
SVGUseElement::LookupHref, make it public in nsSVGEffects.

MozReview-Commit-ID: Hsvs8Uzahrz

--HG--
extra : rebase_source : 54698a477a2ebb3f635fb3a77f6bc39b1741b05b
2017-04-20 15:58:19 +08:00
cku 258222aaaf Bug 1346618 - Part 1. Remove SVGImageContext::mGlobalOpacity. r=mstange
MozReview-Commit-ID: ByiPa4sreEh

--HG--
extra : rebase_source : eda6104c00cbc7ebe7b9a5ddc9e2abc73fbc37df
extra : source : df69799726bdccc5a25d6190c0fe22645e264ab7
2017-04-15 02:01:22 +08:00
Sebastian Hengst 3ec03039d2 Backed out changeset 6bd69f962dd5 (bug 1346618) for permafailing reftest 315920-9.html on Android 4.3 API15+ debug. r=backout 2017-04-13 18:56:58 +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 494c75d825 Bug 1346618 - Part 1. Remove SVGImageContext::mGlobalOpacity. r=mstange
MozReview-Commit-ID: ByiPa4sreEh

--HG--
extra : rebase_source : 0b86cd57c1c9e6d687a0a4f56c3ccbfe24886e84
2017-04-10 11:59:48 +08:00
Manish Goregaokar 8854b518a1 Bug 1342596 - Update expectations for absolute length serialization ; r=manishearth 2017-04-12 14:57:20 +08:00
cku 21a1b43445 Bug 1352096 - Part 2. Remove Layer::mSourceURI. r=heycam
Now, remove Layer::mSourceURI, there are several benefit of doing this:
1. Reduce the size of nsStyleImage::Layer.
2. By storing style image and url information in nsStyleImage, we can remove
many verbose comments. That is becasue there is no need to explain why we use
mSourceURI here, or why we use nsStyleImage there anymore.
3. Since all inforamtion is stored in on place, nsStyleImage, we can setup image
request or URLs by one single Gecko_SetUrlImageValue call.

MozReview-Commit-ID: 7aTQobddTB1

--HG--
extra : rebase_source : 247e3b66c727a9116c58d3d6ff3ae0f7a58f2338
2017-03-31 01:50:21 +08:00
Jonathan Watt 9176ddbc11 Bug 828240, part 2 - Create only one nsDisplayTransform for outer-<svg> children-only transforms. r=longsonr
Previously if an outer-<svg> had children-only transforms we would create
an nsDisplayTransform display list item for every child of the <svg> element.
For certain SVG files this could cause performance problems. This commit makes
us create a single nsDisplayTransform for the nsSVGOuterSVGFrame's anonymous
child frame rathen than one nsDisplayTransform for every real child.
2017-03-15 16:59:34 +00:00
Jonathan Watt 2e3616de57 Bug 1353697, part 2 - Fix the 'transform' attribute on outer-<svg> to also transform the border, padding and clip rect. r=longsonr 2017-03-13 14:05:38 +00:00
Jonathan Watt c1539cd5b0 Bug 1351990 - Initialize SVGContextPaint's members. r=baku
MozReview-Commit-ID: EZJ5QFuLyna
2017-03-09 12:49:21 +00:00
Ryan VanderMeulen f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Ryan Hunt 56219a24fd Bug 1341101 part 4 - Specify a nsRenderingContext for nsCSSRendering::PaintStyleImageLayer r=mattwoodrow
MozReview-Commit-ID: 5TX6IXLSC8r

--HG--
extra : rebase_source : fef1d37208dc29f8df67388fe5c335a9c013daef
2017-03-15 00:25:09 -04:00
Wes Kocher 914dd4b76c Merge inbound to m-c a=merge 2017-03-28 13:30:56 -07:00
cku 50ac4dd472 Bug 877661 - Part 2. Pass decode flag from outer-svg/ svg-container paint call to nsSVGUtils::PaintFrameWithEffects. r=tnikkel
MozReview-Commit-ID: 9VvzixdmRIt

--HG--
extra : rebase_source : 00a18c38016f86a244a14e36d427a2f2eacfdee4
2017-03-27 11:28:54 +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 ff10c4ce7b Bug 1345853 - Part 3. Pass sync docode flag down to nsSVGDisplayableFrame::PaintSVG. r=tnikkel
Add one paramater to nsSVGDisplayableFrame::PaintSVG, so that we can pass
sync-decode flag from nsXXXXDisplayItem::Paint function to SVG paint call.

MozReview-Commit-ID: 6VZbxnFaoUj

--HG--
extra : rebase_source : c55e457e0d7a81b4a574d970924e0af6f7a7db48
2017-03-24 16:49:37 +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
Jonathan Watt da33662df5 Bug 1058040, part 18 - Minimize the cost of context paint when it is not available. r=dholbert
MozReview-Commit-ID: 5MVW37Vd1aK
2017-03-06 13:49:21 +00:00
Jonathan Watt 8c4b35d802 Bug 1058040, part 10b - Account for the SVGContextPaint member in SVGImageContext::operator==. r=dholbert
MozReview-Commit-ID: KqP0al5v5mB
2017-03-01 10:41:14 +00:00
cku d8cdbc3585 Bug 1346124 - Pass sync decode flag down to nsSVGMarkerFrame::PaintMark. r=tnikkel
MozReview-Commit-ID: 45yNaXpLSM4

--HG--
extra : rebase_source : 01dcd1673e9ea8384eb327e56aec6e413732cdec
2017-03-27 12:33:53 +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
Jonathan Watt 630b2a5e78 Bug 1350015 - Fix the 'fill-opacity' property to work with fill="context-fill". r=dholbert
This change makes SVGEmbeddingContextPaint's GetFillPattern and
GetStrokePattern methods honor their opacity arguments as they should.  Since
these arguments must affect the gfxPattern that is returned, the code now
creates those on demand rather than creating them up front and caching them.

MozReview-Commit-ID: 4oemU2nRMeQ
2017-02-24 14:55:28 +00:00
Robert Longson 9831a5ac0e Bug 1349865 - use RAII to set/unset NS_FRAME_DRAWING_AS_PAINTSERVER state bit r=jwatt 2017-03-24 18:07:26 +00:00
cku a9228a48bc Bug 1343139 - Part 1. Implement nsStyleSVGReset::HasMask. r=heycam
Implement this unil function to improve readability
MozReview-Commit-ID: FLKOGyq180W

--HG--
extra : rebase_source : db8dbc67dbc63c19df806e79ea36016d3d5fc8b6
extra : source : 47fa0a1f03acd6007e2d40e4ec5bc0ddba221361
2017-03-07 13:43:21 +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
Mats Palmgren 2feec4025d Bug 1333482 part 5 - [css-ui] Enable '-moz-appearance' support for some tests. r=dholbert
* * *
[mq]: sssssssss

MozReview-Commit-ID: 4wgnjld1rDt
2017-03-23 22:11:23 -07:00
Carsten "Tomcat" Book 492970c342 merge mozilla-inbound to mozilla-central a=merge 2017-03-23 13:44:09 +01:00
cku 38afa468c3 Bug 1349462 - Part 2. one line for static function. r=jwatt
MozReview-Commit-ID: 9jVkHtLouVN

--HG--
extra : rebase_source : 8a512a93e562129475c68feba1e50f6b28edd37e
2017-03-23 16:53:47 +08: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
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 1fdd3184b8 Bug 1349477, part 3 - Use AutoReferenceChainGuard in nsSVGPatternFrame. r=longsonr
MozReview-Commit-ID: EUgSIK92Jtq
2017-02-21 10:34:52 +00:00
Jonathan Watt ae571cea0c Bug 1349477, part 2 - Use AutoReferenceChainGuard in nsSVGGradientFrame. r=longsonr
MozReview-Commit-ID: 5xw5i696ipe
2017-02-21 10:10:43 +00:00
Jonathan Watt fc37ee1940 Bug 1349477, part 1 - Use AutoReferenceChainGuard in nsSVGFilterFrame. r=longsonr
MozReview-Commit-ID: HTcySIH3qNt
2017-02-21 09:37:09 +00:00
Jonathan Watt e42cb4dd27 Bug 1349388, part 5 - Assert in AutoReferenceChainGuard's ctor that we didn't fail to break a loop. r=longsonr 2017-02-17 14:20:32 +00:00
Jonathan Watt b70b72f418 Bug 1349388, part 4 - Allow a single instance of AutoReferenceLimiter to guard against both reference loops and long reference chains. r=longsonr
--HG--
rename : layout/svg/AutoReferenceLimiter.h => layout/svg/AutoReferenceChainGuard.h
2017-02-17 13:15:18 +00:00
Jonathan Watt 618c7360e8 Bug 1349388, part 3 - Provide AutoReferenceLimiter with a default maximum reference chain length. r=longsonr 2017-02-16 11:18:33 +00:00
Jonathan Watt 6f850d0f40 Bug 1349388, part 2 - Add guard to AutoReferenceLimiter to prevent it being used as a temporary. r=longsonr 2017-02-16 10:31:03 +00:00
Jonathan Watt 78209c36d4 Bug 1349388, part 1 - Make AutoReferenceLimiter report long reference chains and reference loops to the console. r=longsonr 2017-02-16 10:26:39 +00:00
Timothy Nikkel ca076ee1dd Bug 1346501. Don't mark every image as visible when a frame is created for it. r=mats
This is a bug from https://hg.mozilla.org/mozilla-central/rev/2d171d75b746 (bug 1157546). It took a shortcut in trying to get around one of the downsides of tracking visibility on frames instead of content nodes.

We cannot get our primary frame during FrameCreate calls because FrameCreate is called during the frame's Init() function, which happens before the primary frame pointer is set.

So when TrackImage is called from FrameCreate |frame| will be null but mFrameCreateCalled will be true. So we won't hit the early return that tries to detect nonvisible images.

The comment being removed is just wrong. We can obtain a frame for <feImage> just as well as any other image type.

The thing that is different about <feImage> is that it calls IncApproximateVisibleCount() followed by FrameCreated() in the frame's Init() function. This means that the frame is marked visible at the time of the FrameCreated, and there will be no further calls to TrackImage (because there are no further changes). So the FrameCreated call is the last chance to mark this image visible. The regressing changeset tries to get around this by just considering the image visible whenever we know a frame exists (because of mFrameCreateCalled) but can't access it. This ends up affecting all types of images, not just <feImage>.

The above paragraph is also true for SVG <image> that are non-display.
2017-03-22 00:32:48 -05: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
cku ff59d84e8f Bug 1349115 - Remove gfxPattern::CairoStatus r=mstange
This function is not a virtual function and always returns CAIRO_STATUS_SUCCESS
after the patch in bug 1054838 landed. There is no reason to keep it anymore.

MozReview-Commit-ID: EadrrFQyjfY

--HG--
extra : rebase_source : 3f6a284dc9fa396d5cfd3f64190562373801a0a2
2017-03-21 14:32:22 +08: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
cku 62104073dc Bug 1343664 - Part 1. Correct transform matrix. r=mstange
MozReview-Commit-ID: Eg6i4SoSPoe

--HG--
extra : rebase_source : d2a5dea5d614e56e673828eb7bd91f736309b8cc
2017-03-06 15:25:29 +08:00
cku 1c222a7b6c Bug 1348564 - Part 3. More comment in nsSVGIntegrationUtils::GetSVGBBoxForNonSVGFrame. r=jwatt
MozReview-Commit-ID: Gq9vLmqrcjy

--HG--
extra : rebase_source : 4aefa23ea76dadbb38508fb7bc85e628cc6b4fc0
2017-03-22 15:53:55 +08:00
cku ea64988785 Bug 1348564 - Part 2. Crash test. r=jwatt
MozReview-Commit-ID: 6u7vqwFHynP

--HG--
extra : rebase_source : 4526bd541a39f822954ebc8949f95f376e422104
2017-03-21 18:27:28 +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 6f602b53e4 Bug 1348430 - Part 3. Correct mTargetBBoxInFilterSpace. r=mstange
I introduced ComputeTargetBBoxInFilterSpace[1] function in bug 1287492.
Two reasons that I think we should not clip filter boundary by viewport
in that function:
1. The patch in bug 1336480 can also fix bug 1287492 and is more correct.
2. That restriction cause wrong rendering result
  In this bug, reporter apply filter onto a path object in pattern element.
  Before the clipping applied in [1], the boundary of filter effects region is
    (x=-1, y=-1, width=10, height=10) in CSS units
  After clipping by svg viewport, the boundary turns out to be
    (x=0, y=0, width=9, height=9) in CSS units
  which is smaller then we need for filter painting. So we should stop clip the
  boundary by svg viewport. (Please refer to filter-in-pattern-02.svg in the next
  patch).

[1] https://hg.mozilla.org/mozilla-central/file/dbabc189256e/layout/svg/nsFilterInstance.cpp#l235

MozReview-Commit-ID: 2d14rnyWPJs

--HG--
extra : rebase_source : ca3a523c8ae95d166441690d5ee1def2ed56a550
2017-03-22 21:29:14 +08:00
cku fca3b40aa9 Bug 1348430 - Part 2. Rename a local variable in nsSVGPatternFrame::PaintPattern. r=mstange
MozReview-Commit-ID: FIWQOHsC5o5

--HG--
extra : rebase_source : f1c3d0f3c81073ca5c57f6bd4482a061a56fc7a3
2017-03-21 23:40:36 +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
Boris Zbarsky 1081d17998 Bug 1347411 part 7. Change stylo to correctly recompute style of SVG anonymous wrapper boxes. r=heycam
This handles ::-moz-svg-marker-anon-child and ::-moz-svg-outer-svg-anon-child.

MozReview-Commit-ID: 8FcYeDG1CKZ
2017-03-15 14:00:44 -04:00
Boris Zbarsky 784eb8f590 Bug 1347411 part 2. Fix stylo to properly update styles for the various frames that use FCDATA_WITH_WRAPPING_BLOCK to wrap an anonymous block around their kids. r=heycam
This handles ::-moz-button-content, ::-moz-html-canvas-content, ::-moz-svg-text,
::-moz-svg-foreign-content.

MozReview-Commit-ID: 3xk7214X2uR
2017-03-15 14:00:43 -04: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
Ting-Yu Lin 1923f5a65b Bug 1326409 Part 4 - Extract a function to compute polygon vertices. r=dholbert
MozReview-Commit-ID: B4BzBHjLHxW
2017-03-13 12:03:40 +08:00
Jonathan Watt ca0876480e Bug 1345841 - Stop using Maybe<const T>. r=mats 2017-02-07 11:52:22 +00:00
Jonathan Watt 6bb704eb39 Bug 1058040, part 13 - Fix an uninitialized memory bug in SVGImageContext's default ctor. r=dholbert 2017-02-03 22:21:04 +00:00
Jonathan Watt 94608339b3 Bug 1058040, part 12 - Make SVGImageContext's ctor's aViewportSize parameter optional. r=dholbert 2017-01-30 13:25:00 +00: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
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
Daniel Holbert 31976f3092 Bug 1345202 part 1: Add missing mozilla:: namespace prefixes in layout/svg/*.h. r=TYLin
These only build successfully (in unified mode) right now because they're lucky
enough to pick up a "using namespace mozilla;" declaration from a .cpp file
earlier in their unified compilation unit.

MozReview-Commit-ID: JylaTtjdSZu

--HG--
extra : rebase_source : 5233e0322556f2494745fa6ece6ea0fd6af23fec
2017-03-07 20:06:25 -08:00
cku 6a92a74443 Bug 1345052 - Remove EffectProperties::MightHaveNoneSVGMask. r=heycam
MozReview-Commit-ID: 3WFAjwhBkDp

--HG--
extra : rebase_source : 1840ab0b7d156e4ff6e65ebe1f6127e5975ac6ac
2017-03-07 17:01:31 +08:00
Boris Zbarsky 5f864e31c5 Reenable several crashtests that no longer crash or leak or time out with stylo. No bug, r=bzbarsky
MozReview-Commit-ID: 88XjZyn4mnv
2017-02-24 15:22:37 -05:00
Carsten "Tomcat" Book afda854868 Merge mozilla-central to mozilla-inbound 2017-02-23 15:28:43 +01:00
Carsten "Tomcat" Book e6b82618f4 merge mozilla-inbound to mozilla-central a=merge 2017-02-23 14:59:37 +01:00
cku 3edceb1620 Bug 1224207 - (followup) remove an unused local var. r=me
MozReview-Commit-ID: B7MJkHS1S88

--HG--
extra : rebase_source : 73b3a175baf4752d7df53d090e5c39eeb4150afd
2017-02-23 17:08:17 +08:00
Timothy Nikkel 442d47eb2c Bug 1341881. Don't do sync decode for SVG <image> elements images. r=aosmond
SVG <image> elements have approximately the same level of visibility tracking as regular html <img>s so we shouldn't need to do sync decode. It shows up in some profiles.

The comment being removed was written a long time ago, before image visibility tracking for one.

We could even go a step further and ask for no sync decoding at all, but one step at a time to make sure this doesn't cause any regressions.
2017-02-22 18:58:42 -06:00
Wes Kocher b7294d3167 Merge inbound to central, a=merge
MozReview-Commit-ID: 2R3yE5OIznC
2017-02-22 15:01:04 -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
Wes Kocher 13e1cccb3f Merge inbound to central, a=merge
MozReview-Commit-ID: EEMZdLCheAm
2017-02-21 17:35:01 -08:00
cku cfc6e5755f Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce

--HG--
extra : rebase_source : c043e4790bc2c84e4f3735a95c8ef0d9aa268986
extra : source : fb3c04effbd191767b1ff3e46c3c2d416ac8ee37
2017-02-21 23:26:17 +08:00
Ting-Yu Lin 8f840dc923 Bug 775624 Part 22 - Remove NS_FRAME_COMPLETE. r=dholbert
This patch is written by the following script with some manual adjustment to
the comment in nsRubyTextContainerFrame.cpp and nsRubyFrame.cpp, and
nsColumnSetFrame's constructor.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "nsReflowStatus *([a-zA-Z0-9]*) = NS_FRAME_COMPLETE" "nsReflowStatus \1"
rename "([a-zA-Z0-9.*]*) *= NS_FRAME_COMPLETE;" "\1.Reset();"
rename "([a-zA-Z0-9.*]*) == NS_FRAME_COMPLETE" "\1.IsEmpty()"

MozReview-Commit-ID: 9tqQAHvdQex

--HG--
extra : rebase_source : 3119776946dc2c8350098b7bf9f3ceff29bdffb5
2017-02-14 17:55:48 +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
Boris Zbarsky 96054e12cc Bug 1324661 part 1. When recreating style contexts for elements in stylo, use the right frame (not the primary frame!) for tables. r=bholley,emilio
For a table, the primary frame is the table wrapper anonymous box.  That
anonymous box inherits style from its _child_ table frame, which is the frame that
has the actual style for the element.  So we want to use the stylo-computed
style for the table frame, and then compute an updated style for the table
wrapper too, because some things (like absolute positioning) are done for the
table wrapper anonymous box, not the table frame.
2017-02-17 14:52:39 -05:00
cku aaa97f23a2 Bug 1340992 - Demote MOZ_ASSERT to NS_ASSERTION before root cause addressed. r=me
MozReview-Commit-ID: I8goOZdPs9d
2017-02-21 17:44:22 +08:00
Carsten "Tomcat" Book f3b2544de0 Merge mozilla-central to autoland 2017-02-16 13:20:11 +01:00
Carsten "Tomcat" Book b218b4c6ae merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Ting-Yu Lin 961a315c82 Bug 1326407 Part 2 - Extract a function to compute inset radii. r=dbaron
MozReview-Commit-ID: 3XbfW40AJCI

--HG--
extra : rebase_source : 074d5110759ff6ec4632104109d9a11d01d9cbf7
2017-02-16 10:51:48 +08:00
Ting-Yu Lin 3c289a249f Bug 1326407 Part 1 - Extract a function to compute inset rect. r=dbaron
MozReview-Commit-ID: DmVOVArtzBZ

--HG--
extra : rebase_source : 835edd63d53cb439f4ebcd0551a2d4a8065f1ba6
2017-02-16 10:51:47 +08:00
cku 3e138fa63b Bug 824300 - Part 1. Correct assert condition and promote NS_ASSERTION to MOZ_ASSERT r=heycam
MozReview-Commit-ID: 1FHD2xhQ3x4

--HG--
extra : rebase_source : 6629580190cdf7587a63674e2936988004bf9a03
extra : source : 0ba11d51f4c6998396a64161ce6fe2da3c721b2c
2017-02-04 20:43:08 +08:00
cku f8a699428b Bug 842114 - Part 1. Correct assert condition and promote NS_ASSERTION to MOZ_ASSERT. r=heycam
Except during restyle process, we should skip this checking in reflow as well.
But what really should do is to skip this checking if this function is called
from ComputeEffectsRect. The reason is explained in the beginning of
ComputePostEffectsVisualOverflowRect.

Also promote NS_ASSERTION to MOZ_ASSERTION in this patch.

MozReview-Commit-ID: 3CuKkdR4kTK

--HG--
extra : rebase_source : 968f708603ec4424dd32f23bf2a4ffc74ce3fc85
2017-02-03 21:37:08 +08:00
cku 93624f81f1 Bug 1339728 - Part 2. Change return value type of nsSVGFilterInstance::ComputeBounds. r=mstange
MozReview-Commit-ID: 6rvcQGJiaW6

--HG--
extra : rebase_source : 50d1bac996de7c05c5979386426da0db703daae2
2017-02-14 10:32:10 +08:00
cku c5fa83667e Bug 1339728 - Part 1. Remove nsSVGFilterInstance::mFilterSpaceToUserSpaceScale & mUserSpaceBounds r=mstange
1.
mUserSpaceBounds & GetFilterSpaceBounds are not used at all. This patch is
simply removing mUserSpaceBounds and codes relative to them.
2.
GetFilterSpaceBounds is defined but not used. Remove.

MozReview-Commit-ID: 7vJmZP4jC5F

--HG--
extra : rebase_source : 6798c938a4e3b1ab513dcc3b3f6da293fda45e1f
2017-02-13 23:14:54 +08:00
Carsten "Tomcat" Book dacc230ad3 Merge mozilla-central to autoland 2017-02-15 12:59:23 +01:00
Carsten "Tomcat" Book ed3d8d8286 merge mozilla-inbound to mozilla-central a=merge 2017-02-15 12:21:44 +01:00
Jeff Walden cdee578059 Bug 1287006 - Don't pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer, in layout/-related code. r=bz
--HG--
extra : rebase_source : 94377970d6ec591044a10dab1aa5568e4a051837
2017-02-13 09:07:40 -08:00
Daniel Holbert 452a3b8454 Bug 1339609: Add #include for gfxPrefs.h to all source code that calls gfxPrefs APIs. r=jgilbert
MozReview-Commit-ID: GxWehmDYB3t

--HG--
extra : rebase_source : cd994e5c6abf777f77c5a708cbfb2f6afc49a44c
2017-02-14 14:01:59 -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
Cameron McCormack f63cdecde2 Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr

--HG--
extra : rebase_source : 13c64026190afe5de25f540adb6deea9f518149f
2017-02-13 11:21:33 +08:00
Cameron McCormack c041778642 Bug 1297899 - Part 1: Rename RestyleManager.{h,cpp} to GeckoRestyleManager.{h,cpp}. r=bholley
MozReview-Commit-ID: 1v0ufuGFtiD

--HG--
rename : layout/base/RestyleManager.cpp => layout/base/GeckoRestyleManager.cpp
rename : layout/base/RestyleManager.h => layout/base/GeckoRestyleManager.h
extra : rebase_source : 9e9432b1185697dc21eb23de93a09610a5a074bd
2017-02-13 11:21:30 +08:00
cku 2f1f711b2d Bug 1340257 - Part 2. Revert the change in bug 842114. r=cjku
MozReview-Commit-ID: Kqyt4AHwpJL

--HG--
extra : rebase_source : 2e4ddbe50895b79433ddbe1e392b1a0be83d142c
2017-02-22 16:27:40 +08:00
cku bda562a499 Bug 1340257 - Part 1. Remove Assertion failure: mightHaveNoneSVGMask. r=heycam
After fighting with this assertion several months, I decided to remove it for
two reasons:

This assertion allows PreEffectBBoxProperty not being cached only under specific
condition. But the condition is wider then we expect.

1.
PreEffectsBBoxProperty is cached by nsIFrame::FinishAndStoreOverflow(this
function calls ComputeEffectsRect which cache this property actually) and
it is called from nsXXXFrame::Reflow on demand. Yes, *on demand*, not always.
And this is the fist reason that why I think we should just remove
this assertion.

For example, nsBlockFrame::Reflow calls FinishAndStoreOverflow to store this
property. But like BRFrame, it does not call FinishAndStoreOverflow at all.
In anohter word, if you apply any SVG effect to a BRFrame, you will always hit
this assertion. Here is an example:
  <br style="filter: saturate(0%);"/>

So, if we still want to keep this assertion, we may need to create a list which
list all frame types that cache PreEffectsBBoxProperty, and do this check only if
the type of aFrame is listed. This is error prone since we may introduce a
new frame type at any time and forget to update this table.

2.
So, I think it's better just removing this assertion. The assertion that we
really need is the next one(2nd one):
MOZ_ASSERT(!preTransformOverflows,
           "GetVisualOverflowRect() won't return the pre-effects rect!");
Since hitting that assertion, the 2nd one, means caller will retrieve wrong
effect region. Hitting the first assertion only means we do not cache
PreEffectsBBoxProperty, it's pretty normal and not hurt anything. This is the
second reason that I think we should remvoe this assertion.

MozReview-Commit-ID: JfiYTiP2laG

--HG--
extra : rebase_source : b0225e36cd7e33a23516cfbe5a40c731d92f8825
2017-02-22 15:56:53 +08:00
cku ec79c18b27 Bug 1287492 - Part 3. (Main) Shrink mTargetBBoxInFilterSpace r=mstange
Clip mTargetBBoxInFilterSpace by the bounds of parent SVG frame. Fix this bug and
good for both rendering performance and memory consumption.

The root cause of this bug

<svg width="100" height="100" style="filter: opacity(100%);">
  <g transform="matrix(200,0,0,200,-20000,-20000)">
    <rect width="200" height="200" style="fill:lime">
  </g>
</svg>

In this example, <rect> is going to be a huge graphic object because of the scale
transform in <g>. The bounding-box of <svg> is an union of all descedants, so the
size of mTargetBBoxInFilterSpace is huage too. We are not able to create such a
huge surface because of the limitation at
nsFilterInstance::OutputFilterSpaceBounds[1].

[1] https://hg.mozilla.org/mozilla-central/file/f4f6790e3926/layout/svg/nsFilterInstance.cpp#l556

MozReview-Commit-ID: 4Fdj5mgcE0V

--HG--
extra : rebase_source : 00b668933255cc9ea4a5f5e4fddc6d2f509c41c7
2017-02-09 23:17:43 +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
Cameron McCormack 90e83367ae Bug 1334768 - stylo: Test expectation adjustments for for 2017-02-09 merge. r=me
MozReview-Commit-ID: AhvCAu3NYrb
2017-02-09 21:11:09 +08:00
cku 66ee16b6b0 Bug 1224207 - Part 7. (Main) Pass frame transform info down to nsFilterInstance. r=mstange
The biggest change is located in
nsFilterInstance::ComputeUserSpaceToFilterSpaceScale.

Originally, nsSVGUtils::GetCanvasTM is used. This function returns combination
of svg-transform, e.g. <rect transform="translate(30,40)" />, and
css-to-dev-scale-transform. That why we do not see this bug in a transformed
svg element.

For example, the following svg can be rendered correctly on FF:
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
  <filter id="blurMe">
    <feGaussianBlur in="SourceGraphic" stdDeviation="1"/>
  </filter>
</defs>
  <!-- nsSVGUtils::GetCanvasTM return transform="scale(3)" correctly -->
  <text x="0" y="35" font-size="35" transform="scale(3)" filter="url(#blurMe)">
    Hello, out there
  </text>
</svg>

Unfortunately, this function does not report css-transform at all. So, I
replaced it by mPaintTransfom, which is passed from the caller. So now it's the
caller's responsibility to pass a UserSpace-To-DeviceSpace transform into
nsFilterInstance. And, we actually change the meaning of mPaintTransform in this
patch. Before this patch, mPaintTransform means css-to-dev-px scaling transform;
After this patch it means "userspace-to-filterspace-scaling * css-to-dev-scaling"
transform.

All the other modifictions are to respect the change in
nsFilterInstance::ComputeUserSpaceToFilterSpaceScale.

MozReview-Commit-ID: LwNUAMo98M

--HG--
extra : rebase_source : 4ed9fbd1493decef43b6d606d78c4dd23e975146
2017-02-07 11:51:34 +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
cku 4078913be5 Bug 1224207 - Part 5. Fine tune nsFilterInstance::BuildSourcePaint. r=mstange
1. Rename gfx->sourceCtx.
2. Since sourceCtx is discarded immidiately, there is no need of save/restore.

MozReview-Commit-ID: CM2MMBYWp3W

--HG--
extra : rebase_source : e9e2b92ac08a41da4e6f9a40886f329e8aa0fc29
2017-01-24 23:10:31 +08:00
cku 56155d7ace Bug 1224207 - Part 4. Move internal used member functions into private section. r=mstange
MozReview-Commit-ID: 1ciHcGFd5yU

--HG--
extra : rebase_source : 52315d4b2f9fd44d54a91b7b719f5f07959f2a32
2017-01-24 23:04:20 +08:00
cku 41b81aba07 Bug 1224207 - Part 3. Remove unused parameters of nsFilterInstance's member functions. r=mstange
MozReview-Commit-ID: 4QcutMJveUy

--HG--
extra : rebase_source : cc8260ac0423bfb537976c3b6fa3925ff631a04b
2017-01-24 00:27:55 +08:00
cku 3a2459d1e9 Bug 1224207 - Part 2. Fine tune RegularFramePaintCallback. r=mstange
1. Pass offset in device pixel unit instead of app unit.
2. Keep old context of the basic manager before replacing.

MozReview-Commit-ID: IoYFTU35aw6

--HG--
extra : rebase_source : b77c8e32d875fe69838904932e47bbee161c987a
2017-01-23 02:51:23 +08:00
cku 1223a2adfa Bug 1224207 - Part 1. Split SetupContext into ComputeEffectOffset and TranslateToUserSpace. r=mstange
We need ComputeEffectOffset along in the following patch.
MozReview-Commit-ID: GoIZ07IqoQ3

--HG--
extra : rebase_source : 54ad8ad25225a110b1cdf190d51df771386b7a26
2017-01-23 02:36:41 +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 66f91bc1e5 Bug 1224207 - Part 7. (Main) Pass frame transform info down to nsFilterInstance. r=mstange
The biggest change is located in
nsFilterInstance::ComputeUserSpaceToFilterSpaceScale.

Originally, nsSVGUtils::GetCanvasTM is used. This function returns combination
of svg-transform, e.g. <rect transform="translate(30,40)" />, and
css-to-dev-scale-transform. That why we do not see this bug in a transformed
svg element.

For example, the following svg can be rendered correctly on FF:
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
  <filter id="blurMe">
    <feGaussianBlur in="SourceGraphic" stdDeviation="1"/>
  </filter>
</defs>
  <!-- nsSVGUtils::GetCanvasTM return transform="scale(3)" correctly -->
  <text x="0" y="35" font-size="35" transform="scale(3)" filter="url(#blurMe)">
    Hello, out there
  </text>
</svg>

Unfortunately, this function does not report css-transform at all. So, I
replaced it by mPaintTransfom, which is passed from the caller. So now it's the
caller's responsibility to pass a UserSpace-To-DeviceSpace transform into
nsFilterInstance. And, we actually change the meaning of mPaintTransform in this
patch. Before this patch, mPaintTransform means css-to-dev-px scaling transform;
After this patch it means "userspace-to-filterspace-scaling * css-to-dev-scaling"
transform.

All the other modifictions are to respect the change in
nsFilterInstance::ComputeUserSpaceToFilterSpaceScale.

MozReview-Commit-ID: LwNUAMo98M

--HG--
extra : rebase_source : eaae0570dcc0b8dea39f5d4b87f5e2920509053d
2017-02-07 11:51:34 +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 36512021da Bug 1224207 - Part 5. Fine tune nsFilterInstance::BuildSourcePaint. r=mstange
1. Rename gfx->sourceCtx.
2. Since sourceCtx is discarded immidiately, there is no need of save/restore.

MozReview-Commit-ID: CM2MMBYWp3W

--HG--
extra : rebase_source : 059f205b65632984cfaed535348ae702501d10d8
2017-01-24 23:10:31 +08:00
cku 1ac1d6737d Bug 1224207 - Part 4. Move internal used member functions into private section. r=mstange
MozReview-Commit-ID: 1ciHcGFd5yU

--HG--
extra : rebase_source : 33eebdaac828d6f9551ed8ee38e55cd2e1f51e19
2017-01-24 23:04:20 +08:00
cku 9693ed3b8b Bug 1224207 - Part 3. Remove unused parameters of nsFilterInstance's member functions. r=mstange
MozReview-Commit-ID: 4QcutMJveUy

--HG--
extra : rebase_source : 3467bb2e24630394e9b122b15c3824a24fb5b76b
2017-01-24 00:27:55 +08:00
cku b3bfa5feb7 Bug 1224207 - Part 2. Fine tune RegularFramePaintCallback. r=mstange
1. Pass offset in device pixel unit instead of app unit.
2. Keep old context of the basic manager before replacing.

MozReview-Commit-ID: IoYFTU35aw6

--HG--
extra : rebase_source : 03c3b70c2c7f93acd1654fd4eefba602bfa2974d
2017-01-23 02:51:23 +08:00
cku 78af925e0a Bug 1224207 - Part 1. Split SetupContext into ComputeEffectOffset and TranslateToUserSpace. r=mstange
We need ComputeEffectOffset along in the following patch.
MozReview-Commit-ID: GoIZ07IqoQ3

--HG--
extra : rebase_source : d8750a067e436912643f351737d0bdb392036c50
2017-01-23 02:36:41 +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 ed3cbebef6 Bug 1335610 - Revert bogus code added to SVGGeometryFrame::PaintSVG in bug 1325865. r=longsonr 2017-01-16 10:04:16 +00:00
Jonathan Watt 28ad9afcfa Bug 1058040, part 11 - Convert DrawImage/DrawImageInternal's SVGImageContext param from pointer to Maybe<>. r=dholbert 2017-01-11 01:48:29 +00: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
Jonathan Watt 527549c4f0 Bug 1058040, part 9 - Add an SVGContextPaint subclass for inheriting context paint into SVG-as-an-image. r=dholbert 2017-01-10 10:28:11 +00:00
Jonathan Watt 43ca85cc9a Bug 1058040, part 8 - Make AutoSetRestoreSVGContextPaint::Init's SVGContextPaint argument const. r=dholbert
This patch is needed because in a later patch we need to pass
VectorImage::Draw's const SVGImageContext to
AutoSetRestoreSVGContextPaint::Init.
2017-01-09 19:12:03 +00:00
Jonathan Watt de51524080 Bug 1058040, part 7 - Make SVGContextPaint a ref counted class. r=dholbert 2017-01-09 19:12:02 +00:00
Jonathan Watt 927266bad9 Bug 1058040, part 6 - When copying SVGImageContexts use the copy ctor. r=dholbert
Prior to this patch whenever we wanted to pass on a modified SVGImageContext
we would pass on a new object initialized with some of the data of the object
we were given and with the new data we wanted to change.  Unfortunately we
were sometimes failing to faithfully copy member data that we do not want
to modify (because of default arguments).  This patch fixes that by making us
fully copy the object we were given using its copy constructor and then
explicitly override the data we want to change.
2017-01-09 19:12:02 +00:00
Cameron McCormack f7f9c5f69e Bug 1324647 - stylo: Downgrade "Need to flush before destroying!" assertion since it occurs frequently. r=me
MozReview-Commit-ID: AOUnCyG4I2O
2017-01-31 15:10:45 +08:00
Cameron McCormack 590058f927 Bug 1324669 - stylo: Downgrade SMIL assertion even further to a non-test-failing warning. r=me
MozReview-Commit-ID: 5fk6C9qaOgW
2017-01-31 17:37:08 +01:00
Sebastian Hengst ed5bd31f9b Backed out changeset ad45a3da5e4a (bug 1324669) for Windows build bustage: OverflowChangedTracker.h(44). r=backout on a CLOSED TREE 2017-01-31 17:32:12 +01:00
Sebastian Hengst 82170bb7cf Backed out changeset 7771169d9f8a (bug 1324647) 2017-01-31 17:30:21 +01:00
Cameron McCormack 95f75d80be Bug 1324647 - stylo: Downgrade "Need to flush before destroying!" assertion since it occurs frequently. r=me
MozReview-Commit-ID: AOUnCyG4I2O
2017-01-31 23:36:29 +08:00
Cameron McCormack 946b5c3633 Bug 1324669 - stylo: Downgrade SMIL assertion even further to a non-test-failing warning. r=me
MozReview-Commit-ID: 5fk6C9qaOgW
2017-01-31 23:36:12 +08:00
Cameron McCormack 9c4ea5685f Bug 1334768 - stylo: Back out 800030115d2e and 404506488cfb for being completely wrong due to bug 1334938.
MozReview-Commit-ID: 8CGTqmtlguT
2017-01-30 16:49:54 +08:00
Cameron McCormack 7805d4716e Bug 1334768 - stylo: Test expectation adjustments for 2017-01-29 merge.
MozReview-Commit-ID: FFmvs6SHIwW
2017-01-29 15:31:56 +08:00
Gijs Kruitbosch 8faf5c08a8 Bug 1333164 - fix invalid references to mochitest stylesheet, r=erahm
MozReview-Commit-ID: 1Xxt72jYdm7

--HG--
extra : rebase_source : 15d854ffd6a142687fe5232149a0e370f1c058c2
2017-01-24 14:24:04 +00:00
Ting-Yu Lin 287eecf10f Bug 1326406 Part 2 - Extract the computation of ellipse radii as ComputeEllipseRadii(). r=dbaron
MozReview-Commit-ID: LPdvg66adHQ

--HG--
extra : rebase_source : 7dbd171a65d9ba057cce48057b82d3f8c143c590
2017-01-23 17:17:05 +08:00
Jonathan Kingston 673d193089 Bug 1330294 - Fixing disabled script tags that cause crashes in disabled SVG nodes r=hsivonen,smaug
MozReview-Commit-ID: Lr4s98aZM4W

--HG--
extra : rebase_source : 6dca1899d3b69a8eb7e82a02a60fd59f6a9a335e
2017-01-11 16:29:13 +00:00
Cameron McCormack c5eaaabab2 Bug 1324663 - stylo: More crashtest annotation adjustments. r=me
MozReview-Commit-ID: DLHMu3nmLKO
2017-01-18 15:09:00 +08: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