Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11313,6 +11313,13 @@ <h3><dfn>Print Page</dfn></h3>
<li><p>If <var>shrinkToFit</var> is not a <a>Boolean</a>
return <a>error</a> with <a>error code</a> <a>invalid argument</a>.

<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>.
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Author

Choose a reason for hiding this comment

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

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.


<li><p>If <var>safePrintableInset</var> is not a <a>Number</a>, or is less than 0,
return <a>error</a> with <a>error code</a> <a>invalid argument</a>.

<li><p>Let <var>pageRanges</var> be the result of <a>getting a
property with default</a> named "<code>pageRanges</code>" from
<var>parameters</var> with default of an
Expand Down Expand Up @@ -11364,6 +11371,13 @@ <h3><dfn>Print Page</dfn></h3>
page width specified in the content
</dl>

<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 CSS rules
to adjust page margins based on this. TODO: Link to spec, when it has landed?

<li><p>If <var>pageRanges</var> is not an empty <a>Array</a>,
Let <var>pages</var> be the result of <a>trying</a> to <a>parse a
page range</a> with arguments <var>pageRanges</var> and the number of
Expand Down