New issue
Advanced search Search tips

Issue 616864 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 666416
Owner: ----
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

foreignobject incorrectly displayed when opacity is on

Reported by sdebl...@itesmedia.tv, Jun 2 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0 Cyberfox/46.0.3

Example URL:
https://jsfiddle.net/7gd4u2z1/4/

Steps to reproduce the problem:
1. Add a foreignobject with text as content in a svg
2. Use a non zero value for x or y of that foreignobject
3. Set both width and height of foreignobject to make sure that the text is on multiple lines (Not sure if necessary)
4. Use the opacity attribute or apply opacity using css

What is the expected behavior?
The text should not be cut

What went wrong?
See attached screenshot:
-The screenshot was taken with the foreignobject highlighted using the inspector.
-The white background and text should fill the blue section.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 52.0.2709.0  Channel: dev
OS Version: 10.0
Flash Version: 21.0.0.242
 
2016-06-02 16_00_24-Developer Tools - https___jsfiddle.net_.png
19.1 KB View Download

Comment 1 by f...@opera.com, Jun 3 2016

Components: -Blink Blink>SVG
Labels: -OS-Windows
Status: Available (was: Unconfirmed)
Status: Assigned (was: Available)
Owner: shanmug...@samsung.com
Status: Started (was: Assigned)
This is probably the same issue: transforms are not applied when rendering foreignObject with opacity.

The red and green square are different only in their opacity, one is transformed, the other is not:
http://codepen.io/hanger/pen/Pzjayr?editors=1000

<svg width="400" height="400">
  <!-- not just translate, rotate(10) also not applied etc -->
  <g transform="translate(200, 200)">
    <foreignObject width="100" height="100">
      <div style="width:100px; height:100px; background: green; opacity:1.0"></div>
    </foreignObject>  
    <!-- exactly the same except opacity != 1 -->
    <foreignObject width="100" height="100">
      <div style="width:100px; height:100px; background: red; opacity:0.9"></div>
    </foreignObject>
    <!-- all the squares should line up -->
    <rect stroke="black" stroke-width="3" fill="none" width="100" height="100" />
  </g>
</svg>

getBoundingClientRect() returns the same for both divs.
It's not just opacity either, setting position:relative triggers the same behavior:

<foreignObject width="100" height="100">
  <div style="width:100px; height:100px; background: orange; position:relative"></div>
</foreignObject>

Comment 7 by f...@opera.com, Jul 5 2016

That (both, I think) is  issue 578682  (or one of the handful of similar issues.)
And it's all because we don't have layers inside SVG, I presume.
Owner: ----
Status: Available (was: Started)
Project Member

Comment 10 by sheriffbot@chromium.org, Aug 16 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by f...@opera.com, Aug 16 2017

Labels: -Hotlist-Recharge-Cold
Mergedinto: 666416
Status: Duplicate (was: Untriaged)
Looks like this was fixed by f451d9b5de5a1b4691d60d8c74341ac8a466cf57. Duping to  issue 666416 .

Sign in to add a comment