OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8"> |
| 5 <title>CSS Writing Modes: parsing text-combine-upright with digits plus calc() c
omputing to invalid digits</title> |
| 6 <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYaku
ra"> |
| 7 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-up
right"> |
| 8 <link rel="help" href="http://www.w3.org/TR/css-values-3/#calc-notation"> |
| 9 <meta name="assert" content="User Agents ignore text-combine-upright with values
`digits calc(...)` if the expression inside `calc()` computes to either numbers
or out-of-range integers."> |
| 10 <meta name="flags" content="dom invalid"> |
| 11 <script src="../../../resources/testharness.js"></script> |
| 12 <script src="../../../resources/testharnessreport.js"></script> |
| 13 |
| 14 <style> |
| 15 #invalid_digits_calc_0_plus_1 { |
| 16 -webkit-text-combine: digits calc(0 + 1); |
| 17 } |
| 18 |
| 19 #invalid_digits_calc_2_plus_3 { |
| 20 -webkit-text-combine: digits calc(2 + 3); |
| 21 } |
| 22 |
| 23 #invalid_digits_calc_4_minus_3 { |
| 24 -webkit-text-combine: digits calc(4 - 3); |
| 25 } |
| 26 |
| 27 #invalid_digits_calc_10_minus_3 { |
| 28 -webkit-text-combine: digits calc(10 - 3); |
| 29 } |
| 30 |
| 31 #invalid_digits_calc_3_times_1_0 { |
| 32 -webkit-text-combine: digits calc(3 * 1.0); |
| 33 } |
| 34 |
| 35 #invalid_digits_calc_2_0_times_2 { |
| 36 -webkit-text-combine: digits calc(2.0 * 2); |
| 37 } |
| 38 |
| 39 #invalid_digits_calc_2_dividedby_1_0 { |
| 40 -webkit-text-combine: digits calc(2 / 1.0); |
| 41 } |
| 42 |
| 43 #invalid_digits_calc_4_0_dividedby_2 { |
| 44 -webkit-text-combine: digits calc(4.0 / 2); |
| 45 } |
| 46 |
| 47 #invalid_digits_calc_2_e_0_times_2_e_positive0 { |
| 48 -webkit-text-combine: digits calc(2e0 * 2e+0); |
| 49 } |
| 50 |
| 51 #invalid_digits_calc_2_e_2_times_2_e_negative2 { |
| 52 -webkit-text-combine: digits calc(2e2 * 2e-2); |
| 53 } |
| 54 |
| 55 #invalid_digits_calc_4_e_positive2_dividedby_positive2_e_2 { |
| 56 -webkit-text-combine: digits calc(4e+2 / +2e2); |
| 57 } |
| 58 </style> |
| 59 </head> |
| 60 <body> |
| 61 |
| 62 <div id="invalid_digits_calc_0_plus_1"></div> |
| 63 <div id="invalid_digits_calc_2_plus_3"></div> |
| 64 <div id="invalid_digits_calc_4_minus_3"></div> |
| 65 <div id="invalid_digits_calc_10_minus_3"></div> |
| 66 <div id="invalid_digits_calc_3_times_1_0"></div> |
| 67 <div id="invalid_digits_calc_2_0_times_2"></div> |
| 68 <div id="invalid_digits_calc_2_dividedby_1_0"></div> |
| 69 <div id="invalid_digits_calc_4_0_dividedby_2"></div> |
| 70 <div id="invalid_digits_calc_2_e_0_times_2_e_positive0"></div> |
| 71 <div id="invalid_digits_calc_2_e_2_times_2_e_negative2"></div> |
| 72 <div id="invalid_digits_calc_4_e_positive2_dividedby_positive2_e_2"></div> |
| 73 |
| 74 <div id="log"></div> |
| 75 |
| 76 <script> |
| 77 var getComputedValueFor = function (id) { |
| 78 var element = document.getElementById(id); |
| 79 return window.getComputedStyle(element).textCombineUpright; |
| 80 }; |
| 81 |
| 82 test(function () { |
| 83 assert_equals(getComputedValueFor('invalid_digits_calc_0_plus_1'), 'none'); |
| 84 }, 'Computed value for `text-combine-upright: digits calc(0 + 1)` is `none`'); |
| 85 |
| 86 test(function () { |
| 87 assert_equals(getComputedValueFor('invalid_digits_calc_2_plus_3'), 'none'); |
| 88 }, 'Computed value for `text-combine-upright: digits calc(2 + 3)` is `none`'); |
| 89 |
| 90 test(function () { |
| 91 assert_equals(getComputedValueFor('invalid_digits_calc_4_minus_3'), 'none'); |
| 92 }, 'Computed value for `text-combine-upright: digits calc(4 - 3)` is `none`'); |
| 93 |
| 94 test(function () { |
| 95 assert_equals(getComputedValueFor('invalid_digits_calc_10_minus_3'), 'none'); |
| 96 }, 'Computed value for `text-combine-upright: digits calc(10 - 3)` is `none`'); |
| 97 |
| 98 test(function () { |
| 99 assert_equals(getComputedValueFor('invalid_digits_calc_3_times_1_0'), 'none'); |
| 100 }, 'Computed value for `text-combine-upright: digits calc(3 * 1.0)` is `none`'); |
| 101 |
| 102 test(function () { |
| 103 assert_equals(getComputedValueFor('invalid_digits_calc_2_0_times_2'), 'none'); |
| 104 }, 'Computed value for `text-combine-upright: digits calc(2.0 * 2)` is `none`'); |
| 105 |
| 106 test(function () { |
| 107 assert_equals(getComputedValueFor('invalid_digits_calc_2_dividedby_1_0'), 'non
e'); |
| 108 }, 'Computed value for `text-combine-upright: digits calc(2 / 1.0)` is `none`'); |
| 109 |
| 110 test(function () { |
| 111 assert_equals(getComputedValueFor('invalid_digits_calc_4_0_dividedby_2'), 'non
e'); |
| 112 }, 'Computed value for `text-combine-upright: digits calc(4.0 / 2)` is `none`'); |
| 113 |
| 114 test(function () { |
| 115 assert_equals(getComputedValueFor('invalid_digits_calc_2_e_0_times_2_e_positiv
e0'), 'none'); |
| 116 }, 'Computed value for `text-combine-upright: digits calc(2e0 * 2e+0)` is `none`
'); |
| 117 |
| 118 test(function () { |
| 119 assert_equals(getComputedValueFor('invalid_digits_calc_2_e_2_times_2_e_negativ
e2'), 'none'); |
| 120 }, 'Computed value for `text-combine-upright: digits calc(2e2 * 2e-2)` is `none`
'); |
| 121 |
| 122 test(function () { |
| 123 assert_equals(getComputedValueFor('invalid_digits_calc_4_e_positive2_dividedby
_positive2_e_2'), 'none'); |
| 124 }, 'Computed value for `text-combine-upright: digits calc(4e+2 / +2e2)` is `none
`'); |
| 125 </script> |
| 126 </body> |
| 127 </html> |
OLD | NEW |