Canvas with a WebGL context does not obey parent element's backface-visibility: hidden
Reported by
baseten....@gmail.com,
Jul 1 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. Put a canvas with a WebGL context inside a container element 2. Set backface-visibility: hidden and transform: rotateY(180deg) on the parent element What is the expected behavior? The canvas should no longer be visible What went wrong? The canvas is visible. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 59.0.3071.115 Channel: stable OS Version: OS X 10.11.6 Flash Version: In the test case you can see backface-visibility: hidden will work correctly if the canvas itself is rotated, but not the parent. Neither setting transform-style: preserve-3d or backface-visibility: hidden directly on the canvas element itself will work round the issue and in fact setting backface-visibility: hidden on the canvas element will also cause this bug to occur on a canvas with a 2d context. Appears to be related to this fixed bug: https://bugs.chromium.org/p/chromium/issues/detail?id=99812
,
Jul 17 2017
The problem also happens with 2D canvases when the size of the canvas is greater than 256 by 256, which triggers the GPU rendering code path. Both WebGL and and GPU-acelerated 2D put the canvas contents into a separate compositing layer. What seems to be happening is that the child content layer is not inheriting the backface visibility from the parent layer.
In the debugger, I was able to verify that we are indeed calling SetUseParentBackfaceVisibility(true); on the GraphicsLayer for the canvas content, but it does not look like this setting is being honored.
#0 blink::GraphicsLayer::SetupContentsLayer (this=0x3eb3188cda10,
contents_layer=0x846e1640c0)
at ../../third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp:431
#1 0x00007f02f04ff4fd in blink::GraphicsLayer::SetContentsTo (
this=0x3eb3188cda10, layer=0x846e1640c0)
at ../../third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp:406
#2 0x00007f02f242496d in blink::GraphicsLayer::SetContentsToPlatformLayer (
this=0x3eb3188cda10, layer=0x846e1640c0)
at ../../third_party/WebKit/Source/platform/graphics/GraphicsLayer.h:210
#3 0x00007f02f2b345d2 in blink::CompositedLayerMapping::UpdateGraphicsLayerConfiguration (this=0x3eb3188c0fd0)
at ../../third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:790
#4 0x00007f02f2b56eaf in blink::GraphicsLayerUpdater::UpdateRecursive (
this=0x7fffdd1fc608, layer=...,
update_type=blink::GraphicsLayerUpdater::kForceUpdate, context=...,
layers_needing_paint_invalidation=...)
at ../../third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp:110
Re-categorizing as a compositing bug for further triage.
,
Jul 17 2017
,
Jul 18 2017
,
Jul 19
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. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 19
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sandeepkumars@chromium.org
, Jul 5 2017Status: Untriaged (was: Unconfirmed)