Skip to content

Add plumbing for safe printable inset to wptrunner and webdriver.#58030

Open
mstensho wants to merge 9 commits intomasterfrom
mstensho/wptrunner-safe-printable-inset
Open

Add plumbing for safe printable inset to wptrunner and webdriver.#58030
mstensho wants to merge 9 commits intomasterfrom
mstensho/wptrunner-safe-printable-inset

Conversation

@mstensho
Copy link
Copy Markdown
Contributor

@mstensho mstensho commented Feb 25, 2026

For print reftests, check <meta name="safe-printable-inset"> to simulate
an unprintable region along the paper edges. The content attribute
takes a non-negative number, which is the safe printable inset specified
in centimeters.

This is for testing the page-margin-safety descriptor in @page and
page margin box contexts.

Only implemented for executorwebdriver.

Spec: https://drafts.csswg.org/css-page-3/#page-margin-safety
Spec discussion: w3c/csswg-drafts#11395
RFC: web-platform-tests/rfcs#233
webdriver spec change: w3c/webdriver#1950

For background, see https://drafts.csswg.org/css-page-3/#printable-area

For print reftests, check <meta name="safe-printable-inset"> to simulate
an unprintable region along the paper edges. The `content` attribute
takes a non-negative number, which is the safe printable inset specified
in centimeters.

Only implemented for executorwebdriver.

Spec discussion: w3c/csswg-drafts#11395
Spec change: w3c/csswg-drafts#13190
RFC: web-platform-tests/rfcs#233

For background, see https://drafts.csswg.org/css-page-3/#printable-area
mstensho added a commit to mstensho/webdriver that referenced this pull request Feb 25, 2026
This is for testing the `page-margin-safety` descriptor in `@page` and
page margin box contexts.

Spec discussion: w3c/csswg-drafts#11395
Spec change: w3c/csswg-drafts#13190
RFC: web-platform-tests/rfcs#233

wptrunner and webdriver code changes:
web-platform-tests/wpt#58030
@mstensho mstensho marked this pull request as ready for review February 25, 2026 10:46
@wpt-pr-bot wpt-pr-bot added infra manifest webdriver wg-s_browser-tools-testing wptrunner The automated test runner, commonly called through ./wpt run labels Feb 25, 2026
@mstensho
Copy link
Copy Markdown
Contributor Author

mstensho commented Mar 4, 2026

The css-page spec changes have landed, and I've updated the description here accordingly. Please take a look!

Copy link
Copy Markdown
Contributor

@jonathan-j-lee jonathan-j-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM. Will stamp once the RFC lands.

Comment thread tools/manifest/item.py Outdated
Comment thread tools/wptrunner/wptrunner/executors/base.py Outdated
Comment thread tools/manifest/sourcefile.py
mstensho and others added 7 commits March 5, 2026 08:33
beckysiegel pushed a commit to chromium/chromium that referenced this pull request Apr 20, 2026
All css-page/ tests are run by the content_shell WPT runner anyway,
since the headless Chrome WPT runner implementation is incapable of
running pagination tests reliably.

Move existing printing/ tests for page margin safety to WPT. Marked as
tentative for now, awaiting the following to be resolved:
  w3c/webdriver#1950
  web-platform-tests/wpt#58030
  web-platform-tests/rfcs#233

Bug: 368070327
Change-Id: I1bd05c7c10dd12f49e7bc76132138190173eb71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7415846
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1617651}
chromium-wpt-export-bot pushed a commit that referenced this pull request Apr 20, 2026
All css-page/ tests are run by the content_shell WPT runner anyway,
since the headless Chrome WPT runner implementation is incapable of
running pagination tests reliably.

Move existing printing/ tests for page margin safety to WPT. Marked as
tentative for now, awaiting the following to be resolved:
  w3c/webdriver#1950
  #58030
  web-platform-tests/rfcs#233

Bug: 368070327
Change-Id: I1bd05c7c10dd12f49e7bc76132138190173eb71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7415846
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1617651}
chromium-wpt-export-bot pushed a commit that referenced this pull request Apr 20, 2026
All css-page/ tests are run by the content_shell WPT runner anyway,
since the headless Chrome WPT runner implementation is incapable of
running pagination tests reliably.

Move existing printing/ tests for page margin safety to WPT. Marked as
tentative for now, awaiting the following to be resolved:
  w3c/webdriver#1950
  #58030
  web-platform-tests/rfcs#233

Bug: 368070327
Change-Id: I1bd05c7c10dd12f49e7bc76132138190173eb71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7415846
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1617651}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra manifest webdriver wg-s_browser-tools-testing wptrunner The automated test runner, commonly called through ./wpt run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants