Closed Bug 1494321 Opened 3 years ago Closed 3 years ago

Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied

Categories

(Core :: SVG, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(2 files)

The 'clip-path' and 'mask' properties do not affect the overflow of frames. There is no need to "calculate" the "post"-effects overflow, or store the "pre"-clip-path/mask overflow, for frame that don't have a "filter" applied.
Comment on attachment 9012218 [details]
Bug 1494321. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r?miko

Miko Mynttinen [:miko] has approved the revision.
Attachment #9012218 - Flags: review+
Attachment #9012218 - Attachment description: Bug 1494321. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r?miko → Bug 1494321 p2. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r?miko
Turns out part 2 exposes a pre-existing bug in PreEffectsVisualOverflowCollector::GetPreEffectsVisualOverflowRect, hence the need for part 1.
Comment on attachment 9012349 [details]
Bug 1494321 p1. Fix bug in PreEffectsVisualOverflowCollector::GetPreEffectsVisualOverflowRect. r?mattwoodrow

Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9012349 - Flags: review+
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/36f1de5b94d0
p1. Fix bug in PreEffectsVisualOverflowCollector::GetPreEffectsVisualOverflowRect. r=mattwoodrow
https://hg.mozilla.org/integration/mozilla-inbound/rev/49e9981519df
p2. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r=miko
I should note that - as discussed with Miko on IRC - in part 2 I also removed the addition of nsChangeHint_UpdateOverflow for clip-path and mask changes. This code was only necessary because of the bug that was fixed in part 1.

That use of that change hint was originally added to nsStyleSVGReset::CalcDifference in bug 1030604:
https://hg.mozilla.org/mozilla-central/rev/8dd8407fd66b#l4.24

And then copied over to nsStyleImageLayers::Layer::CalcDifference in bug 686281:
https://hg.mozilla.org/mozilla-central/rev/42e90ed0f40e#l3.114
Summary: Stop storing PreEffectsBBoxProperty objects for frames with just a clip-path or mask applied → Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied
https://hg.mozilla.org/mozilla-central/rev/36f1de5b94d0
https://hg.mozilla.org/mozilla-central/rev/49e9981519df
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Attachment #9012218 - Attachment description: Bug 1494321 p2. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r?miko → Bug 1494321. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r?miko
You need to log in before you can comment on or make changes to this bug.