-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browsing context: print: enforce minimum page size dimensions #522
Conversation
The minimum possible page size is 1x1 point. 1 point is equal to (2.54 / 72) cm. Docs: https://www.w3.org/TR/css3-values/#absolute-lengths Docs: https://stackoverflow.com/questions/139655/convert-pixels-to-points Fixed: #473
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. These changes are in sync with the outcome of the discussion during our W3C meeting. And yes points are the right unit to use here given that this is generally used for printing.
SHA: 3535c86 Reason: push, by thiagowfx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This original PR (#522) used invalid syntax for the minimum size.
This original PR (#522) used invalid syntax for the minimum size.
This original PR (#522) used invalid syntax for the minimum size.
…oint (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <[email protected]> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <[email protected]> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <[email protected]> Co-authored-by: Henrik Skupin <[email protected]>
…operation for empty content areas Closes: #40870 Follow-up-of: #40872 Spec: w3c/webdriver-bidi#522
…ent area with less than 1x1 point, a=testonly Automatic update from web-platform-tests [wdspec] bidi: print: add tests for content area with less than 1x1 point (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <[email protected]> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <[email protected]> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <[email protected]> Co-authored-by: Henrik Skupin <[email protected]> -- wpt-commits: e55288f2bc38fe1fce8093c116248582b05e4c33 wpt-pr: 40872
…ent area with less than 1x1 point, a=testonly Automatic update from web-platform-tests [wdspec] bidi: print: add tests for content area with less than 1x1 point (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <jdescottesmozilla.com> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <mailhskupin.info> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <jdescottesmozilla.com> Co-authored-by: Henrik Skupin <mailhskupin.info> -- wpt-commits: e55288f2bc38fe1fce8093c116248582b05e4c33 wpt-pr: 40872 UltraBlame original commit: aa78237031114b2eec468304678407198cf94fa6
…ent area with less than 1x1 point, a=testonly Automatic update from web-platform-tests [wdspec] bidi: print: add tests for content area with less than 1x1 point (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <jdescottesmozilla.com> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <mailhskupin.info> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <jdescottesmozilla.com> Co-authored-by: Henrik Skupin <mailhskupin.info> -- wpt-commits: e55288f2bc38fe1fce8093c116248582b05e4c33 wpt-pr: 40872 UltraBlame original commit: aa78237031114b2eec468304678407198cf94fa6
…ent area with less than 1x1 point, a=testonly Automatic update from web-platform-tests [wdspec] bidi: print: add tests for content area with less than 1x1 point (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <[email protected]> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <[email protected]> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <[email protected]> Co-authored-by: Henrik Skupin <[email protected]> -- wpt-commits: e55288f2bc38fe1fce8093c116248582b05e4c33 wpt-pr: 40872
…ent area with less than 1x1 point, a=testonly Automatic update from web-platform-tests [wdspec] bidi: print: add tests for content area with less than 1x1 point (#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: #40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <jdescottesmozilla.com> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <mailhskupin.info> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <jdescottesmozilla.com> Co-authored-by: Henrik Skupin <mailhskupin.info> -- wpt-commits: e55288f2bc38fe1fce8093c116248582b05e4c33 wpt-pr: 40872 UltraBlame original commit: aa78237031114b2eec468304678407198cf94fa6
…oint (web-platform-tests#40872) * [wdspec] bidi: print: fail gracefully for empty page dimensions Chromium cannot print pages with 0x0 content area. Closes: web-platform-tests#40870 * check for UnsupportedOperationException * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Julian Descottes <[email protected]> * update test to match spec update Spec: w3c/webdriver-bidi#522 * add new tests for minimum page dimensions with margins * add new tests for invalid small page dimensions * add inch_in_point, replace inch_in_point and inch_in_cm usages * fix typo: page -> margin * add missing pytest fixture * fix indentation error, round up fraction * Update webdriver/tests/bidi/browsing_context/print/margin.py Co-authored-by: Henrik Skupin <[email protected]> * test: address some review comments * test: address some more review comments * test: add pt_to_cm, fix background test * test: extend test_params_page_invalid_value * make expected_width and expected_height more readable * dimensions: 0.01 -> 0.03 * extract constants for default page width and height * use constant in f-string as well --------- Co-authored-by: Julian Descottes <[email protected]> Co-authored-by: Henrik Skupin <[email protected]>
The minimum possible page size is 1x1 point.
1 point is equal to (2.54 / 72) cm.
Docs: https://www.w3.org/TR/css3-values/#absolute-lengths
Docs: https://stackoverflow.com/questions/139655/convert-pixels-to-points
WPT: web-platform-tests/wpt#40872
Fixed: #473
Preview | Diff