Add safePrintableInset parameter for printing.#1950
Add safePrintableInset parameter for printing.#1950mstensho wants to merge 2 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.
index.html
Outdated
| <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.
This is for testing the
page-margin-safetydescriptor in@pageandpage 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
Preview | Diff