Commit Graph

294 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
cku
2ccbd7a896 Bug 1325038 - Part 1. Correct assertion logic. r=heycam
In the test case of bug 1324809:
1. A span is been broken into two continuation frames: FA and FB. FA is the first
connituation
2. Adding a filter effect to this span.
3. FA::FinishAndStoreOverflow is called. This function will call ComputeEffect:
  if (nsSVGIntegrationUtils::UsingEffectsForFrame(aFrame)) {
    aFrame->Properties().
    Set(nsIFrame::PreEffectsBBoxProperty(), new nsRect(r)); // Now FA has
                                                            // PreEffectsBBoxProperty
                                                            // but FB does not
                                                            // have yet.
    // ComputePostEffectsVisualOverflowRect will iterate all continuations from
    // FA to FB. At this moment, FB does not carry PreEffectsBBoxProperty,
    // assertion failure.
    r = nsSVGIntegrationUtils::ComputePostEffectsVisualOverflowRect(aFrame, r);
  }
4. FB::FinishAndStoreOverflow is called. But already too late.


MozReview-Commit-ID: 2c8OFzSLhfD
***
merge

MozReview-Commit-ID: C0lYQkKCYT6

--HG--
extra : rebase_source : d4777d5b60c9df78fd2ee1d734649b76579644c3
2017-01-12 16:38:48 +08:00
Phil Ringnalda
4ca465c687 Backed out 2 changesets (bug 1325038) for unexpected assertions in filter-on-continuation-box-ref.html
CLOSED TREE

Backed out changeset f1690763f5a4 (bug 1325038)
Backed out changeset 9d8c6f724256 (bug 1325038)
2017-01-11 19:21:14 -08:00
cku
0de5fe0f17 Bug 1325038 - Part 1. Correct assertion logic. r=heycam
In the test case of bug 1324809:
1. A span is been broken into two continuation frames: FA and FB. FA is the first
connituation
2. Adding a filter effect to this span.
3. FA::FinishAndStoreOverflow is called. This function will call ComputeEffect:
  if (nsSVGIntegrationUtils::UsingEffectsForFrame(aFrame)) {
    aFrame->Properties().
    Set(nsIFrame::PreEffectsBBoxProperty(), new nsRect(r)); // Now FA has
                                                            // PreEffectsBBoxProperty
                                                            // but FB does not
                                                            // have yet.
    // ComputePostEffectsVisualOverflowRect will iterate all continuations from
    // FA to FB. At this moment, FB does not carry PreEffectsBBoxProperty,
    // assertion failure.
    r = nsSVGIntegrationUtils::ComputePostEffectsVisualOverflowRect(aFrame, r);
  }
4. FB::FinishAndStoreOverflow is called. But already too late.


MozReview-Commit-ID: 2c8OFzSLhfD

--HG--
extra : rebase_source : ea159f1181dca12f69a38338d918e0c10f608793
2017-01-10 23:18:56 +08:00
cku
8ed218233f Bug 1323912 - Part 5. Apply opacity in mask layer painting path. r=mstange
MozReview-Commit-ID: HX2Tcum2smO

--HG--
extra : rebase_source : 2c2f96aa28e21f79b5fafe12fac8daa3fe89eb21
2017-01-03 17:12:32 +08:00
cku
b10b619355 Bug 1323912 - Part 4. Apply opacity in indirect image mask painting path. r=mstange
MozReview-Commit-ID: IKKKMccyMsO

--HG--
extra : rebase_source : 701d84e241ba36aeaa30b8d9946c79515969ae95
2017-01-03 16:35:17 +08:00
cku
7ffd5790e1 Bug 1323912 - Part 1. Rename PaintBackground to PaintStyleImageLayer. r=mstange
MozReview-Commit-ID: GWuII34t0j7

--HG--
extra : rebase_source : 4b08672f76c57562b9ab46d6605611d99aa64cf0
2017-01-03 11:57:13 +08:00
Iris Hsiao
53e5ead7ef Backed out changeset a44640701558 (bug 1323912) 2017-01-04 21:47:16 -05:00
Iris Hsiao
6989ec2d7a Backed out changeset a2f133998adf (bug 1323912) 2017-01-04 21:47:05 -05:00
Iris Hsiao
d569188dd7 Backed out changeset b3ad53915c5e (bug 1323912) 2017-01-04 21:47:01 -05:00
cku
8c03e0e5d4 Bug 1323912 - Part 5. Apply opacity in mask layer painting path. r=mstange
MozReview-Commit-ID: HX2Tcum2smO

--HG--
extra : rebase_source : 8a28c67b898efbea304d71709c0fd13e25632032
2017-01-03 17:12:32 +08:00
cku
1aaf3f65d2 Bug 1323912 - Part 4. Apply opacity in indirect image mask painting path. r=mstange
MozReview-Commit-ID: IKKKMccyMsO

--HG--
extra : rebase_source : aaaf45dacac16fae7dc1a05529125b195de1b3cd
2017-01-03 16:35:17 +08:00
cku
e36c492419 Bug 1323912 - Part 1. Rename PaintBackground to PaintStyleImageLayer. r=mstange
MozReview-Commit-ID: GWuII34t0j7

--HG--
extra : rebase_source : f74e9d242e2ef505790575cd12e0a58cc07ec44f
2017-01-03 11:57:13 +08:00
cku
ccf62e0161 Bug 1324174 - Simplify context management logic in nsSVGIntegrationUtils::PaintMask. r=mstange
MozReview-Commit-ID: BwPSFlfqN8e

--HG--
extra : rebase_source : b16bad5f5baee1a469237b72ea6a23c341ebdb25
2016-12-30 02:07:04 +08:00
cku
706f1d717e Bug 1314001 - (followup) give different color to different kind of mask. r=me
MozReview-Commit-ID: 5NtefGdSrUT

--HG--
extra : rebase_source : 2f1cbf149e6baa42829c6f50cb81c682865e2e81
2016-12-30 03:35:36 +08:00
Phil Ringnalda
419cda6127 Backed out changeset 6a9a6e524a7b (bug 1314001) for Windows -werror bustage
MozReview-Commit-ID: Gzhx80yqTnG
2016-12-28 22:00:49 -08:00
cku
50446c645c Bug 1314001 - (followup) give different color to different kind of mask. r=me
MozReview-Commit-ID: Ko9MyTzMhL2
2016-12-29 11:36:39 +08:00
cku
df51b78be9 Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq

--HG--
extra : rebase_source : c5941bdbd076197b13f2474160b67b9923048974
extra : source : d306c622c34e8290dc22212928eed6e817f0c182
2016-12-16 12:52:21 +08:00
cku
bedd21d45a Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi

--HG--
extra : rebase_source : 6a181c3d76d525b35bf3eae07c8f40cb9e1f2d95
extra : source : 9fe78d3eab3725c5838acf705843694c69197e05
2016-12-16 10:56:07 +08:00
Sebastian Hengst
8b13894203 Backed out changeset d539253e91ae (bug 1313276) for failing own test paint-on-maskLayer-1c.html on Android debug. r=backout 2016-12-22 20:16:20 +01:00
Sebastian Hengst
dc41e31e4c Backed out changeset d90a8fc45b74 (bug 1313276) 2016-12-22 20:15:40 +01:00
cku
8abbd30968 Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq

--HG--
extra : rebase_source : 64d7bde4138773f7923166db7120fe4683d357bc
extra : source : d306c622c34e8290dc22212928eed6e817f0c182
2016-12-16 12:52:21 +08:00
cku
f2114f97f8 Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi

--HG--
extra : rebase_source : 9862f64480946e08edaa9157f26f7e82fc8ea5a8
extra : source : 9fe78d3eab3725c5838acf705843694c69197e05
2016-12-16 10:56:07 +08:00
cku
d25e2f154e Bug 1324809 - Part 1. Fix wrong clip region while painting filter. r=mstange
MozReview-Commit-ID: Cqjo7VwtnlK

--HG--
extra : rebase_source : 0473eb6a9297d0cf0dee3e2e7b1e5f1ac8740bb1
2016-12-21 16:21:23 +08:00
cku
b8109179f1 Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N

--HG--
extra : rebase_source : 3e090928ccc9ac58533162634f1269f76aba9131
2016-11-04 15:33:38 +08:00
Wes Kocher
aaaaf4e40c Backed out 5 changesets (bug 1318266) for clipboard leaks a=backout
Backed out changeset a6d9ee58afd9 (bug 1318266)
Backed out changeset 47b22189955a (bug 1318266)
Backed out changeset 936cc01602c4 (bug 1318266)
Backed out changeset 95d7547ad1c3 (bug 1318266)
Backed out changeset a4c80aed15d8 (bug 1318266)
2016-12-20 11:30:26 -08:00
cku
baf48e8a2b Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N

--HG--
extra : rebase_source : b8e0c64cf251f09139cbd12c5e391daf4d0c949c
2016-11-04 15:33:38 +08:00
Iris Hsiao
e566e8864d Backed out changeset b3eaebda3d9d (bug 1318266) 2016-12-19 16:17:22 +08:00
cku
5ba953493d Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N

--HG--
extra : rebase_source : 82443b6ac28d1afe93c376485368edbd141fa1d4
2016-11-04 15:33:38 +08:00
cku
aa2f62a7c5 Bug 1318418 - Eliminate one extra copy in nsSVGIntegrationUtils::PaintMask when we have both mask and clip-path. r=mstange
MozReview-Commit-ID: LlF3ZKi356S

--HG--
extra : rebase_source : 344d722a7f6b8614638bb7b5f792b3b25ae2907b
2016-12-15 14:17:50 +08:00
Ryan VanderMeulen
f31546de18 Backed out 2 changesets (bug 1318266) for breaking tab drawing when a LWT is applied.
Backed out changeset 00bb4e2f5a3c (bug 1318266)
Backed out changeset 55790893cab4 (bug 1318266)
2016-12-17 21:59:10 -05:00
Ryan VanderMeulen
ae624d4fc9 Backed out 2 changesets (bug 1313276)
Backed out changeset e505479a60e5 (bug 1313276)
Backed out changeset efb9edd878f0 (bug 1313276)
2016-12-17 21:58:03 -05:00
Ryan VanderMeulen
25d7744226 Backed out changeset 03090e5ca9b9 (bug 1318418) 2016-12-17 21:57:26 -05:00
cku
4819a41260 Bug 1318418 - Eliminate one extra copy in nsSVGIntegrationUtils::PaintMask when we have both mask and clip-path. r=mstange
MozReview-Commit-ID: LlF3ZKi356S

--HG--
extra : rebase_source : a394bbe894045953148f5efb3c98ce6f882525df
2016-12-15 14:17:50 +08:00
cku
bbb9cdf946 Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq

--HG--
extra : rebase_source : 33c65b97a79f4bdface832fb9ba3e32425010e5d
2016-12-16 12:52:21 +08:00
cku
803f736c06 Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi

--HG--
extra : rebase_source : 7ef14c85f8a93a952ac8d8a9bb2652b97b489dfd
2016-12-16 10:56:07 +08:00
cku
7cb6b79be7 Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N

--HG--
extra : rebase_source : 064baa7d4815b7ddbccdc4c625156ec485418bb2
2016-11-04 15:33:38 +08:00
cku
e50551a66d Bug 1323157 - Rename HasNoFilterOrHasValidFilter as HasNoOrValidFilter. r=longsonr+218550
MozReview-Commit-ID: GQzPf9Qy8LJ

--HG--
extra : rebase_source : d03d5609a8ed2eddaf596a019775a35bfd7d2f24
2016-12-13 19:40:27 +08: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
a46dd4f00e Bug 1320364 - Correct NS_ASSERTION failure condition in GetPreEffectsVisualOverflowRect. r=heycam
MozReview-Commit-ID: 4675cFLehK4

--HG--
extra : rebase_source : 5ff6778a558e2773b926d9317fef34cdd79e94e6
2016-11-28 16:26:34 +08:00
cku
da357af099 Bug 1319667 - (follow-up) Remove incorrect assertion. r=me
If the size of mask is empty, we wil hit this assertion, which is wrong.

MozReview-Commit-ID: LgulkGPsjyH

--HG--
extra : rebase_source : fbf8fc05a0bfa16b28599726f8ee85d4468d5d86
2016-12-01 17:13:18 +08: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
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
cku
eee760be28 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 : 129dc2d6abf5911ba42b459db20cfb54b83dfc0c
2016-11-16 12:59:52 +08:00
cku
67dee6966c Bug 1317636 - Part 6. Use PaintClipMask in nsSVGIntegrationUtils::PaintMask. r=mstange
MozReview-Commit-ID: 6CibljSTeNj

--HG--
extra : rebase_source : d37076092b8ead6349ec008d251909a73730db24
2016-11-16 19:04:59 +08:00
cku
92a1ecae0d Bug 1313898 - Part 2. Paint non-trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: HJUwhqsJ42M

--HG--
extra : rebase_source : 503b69a17e69b24c88830ae866c6d8aecc7baeb2
2016-11-04 14:48:11 +08:00
cku
282a24594a Bug 1250490 - Part 2. Remove DetermineMaskUsage and ComputeOpacity from nsSVGIntegrationUtils. r=mstange
MozReview-Commit-ID: 4gHW7PyMNhd

--HG--
extra : rebase_source : 68507df64232ebef68535e85cc9934833a428456
2016-11-03 11:16:46 +08:00
cku
8147e6d4e1 Bug 1314001 - Part 2. Draw mask by single opaque green. r=mstange
MozReview-Commit-ID: 12S5vBGYRpb

--HG--
extra : rebase_source : ef9bfa3251610732a0a6d2becb0e07737a40ac12
2016-11-04 12:25:33 +08:00
cku
bb74527cff Bug 1234485 - Part 12. Extract PaintMaskSurface from GenerateMaskSurface. r=mstange
MozReview-Commit-ID: Bg4Kt6yCtNe

--HG--
extra : rebase_source : e13ce7753bede0e9edc58f8406c60d4120fbd329
2016-11-02 15:10:46 +08:00
cku
4d9495cf77 Bug 1234485 - Part 3. Implement nsSVGIntegrationUtils::PaintMask. r=mstange
Unlike nsSVGIntegrationUtils::PaintMaskAndClipPath, which paints masked content
onto aParam.ctx, nsSVGIntegrationUtils::PaintMask paints only mask, no content,
onto aParams.ctx.

MozReview-Commit-ID: BaRbtHpoHzj

--HG--
extra : rebase_source : 4a258b7332ba7a7edbffdc13c7f4b065fbe5eaa4
2016-10-19 17:31:36 +08:00
cku
999ca66251 Bug 1234485 - Part 2. Implement nsSVGIntegrationUtils::IsMaskResourceReady. r=mstange
We need this new function to determine whether paint mask onto mask layer.
MozReview-Commit-ID: IeEamPi9S8v

--HG--
extra : rebase_source : 993ae4bbe31c2c21704813c318f5328719194930
2016-10-30 21:41:06 +08:00
cku
882c5bf086 Bug 1234485 - Part 1. Extract DetermineMaskUsage from PaintMaskAndClipPath. r=mstange
Two reasons that we should do this:
1. Make PaintMaskAndClipPath even simpler.
2. We need this new function to determine LayerState of a nsDisplayMask later.

MozReview-Commit-ID: 2ga0VFOs6u3

--HG--
extra : rebase_source : 8a8c4da05acf5aa1cf13eb7366116944df9c8409
2016-10-19 13:38:35 +08:00
Wes Kocher
008fdd9329 Merge inbound to central, a=merge 2016-11-08 13:58:20 -08:00
cku
2fbd5c11c2 Bug 1258751 - followup: remove out-of-date comment. r=me DONTBUILD
MozReview-Commit-ID: 8M8yHsDc1Lg

--HG--
extra : rebase_source : 3f0d695e8307bb735d2026470dcec90c9887ec1a
2016-11-07 17:09:57 +08:00
Kartikaya Gupta
57f37706cc Bug 1315477 - Add a AsBasicLayerManager() function and use instead of static_casts. r=mattwoodrow
MozReview-Commit-ID: DV6XZBEXw85

--HG--
extra : rebase_source : b82f2ea2d073292c2a9514ba8a4c2d0c8397d90a
2016-11-07 11:38:45 -05:00
cku
37219ffb9a Bug 1313570 - Change the parameter of ValidateSVGFrame. r=mstange
MozReview-Commit-ID: Brym9cbGRw8

--HG--
extra : rebase_source : 27e6795ed6b00377aa07124fea41c6db9e075d1f
2016-10-28 13:04:17 +08:00
cku
708f22a29a Bug 1305253 - Part 2. Replace gfxContext::Save/Restore by gfxContext::PopClip. r=mstange
MozReview-Commit-ID: SPfZpRsBlo

--HG--
extra : rebase_source : 1d029c6ecee5c8c83c17a42b053eb80d4b89605f
2016-10-28 18:32:01 +08:00
cku
9d24e031f3 Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when clip-path type is basic-shape or geometry-box. r=mstange
Before this patch, shouldApplyBasicShape will be set as true when the url of a
clip-path is not resolvable, for example:
  clip-path: url("#non-exist-id");

So we call nsCSSClipPathInstance::ApplyBasicShapeClip and early return even if
the clip-path's type is StyleShapeSourceType::URL. This patch aims to correct
this wrong behavior: nsCSSClipPathInstance::ApplyBasicShapeClip shoud be used
only when the type of clip-path is StyleShapeSourceType::Shape or
StyleShapeSourceType::Box.

MozReview-Commit-ID: 1ON4dEY9pva

--HG--
extra : rebase_source : 88e89526f4b57bcbb0a1db585884d578682d118c
2016-10-28 23:56:07 +08:00
Mason Chang
cd84eadb22 Bug 1258751: Delete the CoreGraphics backend. r=mstange 2016-10-18 23:22:44 -04:00
cku
07f31bbe99 Bug 1299715 - Part 7. Correct clip region for mask surface. r=mstange
MozReview-Commit-ID: 1MZA9uxO9Oi

--HG--
extra : rebase_source : cb23768fb82339b4641602ac90194d009446e1d2
2016-10-07 14:46:41 +08:00
cku
0d557e384c Bug 1299715 - Part 6. Move ComputeMaskGeometry from nsSVGIntegrationUtils to nsDisplayMask. r=mstange
MozReview-Commit-ID: 4uLfaGDXGyE

--HG--
extra : rebase_source : f6a72f1067d32287e68b3cc7a84dd5a0c8384e1a
2016-10-11 13:12:00 +08:00
cku
837190aa4f Bug 1299715 - Part 5. Correct clip region for opacity surface. r=mstange
MozReview-Commit-ID: 1wiQKsHKJsg

--HG--
extra : rebase_source : 47b58288cdde10d9fae42bec33082ea90604957b
2016-10-07 12:42:35 +08:00
cku
84d4f4c4c5 Bug 1299715 - Part 4. Correct clip region for clip-path mask surface. r=mstange
MozReview-Commit-ID: IOFOyS18yRm

--HG--
extra : rebase_source : e322b19333b6b97f879ed2e668faeffc6a1cc87c
2016-10-06 14:55:55 +08:00
Sebastian Hengst
22483d098a Backed out changeset fa72646efc0a (bug 1299715) 2016-10-12 18:02:18 +02:00
Sebastian Hengst
ead934e26a Backed out changeset c53086907356 (bug 1299715) 2016-10-12 18:02:18 +02:00
Sebastian Hengst
f984f3a888 Backed out changeset b91db6687d19 (bug 1299715) 2016-10-12 18:02:18 +02:00
Sebastian Hengst
e1301411c3 Backed out changeset 4f0b13e4444a (bug 1299715) 2016-10-12 18:02:18 +02:00
cku
f00b30aac5 Bug 1299715 - Part 7. Correct clip region for mask surface. r=mstange
MozReview-Commit-ID: 1MZA9uxO9Oi

--HG--
extra : rebase_source : f0b635d4c945966b1e0bc3bd91b1911dcf81a6a6
2016-10-07 14:46:41 +08:00
cku
faa1874701 Bug 1299715 - Part 6. Move ComputeMaskGeometry from nsSVGIntegrationUtils to nsDisplayMask. r=mstange
MozReview-Commit-ID: 4uLfaGDXGyE

--HG--
extra : rebase_source : 136a87f3b23578d6a3a2cf95474463edb6a53708
2016-10-11 13:12:00 +08:00
cku
a31601cee7 Bug 1299715 - Part 5. Correct clip region for opacity surface. r=mstange
MozReview-Commit-ID: 1wiQKsHKJsg

--HG--
extra : rebase_source : d07c35615119fdae64c0bffd4cbd6290630fbc4e
2016-10-07 12:42:35 +08:00
cku
9cd308352d Bug 1299715 - Part 4. Correct clip region for clip-path mask surface. r=mstange
MozReview-Commit-ID: IOFOyS18yRm

--HG--
extra : rebase_source : b55a935500104c9a754dad8817d9bc3302944a5c
2016-10-06 14:55:55 +08:00
Markus Stange
9183b4e1bd Bug 1305259 - Use PushGroupAndCopyBackground for the masked group so that we can have subpixel AA inside the mask / clip-path. r=cjku, r=Bas
MozReview-Commit-ID: 3J9ncPn9sij

--HG--
extra : rebase_source : 6f6fdf624a68827a02696899fc46df8433b21565
2016-09-30 21:22:30 -04:00
cku
e9ac18ca58 Bug 1279409 - Part 1. Remove mix-blend-mode handling code in nsSVGIntegrationUtils.
MozReview-Commit-ID: DRxYU80ClwU

--HG--
extra : rebase_source : 2b88414c5eb032492cbd6d96ff56c0b63ad0fe8f
2016-09-29 11:07:51 +08:00