Closed Bug 1251115 Opened 8 years ago Closed 8 years ago

Draw SVG correctly when mask url can not be resolved.

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: u459114, Assigned: u459114)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

According to bug 1243734 comment 32 and bug 1243734 comment 34, file an independent bug to fix this issue.

When the path of a mask attribute is not resolvable, nsSVGIntegrationUtils::PaintFramesWithEffects may generate a wrong mask.

Here is an example of mask not resolvable.
https://dxr.mozilla.org/mozilla-central/source/layout/reftests/svg/mask-basic-01.svg
Comment on attachment 8723383 [details]
MozReview Request: Bug 1251115 - Fix incorrect rendering result while mask path is not resolvable.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36513/diff/1-2/
Hi Markus,
Please help to review this patch.
This patch is simply fixing a logic error I made in bug 686281
Under the condition that we have no valid mask images(for example, url of all mask-image are not resolvable), we don't need to generate maskSurface at all.

This bug need to be fixed before we can land the patches in bug 1245499 and bug 1243734.
Blocks: 1245499
Attachment #8723383 - Flags: review?(mstange)
Comment on attachment 8723383 [details]
MozReview Request: Bug 1251115 - Fix incorrect rendering result while mask path is not resolvable.

https://reviewboard.mozilla.org/r/36513/#review33123

::: layout/svg/nsSVGIntegrationUtils.cpp:524
(Diff revision 2)
> +  bool hasMaskToDraw = svgMaskFrame ? true : false;

I'd write this as hasMaskToDraw = (svgMaskFrame != nullptr).
Attachment #8723383 - Flags: review?(mstange) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/3eb7e82deef8c70722397416bba1d0e9882e37e8
Bug 1251115 - Fix incorrect rendering result while mask path is not resolvable; r=mstange
Yes, please.
Flags: needinfo?(cku)
https://hg.mozilla.org/integration/mozilla-inbound/rev/f73aa13cfa3ec6f38be79a2a39ccced6a0697974
Bug 1251115 - Fix incorrect rendering result while mask path is not resolvable; r=mstange
https://hg.mozilla.org/mozilla-central/rev/f73aa13cfa3e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: