Bug 241699

Summary: TextureMapper: nesting 3D rendering context support
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cgarcia, magomez, mattwoodrow, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=113455
Bug Depends on: 244526    
Bug Blocks:    
Attachments:
Description Flags
test case
none
WIP patch none

Description Fujii Hironori 2022-06-16 13:56:54 PDT
Created attachment 460275 [details]
test case

TextureMapperGL: rendering glitch of a 3d transformed text in Strange-Loop-2012

hyper texts in the slides aren't painted as expected if they are :hover.
https://github.com/BrendanEich/Strange-Loop-2012
Comment 1 Fujii Hironori 2022-06-16 18:30:26 PDT
Safari, Chrome, Firefox: Very smooth animation
WebKitGTK, WinCairo WK1: not smooth animation
WinCairo WK2: not smooth animation, text disappears
Comment 2 Fujii Hironori 2022-06-19 13:38:15 PDT
Disabling tet depth test makes the animation smooth. This seems to be a regression of my change (231816@main) enabling depth test.

diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
index f4d99408ff15..3890e1fa8c82 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
@@ -1043,7 +1043,6 @@ IntRect TextureMapperGL::clipBounds()
 
 void TextureMapperGL::beginPreserves3D()
 {
-    glEnable(GL_DEPTH_TEST);
     glClear(GL_DEPTH_BUFFER_BIT);
 }
Comment 3 Fujii Hironori 2022-06-19 14:20:28 PDT
In this test case, <section> and <span> elements has transform-style:preseve-3d, but intermediate <a> element doesn't have it.
This is the case not supported as 231816@main change log explains.

<section> transform-style:preseve-3d
 +<a>
   +<span> transform-style:preseve-3d
     +<span::after>
Comment 4 Radar WebKit Bug Importer 2022-06-23 13:57:11 PDT
<rdar://problem/95804784>
Comment 5 Fujii Hironori 2022-10-16 18:45:19 PDT
Created attachment 463018 [details]
WIP patch
Comment 6 Matt Woodrow 2022-11-24 11:00:28 PST
In https://github.com/WebKit/WebKit/pull/6770 I'm adding 3 new TestExpectation annotations for this bug, for 3d tests that now pass on Mac/iOS, but still fail on GTK due to this bug (I think!).