From 8ab167e4b1c7aa77b90e3c9d7685454a7c248379 Mon Sep 17 00:00:00 2001 From: Blink WPT Bot Date: Fri, 31 May 2024 11:04:40 -0700 Subject: [PATCH] Need to include non-auto margins when resolving auto margins. (#46517) Make sure that an auto margin doesn't receive the space actually taken up by the non-auto margin on the other side of the box. Didn't get this right for @page auto margins. Bug: 40286153 Change-Id: Iff877c6f0ad9ecee594f51ef7b4ca5f71eb3be26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5573406 Commit-Queue: Morten Stenshorne Reviewed-by: Ian Kilpatrick Cr-Commit-Position: refs/heads/main@{#1307087} Co-authored-by: Morten Stenshorne --- ...ge-margin-auto-and-non-zero-print-ref.html | 41 +++++++++++++++ .../page-margin-auto-and-non-zero-print.html | 52 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 css/css-page/page-margin-auto-and-non-zero-print-ref.html create mode 100644 css/css-page/page-margin-auto-and-non-zero-print.html diff --git a/css/css-page/page-margin-auto-and-non-zero-print-ref.html b/css/css-page/page-margin-auto-and-non-zero-print-ref.html new file mode 100644 index 00000000000000..5f9be531886c9a --- /dev/null +++ b/css/css-page/page-margin-auto-and-non-zero-print-ref.html @@ -0,0 +1,41 @@ + + + +
+
center / middle
+
+
+
center / top
+
+
+
center / bottom
+
+
+
top / left
+
+
+
top / right
+
+
+
bottom / right
+
diff --git a/css/css-page/page-margin-auto-and-non-zero-print.html b/css/css-page/page-margin-auto-and-non-zero-print.html new file mode 100644 index 00000000000000..6287c2a1032c79 --- /dev/null +++ b/css/css-page/page-margin-auto-and-non-zero-print.html @@ -0,0 +1,52 @@ + + + + + +
+ center / middle +
+
+ center / top +
+
+ center / bottom +
+
+ top / left +
+
+ top / right +
+
+ bottom / right +