RESOLVED FIXED 116856
<svg> with opacity and compositing double-applies its opacity
https://bugs.webkit.org/show_bug.cgi?id=116856
Summary <svg> with opacity and compositing double-applies its opacity
Tim Horton
Reported 2013-05-28 02:06:08 PDT
Created attachment 203029 [details] testcase See attached testcase; the <svg> that has both opacity: 0.5 and -webkit-transform: translateZ(0); is lighter in color than the others.
Attachments
testcase (628 bytes, text/html)
2013-05-28 02:06 PDT, Tim Horton
no flags
screenshot (11.80 KB, image/png)
2013-05-28 02:07 PDT, Tim Horton
no flags
Patch (4.27 KB, patch)
2014-05-12 13:10 PDT, Dirk Schulze
simon.fraser: review+
simon.fraser: commit-queue-
Patch for landing (4.28 KB, patch)
2014-05-12 13:36 PDT, Dirk Schulze
no flags
Patch for landing (4.28 KB, patch)
2014-05-12 15:11 PDT, Dirk Schulze
no flags
Patch (3.76 KB, patch)
2014-05-26 20:42 PDT, Philip Rogers
no flags
Radar WebKit Bug Importer
Comment 1 2013-05-28 02:06:44 PDT
Tim Horton
Comment 2 2013-05-28 02:07:02 PDT
Created attachment 203030 [details] screenshot
Dirk Schulze
Comment 3 2014-05-12 07:46:17 PDT
We create a transparency layer on all SVG elements if opacity was specified. Looks like creating a compositing layer does it in GraphicsLayer as well? A simple check in RenderSVGRoot should prevent this, no?
Dirk Schulze
Comment 4 2014-05-12 13:10:57 PDT
Created attachment 231316 [details] Patch Patch
Simon Fraser (smfr)
Comment 5 2014-05-12 13:29:53 PDT
Comment on attachment 231316 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231316&action=review > Source/WebCore/rendering/svg/SVGRenderingContext.cpp:104 > + float opacity = isRenderingMask || (renderer.hasLayer() && renderer.enclosingLayer()->isComposited()) ? 1 : style.opacity(); You should do hasLayer() && toRenderLayerModelObject(renderer)->layer()->isComposited()).
Dirk Schulze
Comment 6 2014-05-12 13:36:44 PDT
Created attachment 231318 [details] Patch for landing
Dirk Schulze
Comment 7 2014-05-12 15:11:26 PDT
Created attachment 231329 [details] Patch for landing
WebKit Commit Bot
Comment 8 2014-05-12 15:58:16 PDT
Comment on attachment 231329 [details] Patch for landing Clearing flags on attachment: 231329 Committed r168651: <http://trac.webkit.org/changeset/168651>
WebKit Commit Bot
Comment 9 2014-05-12 15:58:22 PDT
All reviewed patches have been landed. Closing bug.
Philip Rogers
Comment 10 2014-05-26 20:41:58 PDT
Reopening to attach new patch.
Philip Rogers
Comment 11 2014-05-26 20:42:04 PDT
WebKit Commit Bot
Comment 12 2014-05-26 22:24:27 PDT
Comment on attachment 232105 [details] Patch Clearing flags on attachment: 232105 Committed r169368: <http://trac.webkit.org/changeset/169368>
WebKit Commit Bot
Comment 13 2014-05-26 22:24:33 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.