commit c8fca6785007339177f73b26287f371668dadacb
parent 77046d8e256fb0ee1dc0580c6e0dbdfa5697c910
Author: Tim Nguyen <nt1m@users.noreply.github.com>
Date: Thu, 6 Nov 2025 21:35:01 +0000
Bug 1997724 [wpt PR 55801] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=300026, a=testonly
Automatic update from web-platform-tests
WebKit export: [CSS Zoom] Apply zoom factor to border spacing (#55801)
https://bugs.webkit.org/show_bug.cgi?id=300026
Co-authored-by: Taher Ali <taher_ali@apple.com>
--
wpt-commits: 484931efa1e79fc00ec31c97855415dab55b3d89
wpt-pr: 55801
Diffstat:
4 files changed, 198 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/css/css-viewport/zoom/border-spacing-without-border.html b/testing/web-platform/tests/css/css-viewport/zoom/border-spacing-without-border.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>CSS zoom applies to border-spacing when specified and inherited</title>
+<link rel="help" href="https://drafts.csswg.org/css-viewport/">
+<link rel="match" href="reference/border-spacing-without-border-ref.html">
+
+<style>
+.table {
+ display: table;
+}
+.row {
+ display: table-row;
+}
+.cell {
+ display: table-cell;
+}
+.spacing {
+ border-collapse: separate;
+ border-spacing: 17px 11px;
+}
+.zoom {
+ zoom: 2;
+}
+</style>
+
+<div class="table spacing">
+ <div class="row">
+ <div class="cell">unzoomed</div>
+ <div class="cell">unzoomed</div>
+ </div>
+ <div class="row">
+ <div class="cell">unzoomed</div>
+ <div class="cell">unzoomed</div>
+ </div>
+</div>
+
+<div class="zoom spacing">
+ <div class="table">
+ <div class="row">
+ <div class="cell">zoomed</div>
+ <div class="cell">zoomed</div>
+ </div>
+ <div class="row">
+ <div class="cell">zoomed</div>
+ <div class="cell">zoomed</div>
+ </div>
+ </div>
+</div>
+
+<div class="spacing">
+ <div class="table zoom">
+ <div class="row">
+ <div class="cell">zoomed inherited</div>
+ <div class="cell">zoomed inherited</div>
+ </div>
+ <div class="row">
+ <div class="cell">zoomed inherited</div>
+ <div class="cell">zoomed inherited</div>
+ </div>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-viewport/zoom/reference/border-spacing-without-border-ref.html b/testing/web-platform/tests/css/css-viewport/zoom/reference/border-spacing-without-border-ref.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<title>CSS zoom applies to border-spacing when specified and inherited</title>
+<link rel="help" href="https://drafts.csswg.org/css-viewport/">
+
+<style>
+body {
+ --scale: 1;
+}
+.table {
+ display: table;
+}
+.row {
+ display: table-row;
+}
+.cell {
+ display: table-cell;
+ font-size: calc(1rem * var(--scale));
+}
+.spacing {
+ border-collapse: separate;
+ border-spacing: calc(17px * var(--scale)) calc(11px * var(--scale));
+}
+.zoom {
+ --scale: 2;
+}
+</style>
+
+<div class="table spacing">
+ <div class="row">
+ <div class="cell">unzoomed</div>
+ <div class="cell">unzoomed</div>
+ </div>
+ <div class="row">
+ <div class="cell">unzoomed</div>
+ <div class="cell">unzoomed</div>
+ </div>
+</div>
+
+<div class="table spacing zoom">
+ <div class="row">
+ <div class="cell">zoomed</div>
+ <div class="cell">zoomed</div>
+ </div>
+ <div class="row">
+ <div class="cell">zoomed</div>
+ <div class="cell">zoomed</div>
+ </div>
+</div>
+
+<div class="table spacing zoom">
+ <div class="row">
+ <div class="cell">zoomed inherited</div>
+ <div class="cell">zoomed inherited</div>
+ </div>
+ <div class="row">
+ <div class="cell">zoomed inherited</div>
+ <div class="cell">zoomed inherited</div>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/svg/styling/border-spacing-svg-zoom-table-display-ref.html b/testing/web-platform/tests/svg/styling/border-spacing-svg-zoom-table-display-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .container {
+ width: 400px;
+ height: 100px;
+ }
+
+ .table-group {
+ display: table;
+ border-spacing: 10px;
+ border-collapse: separate;
+ }
+
+ .table-row {
+ display: table-row;
+ }
+
+ .table-cell {
+ display: table-cell;
+ }
+</style>
+</head>
+<body>
+<div class="container">
+ <svg width="100%" height="100%">
+ <g class="table-group">
+ <g class="table-row">
+ <rect class="table-cell" x="0" y="0" width="120" height="80" />
+ <rect class="table-cell" x="160" y="0" width="120" height="80" />
+ </g>
+ </g>
+ </svg>
+</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/svg/styling/border-spacing-svg-zoom-table-display.html b/testing/web-platform/tests/svg/styling/border-spacing-svg-zoom-table-display.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Tables: border-spacing with display: table on non-root SVG</title>
+<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#separated-borders">
+<link rel="help" href="https://www.w3.org/TR/css-tables-3/#separated-borders">
+<link rel="match" href="border-spacing-svg-zoom-table-display-ref.html">
+<style>
+ .container {
+ width: 400px;
+ height: 100px;
+ }
+
+ .table-group {
+ display: table;
+ border-spacing: 10px;
+ border-collapse: separate;
+ }
+
+ .table-row {
+ display: table-row;
+ }
+
+ .table-cell {
+ display: table-cell;
+ }
+</style>
+</head>
+<body>
+<div class="container">
+ <svg width="100%" height="100%" style="zoom: 2.0;">
+ <g class="table-group">
+ <g class="table-row">
+ <rect class="table-cell" x="0" y="0" width="60" height="40" />
+ <rect class="table-cell" x="80" y="0" width="60" height="40" />
+ </g>
+ </g>
+ </svg>
+</div>
+</body>
+</html>