From 1891456b6eba0b827c53e8463b69eca2fcd9b76c Mon Sep 17 00:00:00 2001 From: Morten Stenshorne Date: Wed, 25 Feb 2026 08:41:44 +0100 Subject: [PATCH 1/2] Add safePrintableInset parameter for printing. This is for testing the `page-margin-safety` descriptor in `@page` and page margin box contexts. Spec discussion: https://github.com/w3c/csswg-drafts/issues/11395 Spec change: https://github.com/w3c/csswg-drafts/pull/13190 RFC: https://github.com/web-platform-tests/rfcs/pull/233 wptrunner and webdriver code changes: https://github.com/web-platform-tests/wpt/pull/58030 --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index f2d116d7..3a540a3e 100644 --- a/index.html +++ b/index.html @@ -11313,6 +11313,14 @@

Print Page

  • If shrinkToFit is not a Boolean return error with error code invalid argument. +

  • Let safePrintableInset be the result of getting a + property with default named "safePrintableInset" and with + default 0 from parameters. + +

  • If safePrintableInset is not a Number, or is a + negative number, return error with error code invalid + argument. +

  • Let pageRanges be the result of getting a property with default named "pageRanges" from parameters with default of an From 75e3e5af787e22d2f909732343c918c52a5b556d Mon Sep 17 00:00:00 2001 From: Morten Stenshorne Date: Fri, 27 Feb 2026 08:30:03 +0100 Subject: [PATCH 2/2] Code review --- index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 3a540a3e..6483d648 100644 --- a/index.html +++ b/index.html @@ -11317,9 +11317,8 @@

    Print Page

    property with default named "safePrintableInset" and with default 0 from parameters. -
  • If safePrintableInset is not a Number, or is a - negative number, return error with error code invalid - argument. +

  • If safePrintableInset is not a Number, or is less than 0, + return error with error code invalid argument.

  • Let pageRanges be the result of getting a property with default named "pageRanges" from @@ -11372,6 +11371,13 @@

    Print Page

    page width specified in the content +

    The value of safePrintableInset defines the minimum inset along + each page edge needed to steer clear of the area that the printer is potentially + incapable of marking reliably. Most printers have a small region along each + edge of the page sheet which is unprintable, typically due to the printer's + paper handling mechanism. The document that is being printed may have CSS rules + to adjust page margins based on this. TODO: Link to spec, when it has landed? +

  • If pageRanges is not an empty Array, Let pages be the result of trying to parse a page range with arguments pageRanges and the number of