Implemented -zen-window-transform-origin attribute and applied it to the panels on the right side

This commit is contained in:
mr. m
2025-04-04 13:00:17 +02:00
parent 5b318a8aaf
commit 5d1963e0ec
9 changed files with 162 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp
index 01f724b0c42999107c4622323f849ddd2a6fe5c9..9dafa755c711c43c11835dfe9f7ba1b70b52b9a3 100644
--- a/layout/generic/nsIFrame.cpp
+++ b/layout/generic/nsIFrame.cpp
@@ -11694,6 +11694,11 @@ gfx::Matrix nsIFrame::ComputeWidgetTransform() const {
gfx::Matrix4x4 matrix = nsStyleTransformMatrix::ReadTransforms(
uiReset->mMozWindowTransform, refBox, float(appUnitsPerDevPixel));
+ const StyleTransformOrigin& origin = uiReset->mWindowTransformOrigin;
+ Point transformOrigin = nsStyleTransformMatrix::Convert2DPosition(
+ origin.horizontal, origin.vertical, refBox, appUnitsPerDevPixel);
+ matrix.ChangeBasis(Point3D(transformOrigin.x, transformOrigin.y, 0));
+
gfx::Matrix result2d;
if (!matrix.CanDraw2D(&result2d)) {
// FIXME: It would be preferable to reject non-2D transforms at parse time.