Closed Bug 1684625 Opened 4 years ago Closed 4 years ago

Child SVG containing image causes following content to be clipped

Categories

(Core :: SVG, defect)

Firefox 84
defect

Tracking

()

VERIFIED FIXED
86 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- verified
firefox87 --- verified

People

(Reporter: paul.lebeau, Assigned: longsonr)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

If a child <svg> element contains an <image> element, then later content in the root SVG will be clipped to the child SVG element's bounds.

First reported here: https://stackoverflow.com/questions/65525755/svg-rendering-problem-firefox-cuts-off-the-sibling-svg-elements-is-there-a-w

Here is a test case: https://jsfiddle.net/ajuqb49o/2/

<svg width="800" height="800"
style="background-color: pink">

<svg x="10" y="10" width="200" height="200">
<rect width="200" height="200" fill="blue"/>
<image width="200" height="200" href="http://www.placekitten.com/200/200"/>
</svg>

<rect width="220" height="220" fill="green" fill-opacity="0.5"/>

</svg>

Actual results:

The translucent green rectangle is being clipped to the bounds of the preceding child <svg> element. But that only happens if the child SVG contains an <image> element.

Expected results:

The green rectangle should be larger than the image. If you delete the <image> element, or view this test in a different browser, you will see the correct behaviour.

Alternate test link using a data url, in case the image doesn't load:

https://jsfiddle.net/z31Lsujt/

Attached image Comparison of Chrome and Firefox (deleted) —

Attached comparison screenshots of results from Chrome and Firefox

Status: UNCONFIRMED → NEW
Component: Untriaged → SVG
Ever confirmed: true
Product: Firefox → Core

Using https://mozilla.github.io/mozregression/ to find a regression range would be helpful if you're up for it Paul.

Flags: needinfo?(paul.lebeau)

No problemo.

2021-01-01T21:49:13.752000: DEBUG : Found commit message:
Bug 1555356 - Make images inside of SVGs active. r=aosmond

(rebased Alexis' patch)

Differential Revision: https://phabricator.services.mozilla.com/D59925

2021-01-01T21:49:13.752000: DEBUG : Did not find a branch, checking all integration branches
2021-01-01T21:49:13.754000: INFO : The bisection is done.
2021-01-01T21:49:13.755000: INFO : Stopped


app_name: firefox
build_date: 2020-05-15 21:23:59.719000
build_file: C:\Users\Paul.mozilla\mozregression\persist\febf9ee6d477-shippable--autoland--target.zip
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/R0ZcKDl7R0K8DFLakUYAGQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
changeset: febf9ee6d477b5c892683cb9c0faae7970e9b883
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f340bbb582d16c083344b1370bd4e4d4caf5fb17&tochange=febf9ee6d477b5c892683cb9c0faae7970e9b883
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: R0ZcKDl7R0K8DFLakUYAGQ

Flags: needinfo?(paul.lebeau)
Regressed by: 1555356
Has Regression Range: --- → yes

Alexis, this appears to be another regression from bug 1555356, which already has several open. Would you be able to take a look?

Severity: -- → S2
Flags: needinfo?(a.beingessner)

I'm no longer on the graphics team, but I handed this work off to Jeff.

Flags: needinfo?(a.beingessner) → needinfo?(jmuizelaar)
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9efb772f0e09 Disable active images in SVGs r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Blocks: 1674163
Blocks: 1659063
Flags: needinfo?(jmuizelaar)

I don't understand why, but this issue reproduces in the original version it was reported (Release v83), appears to have been fixed in Nightly v87.0a1 and Beta v86.0b5, but also does not reproduce in Release v85.0 and ESR v78.7.0esr, where it should probably be affected, considering the fix was pushed into v86.

Is it expected that Release and ESR versions do not reproduce the issue?

Status: RESOLVED → VERIFIED
Flags: needinfo?(longsonr)

This is a webrender bug so if webrender is not enabled you'll not see it. Different releases have different webrender default on/off rules.

Flags: needinfo?(longsonr)
Blocks: 1686654
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: