Add safePrintableInset parameter for printing. - #1950
Conversation
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
|
@AutomatedTester it's been a while since I contributed to this spec. I seem to have write access so I could review and merge this, but what's the proper procedure these days? |
|
@gsnedders @jgraham could you take a look? |
whimboo
left a comment
There was a problem hiding this comment.
As referenced this is not yet a public available feature so we need to wait until the feature spec is done. Nevertheless here a quick feedback.
Upon agreement it might be good to as well to get it added to WebDriver BiDi.
| <li><p>If <var>safePrintableInset</var> is not a <a>Number</a>, or is a | ||
| negative number, return <a>error</a> with <a>error code</a> <a>invalid | ||
| argument</a>. | ||
|
|
There was a problem hiding this comment.
Lets stay in sync with other params and avoid adding line breaks within a definition:
| <li><p>If <var>safePrintableInset</var> is not a <a>Number</a>, or is a | |
| negative number, return <a>error</a> with <a>error code</a> <a>invalid | |
| argument</a>. | |
| <li><p>If <var>safePrintableInset</var> is not a <a>Number</a>, or is less then 0, return <a>error</a> with <a>error code</a> <a>invalid argument</a>. |
There was a problem hiding this comment.
Ok. but not taken verbatim. Less than 0.
|
The spec changes have landed, and I've updated the description here accordingly. Please take a look. |
|
Friendly ping @whimboo :) |
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}
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}
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}
… content_shell WPT runner., a=testonly Automatic update from web-platform-tests Add META safe-printable-inset support to content_shell WPT runner. 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} -- wpt-commits: eeb12c584799b1a761e3b9c19e7453f0791ca7ed wpt-pr: 59363
|
This has been stuck in review for some time. |
| <p>The value of <var>safePrintableInset</var> 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 | ||
| <a href="https://drafts.csswg.org/css-page-3/#page-margin-safety">CSS rules</a> | ||
| to adjust page margins based on this. |
There was a problem hiding this comment.
This should cross-reference https://drafts.csswg.org/css-page-3/#printable-area, should it not? We don't need to redefine what a printable/unprintable area is when we can just cross-reference it.
I'd be tempted to say something more along the lines of:
The value of
safePrintableInsetdefines the width [ XXX: in what units? presumably cm to match everything else in WebDriver? ] of the non-printable area on all sides of the page sheet.
With the current text here I genuinely don't know where to start, because I don't know what this corresponds to, and what I'm meant to be changing as an implementer.
But also: shouldn't this just be in the table above? You're changing properties of the "paper" that CSS is targeting, right?
This is for testing the
page-margin-safetydescriptor in@pageandpage margin box contexts.
Spec: https://drafts.csswg.org/css-page-3/#page-margin-safety
Spec discussion: w3c/csswg-drafts#11395
RFC: web-platform-tests/rfcs#233
wptrunner and webdriver code changes:
web-platform-tests/wpt#58030
Preview | Diff