Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d540c3a65defff5841b61e8acb5e2105a5ef4e0
      
https://github.com/WebKit/WebKit/commit/2d540c3a65defff5841b61e8acb5e2105a5ef4e0
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    A 
LayoutTests/transforms/3d/hit-testing/perspective-past-horizon-expected.txt
    A LayoutTests/transforms/3d/hit-testing/perspective-past-horizon.html
    M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
    M Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
    M Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp

  Log Message:
  -----------
  TransformationMatrix::clampedBoundsOfProjectedQuad() mirrors corners behind 
the eye
https://bugs.webkit.org/show_bug.cgi?id=324623

Reviewed by Simon Fraser.

TransformationMatrix::clampedBoundsOfProjectedQuad() projected every corner of
the quad on its own, and a corner behind the eye comes out mirrored onto the
side of the plane that is not visible, so the bounds could cover only the part
that cannot be seen. Cut the quad along the eye plane first and divide by w
afterwards.

GraphicsLayerCoordinated::updateVisibleRect() maps the viewport onto a layer
with it, so a layer seen past its horizon never got tiles for the part of it
that is on screen.

HitTestingTransformState uses the same function to map an area into a plane, so
the bounds of a hit test across the eye plane change with it. A plane turned far
enough away from the camera that its near half crosses the eye plane took no
hits at all on the half that is on screen, since the mirrored bounds covered
only the half that is not visible.

This fixes the WPT test imported/w3c/web-platform-tests/css/filter-effects/
filter-in-3d-transformed-ancestor-child-near-eye-plane.html for GTK/WPE.

Tests: LayoutTests/transforms/3d/hit-testing/perspective-past-horizon.html
       Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp

* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/transforms/3d/hit-testing/perspective-past-horizon-expected.txt: 
Added.
* LayoutTests/transforms/3d/hit-testing/perspective-past-horizon.html: Added.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::clampEdgeValue):
(WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad const):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:
* Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::TEST(TransformationMatrix, 
ClampedBoundsOfProjectedQuadAcrossEyePlane)):

Canonical link: https://commits.webkit.org/321633@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to