RESOLVED WONTFIX24571
Element is visible even if backface-visibility is 'hidden' and the back is facing towards the viewer.
https://bugs.webkit.org/show_bug.cgi?id=24571
Summary Element is visible even if backface-visibility is 'hidden' and the back is fa...
Kim Grönholm
Reported 2009-03-13 04:05:45 PDT
Element is visible even if backface-visibility is 'hidden' and the back is facing towards the viewer.
Attachments
Test case for backface visibility (470 bytes, text/html)
2009-03-13 04:07 PDT, Kim Grönholm
no flags
Patch to enable backface visibility property to have effect (1.29 KB, patch)
2009-03-13 04:10 PDT, Kim Grönholm
simon.fraser: review-
Kim Grönholm
Comment 1 2009-03-13 04:07:54 PDT
Created attachment 28574 [details] Test case for backface visibility A simple test case for -webkit-backface-visibility property
Kim Grönholm
Comment 2 2009-03-13 04:10:11 PDT
Created attachment 28575 [details] Patch to enable backface visibility property to have effect This small patch enables -webkit-backface-visibility CSS property to have effect and fixes the test case.
Simon Fraser (smfr)
Comment 3 2009-03-13 08:22:49 PDT
backface-visibility isn't supported unless you have rendering that supports 3d transforms. The fix is also incorrect, because you need to compute a transform relative to the root, and not just the container.
Simon Fraser (smfr)
Comment 4 2009-03-13 08:24:04 PDT
Comment on attachment 28575 [details] Patch to enable backface visibility property to have effect > Index: WebCore/rendering/RenderLayer.cpp > =================================================================== > --- WebCore/rendering/RenderLayer.cpp (revision 41663) > +++ WebCore/rendering/RenderLayer.cpp (working copy) > @@ -1955,6 +1955,12 @@ RenderLayer::paintLayer(RenderLayer* roo > TransformationMatrix transform; > transform.translate(x, y); > transform = *m_transform * transform; > + > + // Don't paint anything if backface-visibility is 'hidden' and the back is facing towards the viewer. > + if (renderer()->style()->backfaceVisibility() == BackfaceVisibilityHidden) { > + if (transform.inverse().m33() < 0) > + return; > + } This is wrong; backface-visibility has to take into account the transform to the root, not just the parent layer. It really needs to be implemented by the GraphicsLayer machinery.
Simon Fraser (smfr)
Comment 5 2009-05-27 13:43:33 PDT
backface-visibility is only supported when ACCELERATED_COMPOSITING is enabled, and in that situation it works. If you have a 3d rendering path that does not rely on ACCELERATED_COMPOSITING, then it presumably requires a bunch of extra changes which would also need to be committed.
Simon Fraser (smfr)
Comment 6 2010-04-13 17:55:29 PDT
*** Bug 37460 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.