Add safePrintableInset parameter for printing.#1950
Add safePrintableInset parameter for printing.#1950mstensho wants to merge 3 commits intow3c:masterfrom
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.
|
|
||
| <li><p>Let <var>safePrintableInset</var> be the result of <a>getting a | ||
| property with default</a> named "<code>safePrintableInset</code>" and with | ||
| default <code>0</code> from <var>parameters</var>. |
There was a problem hiding this comment.
This only defines the extraction of the safePrintableInset parameter but I do not see how it actually affects printing. So how can WebDriver actually control the right printing behavior of the browser?
I can see in the feature spec that page-margin-safety has the states none | clamp | add, while here a number is used. Will it be added as a paper setting similar to margin?
There was a problem hiding this comment.
This value is used to implement page-margin-safety. I added some spec text now.
For real printers in a real browser, try printing with Margins: Minimum. This is what this value is about. With page-margin-safety, this becomes web-exposed.
|
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 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
This change is