Closed Bug 1252603 Opened 8 years ago Closed 8 years ago

Assertion failure: !aExtraMasksTransform.HasNonTranslation()

Categories

(Core :: SVG, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1229095

People

(Reporter: bc, Unassigned)

Details

(Keywords: assertion)

Attachments

(2 files)

1. http://www.nasaspaceflight.com/2016/02/industry-forward-exploration-hardware/
2. Assertion failure: !aExtraMasksTransform.HasNonTranslation(), at c:/builds/moz2_slave/m-cen-w64-d-000000000000000000/build/src/layout/svg/nsSVGClipPathFrame.cpp:221

Beta/45, Aurora/46, Nightly/47 Windows and Linux at least. OSX not tested.

Reproducible with saved version of the page.
mats, Ting-Yu is this something for you ?
Flags: needinfo?(tlin)
Flags: needinfo?(mats)
Sorry, I don't know SVG. Jonathan?
Flags: needinfo?(tlin) → needinfo?(jwatt)
Sorry, I'm not familiar with this code.
Flags: needinfo?(mats)
daniel, jonathan: can you take a look at this ?
Flags: needinfo?(dholbert)
We hit this code when we have both a mask and a clip-path on an element, which maybe explains why this isn't a common issue.

The assert was originally added to the code in:

  https://hg.mozilla.org/mozilla-central/rev/5515fd47eb5a

where it was !aInputMaskTransform.HasNonTranslation() (different argument name). Shame the assertion didn't add a string to explain what the issue is. :) However, the issue is that the DrawTarget::MaskSurface call that follows can only mask with an offset - a point which it gets from aInputMaskTransform - so if aInputMaskTransform contains anything other than a translation we are going to mask with the mask in the wrong position. In other words the result of failing this assertion should (just) be some mis-rendering.

The value for aExtraMaskTransform can come from either of:

https://mxr.mozilla.org/mozilla-central/source/layout/svg/nsSVGIntegrationUtils.cpp?rev=5dfa8eff77b6&mark=592-594#592

https://mxr.mozilla.org/mozilla-central/source/layout/svg/nsSVGMaskFrame.cpp?rev=e8c7dfe727cd&mark=259-260#259

In both case the Matrix includes the gfxContext's current transform, so we will fail this assertion if there is a non-translation in the transform to the root element (roughly speaking).

I don't have time to fix this properly right now, but I'd be happy to change the assert to something less aggressive than MOZ_ASSERT.
Flags: needinfo?(jwatt)
Flags: needinfo?(dholbert)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: