Issue metadata
Sign in to add a comment
|
foreignobject incorrectly displayed when opacity is on
Reported by
sdebl...@itesmedia.tv,
Jun 2 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: 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
,
Jun 3 2016
,
Jun 3 2016
,
Jun 7 2016
,
Jul 5 2016
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.
,
Jul 5 2016
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>
,
Jul 5 2016
That (both, I think) is issue 578682 (or one of the handful of similar issues.)
,
Jul 6 2016
And it's all because we don't have layers inside SVG, I presume.
,
Aug 16 2016
,
Aug 16 2017
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
,
Aug 16 2017
Looks like this was fixed by f451d9b5de5a1b4691d60d8c74341ac8a466cf57. Duping to issue 666416 . |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by f...@opera.com
, Jun 3 2016Labels: -OS-Windows
Status: Available (was: Unconfirmed)