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

2813 Коммитов

Автор SHA1 Сообщение Дата
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 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