Commit Graph

283 Commits

Author SHA1 Message Date
cku
dc8858b1b5 Bug 824300 - Part 1. Correct assert condition and promote NS_ASSERTION to MOZ_ASSERT r=heycam
MozReview-Commit-ID: 1FHD2xhQ3x4
2017-02-04 20:43:08 +08:00
cku
2741b0f57f 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
2017-02-03 21:37:08 +08:00
Cameron McCormack
87f3ad6dfb Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr
2017-02-13 11:21:33 +08:00
Cameron McCormack
61f5edfdb9 Bug 1297899 - Part 1: Rename RestyleManager.{h,cpp} to GeckoRestyleManager.{h,cpp}. r=bholley
MozReview-Commit-ID: 1v0ufuGFtiD
2017-02-13 11:21:30 +08:00
Daniel Holbert
bee7fa0be8 Bug 1339609: Add #include for gfxPrefs.h to all source code that calls gfxPrefs APIs. r=jgilbert
MozReview-Commit-ID: GxWehmDYB3t
2017-02-14 14:01:59 -08:00
cku
0d2bf429be 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
2017-02-07 11:51:34 +08:00
cku
fa06d27be0 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
2017-01-24 23:22:43 +08:00
cku
6aa07bc16b 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
2017-01-23 02:51:23 +08:00
cku
4d4d0093fe Bug 1224207 - Part 1. Split SetupContext into ComputeEffectOffset and TranslateToUserSpace. r=mstange
We need ComputeEffectOffset along in the following patch.
MozReview-Commit-ID: GoIZ07IqoQ3
2017-01-23 02:36:41 +08:00
Iris Hsiao
8ec4557f01 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
ee29235376 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
2017-02-07 11:51:34 +08:00
cku
bbcf69236e 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
2017-01-24 23:22:43 +08:00
cku
3c4e7018d9 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
2017-01-23 02:51:23 +08:00
cku
d43ed6256a Bug 1224207 - Part 1. Split SetupContext into ComputeEffectOffset and TranslateToUserSpace. r=mstange
We need ComputeEffectOffset along in the following patch.
MozReview-Commit-ID: GoIZ07IqoQ3
2017-01-23 02:36:41 +08:00
cku
5769adfc42 Bug 1334554 - Handle the return value of nsFilterInstance::PaintFilteredFrame r=mstange
MozReview-Commit-ID: 79gddAmRjnp
2017-01-28 02:54:38 +08:00
cku
855e701842 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
2017-01-12 16:38:48 +08:00
Phil Ringnalda
a271853af3 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
700f7f2b1e 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
2017-01-10 23:18:56 +08:00
cku
b6ed3576f5 Bug 1323912 - Part 5. Apply opacity in mask layer painting path. r=mstange
MozReview-Commit-ID: HX2Tcum2smO
2017-01-03 17:12:32 +08:00
cku
725d48adc6 Bug 1323912 - Part 4. Apply opacity in indirect image mask painting path. r=mstange
MozReview-Commit-ID: IKKKMccyMsO
2017-01-03 16:35:17 +08:00
cku
12a995df35 Bug 1323912 - Part 1. Rename PaintBackground to PaintStyleImageLayer. r=mstange
MozReview-Commit-ID: GWuII34t0j7
2017-01-03 11:57:13 +08:00
Iris Hsiao
2ded520eac Backed out changeset a44640701558 (bug 1323912) 2017-01-04 21:47:16 -05:00
Iris Hsiao
b35115b089 Backed out changeset a2f133998adf (bug 1323912) 2017-01-04 21:47:05 -05:00
Iris Hsiao
b00442e28a Backed out changeset b3ad53915c5e (bug 1323912) 2017-01-04 21:47:01 -05:00
cku
53ff99c13c Bug 1323912 - Part 5. Apply opacity in mask layer painting path. r=mstange
MozReview-Commit-ID: HX2Tcum2smO
2017-01-03 17:12:32 +08:00
cku
6252ac3e54 Bug 1323912 - Part 4. Apply opacity in indirect image mask painting path. r=mstange
MozReview-Commit-ID: IKKKMccyMsO
2017-01-03 16:35:17 +08:00
cku
e3a8231bed Bug 1323912 - Part 1. Rename PaintBackground to PaintStyleImageLayer. r=mstange
MozReview-Commit-ID: GWuII34t0j7
2017-01-03 11:57:13 +08:00
cku
9259537340 Bug 1324174 - Simplify context management logic in nsSVGIntegrationUtils::PaintMask. r=mstange
MozReview-Commit-ID: BwPSFlfqN8e
2016-12-30 02:07:04 +08:00
cku
52d9c5e88a Bug 1314001 - (followup) give different color to different kind of mask. r=me
MozReview-Commit-ID: 5NtefGdSrUT
2016-12-30 03:35:36 +08:00
Phil Ringnalda
a414bba38f Backed out changeset 6a9a6e524a7b (bug 1314001) for Windows -werror bustage
MozReview-Commit-ID: Gzhx80yqTnG
2016-12-28 22:00:49 -08:00
cku
25df213907 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
57564e1bb6 Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq
2016-12-16 12:52:21 +08:00
cku
5ac207a1d5 Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi
2016-12-16 10:56:07 +08:00
Sebastian Hengst
fbac665b18 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
e8f9ea768d Backed out changeset d90a8fc45b74 (bug 1313276) 2016-12-22 20:15:40 +01:00
cku
b8aecad6fe Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq
2016-12-16 12:52:21 +08:00
cku
99b1a46b4b Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi
2016-12-16 10:56:07 +08:00
cku
afce2e8c9c Bug 1324809 - Part 1. Fix wrong clip region while painting filter. r=mstange
MozReview-Commit-ID: Cqjo7VwtnlK
2016-12-21 16:21:23 +08:00
cku
1455483b84 Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N
2016-11-04 15:33:38 +08:00
Wes Kocher
3c975ba005 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
b3e92cef27 Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N
2016-11-04 15:33:38 +08:00
Iris Hsiao
e3a6b8d415 Backed out changeset b3eaebda3d9d (bug 1318266) 2016-12-19 16:17:22 +08:00
cku
d4145b64dc Bug 1318266 - Part 1. Paint trivial clip-path onto mask layer. r=mstange
MozReview-Commit-ID: G2ghy7qGf5N
2016-11-04 15:33:38 +08:00
cku
dd6d368ab7 Bug 1318418 - Eliminate one extra copy in nsSVGIntegrationUtils::PaintMask when we have both mask and clip-path. r=mstange
MozReview-Commit-ID: LlF3ZKi356S
2016-12-15 14:17:50 +08:00
Ryan VanderMeulen
c036055ed6 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
9ab73c0352 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
af1445f044 Backed out changeset 03090e5ca9b9 (bug 1318418) 2016-12-17 21:57:26 -05:00
cku
ee9d5181fc Bug 1318418 - Eliminate one extra copy in nsSVGIntegrationUtils::PaintMask when we have both mask and clip-path. r=mstange
MozReview-Commit-ID: LlF3ZKi356S
2016-12-15 14:17:50 +08:00
cku
f74bcfefb5 Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange
MozReview-Commit-ID: CetQxWIr1sq
2016-12-16 12:52:21 +08:00
cku
a266cb8505 Bug 1313276 - Part 1. Draw clip-path-basic-shape onto mask layer. r=mstange
MozReview-Commit-ID: ICZiy84AFfi
2016-12-16 10:56:07 +08:00