Bug 255265

Summary: elementsFromPoint doesn't handle sorting preserve-3d
Product: WebKit Reporter: Matt Woodrow <mattwoodrow>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Testcase none

Matt Woodrow
Reported 2023-04-10 18:33:51 PDT
RenderLayer::hitTestLayer only handles finding a single hit layer when we're doing 3d depth sorting for transform-style:preserve-3d. If we're using elementsFromPoint and want to return all the elements at the point, we don't handle sorting these by depth. I think we need to collect a list of HitTestResult objects (and HitLayer objects), with the associated depth, and then sort the result by depth at the end and merge into a single HitTestResult object. This list would need to be passed into RenderLayer::hitTestList so that we can append to it from there rather than returning a single result from hitTestList.
Attachments
Testcase (1.09 KB, text/html)
2023-04-10 18:36 PDT, Matt Woodrow
no flags
Radar WebKit Bug Importer
Comment 1 2023-04-10 18:34:09 PDT
Matt Woodrow
Comment 2 2023-04-10 18:34:15 PDT
It looks like blink has the same bug here, but Gecko gets it right.
Matt Woodrow
Comment 3 2023-04-10 18:36:20 PDT
Created attachment 465841 [details] Testcase
Note You need to log in before you can comment on or make changes to this bug.