diff --git a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html
index be085ebfa8f4b..f3929607faa3f 100644
--- a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html
+++ b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html
@@ -19,14 +19,14 @@
2d.text.drawing.style.nonfinite.spacing
var t = async_test("Testing letter spacing and word spacing with nonfinite inputs");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
function test_word_spacing(value) {
ctx.wordSpacing = value;
- ctx.textLetterSpacing = value;
+ ctx.letterSpacing = value;
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
- _assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ _assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
}
test_word_spacing(NaN);
test_word_spacing(Infinity);
diff --git a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html
index b65971280bb12..200d711b4421c 100644
--- a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html
+++ b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html
@@ -19,20 +19,20 @@ 2d.text.drawing.style.spacing
var t = async_test("Testing letter spacing and word spacing");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
ctx.wordSpacing = 5;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
-ctx.textLetterSpacing = -1;
+ctx.letterSpacing = -1;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -1, "ctx.textLetterSpacing", "-1");
+_assertSame(ctx.letterSpacing, -1, "ctx.letterSpacing", "-1");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
diff --git a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.measure.html b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.measure.html
index b4b4c66fd8a15..315f284777aae 100644
--- a/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.measure.html
+++ b/testing/web-platform/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.measure.html
@@ -19,28 +19,28 @@ 2d.text.drawing.style.spacing.measure
var t = async_test("Testing letter spacing and word spacing");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_normal = ctx.measureText('Hello World').width;
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_with_spacing = ctx.measureText('Hello World').width;
// Add letter spacing after each letter, so 11 * 3 = 33px longer.
_assertSame(width_with_spacing, width_normal + 33, "width_with_spacing", "width_normal + 33");
ctx.wordSpacing = 5;
-ctx.textLetterSpacing = 0;
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ctx.letterSpacing = 0;
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
// Add Word Spacing between "Hello" and "World", so it's 5px longer.
width_with_spacing = ctx.measureText('Hello World').width;
_assertSame(width_with_spacing, width_normal + 5, "width_with_spacing", "width_normal + 5");
-ctx.textLetterSpacing = -2;
+ctx.letterSpacing = -2;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -2, "ctx.textLetterSpacing", "-2");
+_assertSame(ctx.letterSpacing, -2, "ctx.letterSpacing", "-2");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
// Add Word Spacing and letter spacing, so it's -11*2 = -22px from
// letter spacing and -1px from word spacing.
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html
index cc2d2d5580b40..688eee2a0259e 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html
@@ -20,14 +20,14 @@ 2d.text.drawing.style.nonfinite.spacing
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
function test_word_spacing(value) {
ctx.wordSpacing = value;
- ctx.textLetterSpacing = value;
+ ctx.letterSpacing = value;
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
- _assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ _assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
}
test_word_spacing(NaN);
test_word_spacing(Infinity);
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js
index 101378bece9f6..ecf9224e9e2ea 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js
@@ -16,14 +16,14 @@ t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
function test_word_spacing(value) {
ctx.wordSpacing = value;
- ctx.textLetterSpacing = value;
+ ctx.letterSpacing = value;
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
- _assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ _assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
}
test_word_spacing(NaN);
test_word_spacing(Infinity);
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html
index d1db23fdfe283..bc688b7ee24b1 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html
@@ -20,20 +20,20 @@ 2d.text.drawing.style.spacing
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
ctx.wordSpacing = 5;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
-ctx.textLetterSpacing = -1;
+ctx.letterSpacing = -1;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -1, "ctx.textLetterSpacing", "-1");
+_assertSame(ctx.letterSpacing, -1, "ctx.letterSpacing", "-1");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
t.done();
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.html
index 91f446b737efd..5aac96856eda5 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.html
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.html
@@ -20,28 +20,28 @@ 2d.text.drawing.style.spacing.measure
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_normal = ctx.measureText('Hello World').width;
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_with_spacing = ctx.measureText('Hello World').width;
// Add letter spacing after each letter, so 11 * 3 = 33px longer.
_assertSame(width_with_spacing, width_normal + 33, "width_with_spacing", "width_normal + 33");
ctx.wordSpacing = 5;
-ctx.textLetterSpacing = 0;
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ctx.letterSpacing = 0;
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
// Add Word Spacing between "Hello" and "World", so it's 5px longer.
width_with_spacing = ctx.measureText('Hello World').width;
_assertSame(width_with_spacing, width_normal + 5, "width_with_spacing", "width_normal + 5");
-ctx.textLetterSpacing = -2;
+ctx.letterSpacing = -2;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -2, "ctx.textLetterSpacing", "-2");
+_assertSame(ctx.letterSpacing, -2, "ctx.letterSpacing", "-2");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
// Add Word Spacing and letter spacing, so it's -11*2 = -22px from
// letter spacing and -1px from word spacing.
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.js
index a514bbdfe3f75..df8343951483a 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.js
@@ -16,28 +16,28 @@ t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_normal = ctx.measureText('Hello World').width;
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
var width_with_spacing = ctx.measureText('Hello World').width;
// Add letter spacing after each letter, so 11 * 3 = 33px longer.
_assertSame(width_with_spacing, width_normal + 33, "width_with_spacing", "width_normal + 33");
ctx.wordSpacing = 5;
-ctx.textLetterSpacing = 0;
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+ctx.letterSpacing = 0;
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
// Add Word Spacing between "Hello" and "World", so it's 5px longer.
width_with_spacing = ctx.measureText('Hello World').width;
_assertSame(width_with_spacing, width_normal + 5, "width_with_spacing", "width_normal + 5");
-ctx.textLetterSpacing = -2;
+ctx.letterSpacing = -2;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -2, "ctx.textLetterSpacing", "-2");
+_assertSame(ctx.letterSpacing, -2, "ctx.letterSpacing", "-2");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
// Add Word Spacing and letter spacing, so it's -11*2 = -22px from
// letter spacing and -1px from word spacing.
diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js
index e6855c1838e6f..7904f3f97d74e 100644
--- a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js
+++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js
@@ -16,20 +16,20 @@ t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
-_assertSame(ctx.textLetterSpacing, 0, "ctx.textLetterSpacing", "0");
+_assertSame(ctx.letterSpacing, 0, "ctx.letterSpacing", "0");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
-ctx.textLetterSpacing = 3;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+ctx.letterSpacing = 3;
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 0, "ctx.wordSpacing", "0");
ctx.wordSpacing = 5;
-_assertSame(ctx.textLetterSpacing, 3, "ctx.textLetterSpacing", "3");
+_assertSame(ctx.letterSpacing, 3, "ctx.letterSpacing", "3");
_assertSame(ctx.wordSpacing, 5, "ctx.wordSpacing", "5");
-ctx.textLetterSpacing = -1;
+ctx.letterSpacing = -1;
ctx.wordSpacing = -1;
-_assertSame(ctx.textLetterSpacing, -1, "ctx.textLetterSpacing", "-1");
+_assertSame(ctx.letterSpacing, -1, "ctx.letterSpacing", "-1");
_assertSame(ctx.wordSpacing, -1, "ctx.wordSpacing", "-1");
t.done();
diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml
index 6d871592fa910..5d472506b1ecd 100644
--- a/testing/web-platform/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml
+++ b/testing/web-platform/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml
@@ -743,20 +743,20 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
- ctx.textLetterSpacing = 3;
- @assert ctx.textLetterSpacing === 3;
+ ctx.letterSpacing = 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 0;
ctx.wordSpacing = 5;
- @assert ctx.textLetterSpacing === 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 5;
- ctx.textLetterSpacing = -1;
+ ctx.letterSpacing = -1;
ctx.wordSpacing = -1;
- @assert ctx.textLetterSpacing === -1;
+ @assert ctx.letterSpacing === -1;
@assert ctx.wordSpacing === -1;
- name: 2d.text.drawing.style.nonfinite.spacing
@@ -764,14 +764,14 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
function test_word_spacing(value) {
ctx.wordSpacing = value;
- ctx.textLetterSpacing = value;
+ ctx.letterSpacing = value;
@assert ctx.wordSpacing === 0;
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
}
@nonfinite test_word_spacing(<0 NaN Infinity -Infinity>);
@@ -780,28 +780,28 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
var width_normal = ctx.measureText('Hello World').width;
- ctx.textLetterSpacing = 3;
- @assert ctx.textLetterSpacing === 3;
+ ctx.letterSpacing = 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 0;
var width_with_spacing = ctx.measureText('Hello World').width;
// Add letter spacing after each letter, so 11 * 3 = 33px longer.
@assert width_with_spacing === width_normal + 33;
ctx.wordSpacing = 5;
- ctx.textLetterSpacing = 0;
- @assert ctx.textLetterSpacing === 0;
+ ctx.letterSpacing = 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 5;
// Add Word Spacing between "Hello" and "World", so it's 5px longer.
width_with_spacing = ctx.measureText('Hello World').width;
@assert width_with_spacing === width_normal + 5;
- ctx.textLetterSpacing = -2;
+ ctx.letterSpacing = -2;
ctx.wordSpacing = -1;
- @assert ctx.textLetterSpacing === -2;
+ @assert ctx.letterSpacing === -2;
@assert ctx.wordSpacing === -1;
// Add Word Spacing and letter spacing, so it's -11*2 = -22px from
// letter spacing and -1px from word spacing.
diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/text.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/text.yaml
index df4cc1c307d87..d034011fbfab7 100644
--- a/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/text.yaml
+++ b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/text.yaml
@@ -1241,20 +1241,20 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
- ctx.textLetterSpacing = 3;
- @assert ctx.textLetterSpacing === 3;
+ ctx.letterSpacing = 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 0;
ctx.wordSpacing = 5;
- @assert ctx.textLetterSpacing === 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 5;
- ctx.textLetterSpacing = -1;
+ ctx.letterSpacing = -1;
ctx.wordSpacing = -1;
- @assert ctx.textLetterSpacing === -1;
+ @assert ctx.letterSpacing === -1;
@assert ctx.wordSpacing === -1;
t.done();
@@ -1263,14 +1263,14 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
function test_word_spacing(value) {
ctx.wordSpacing = value;
- ctx.textLetterSpacing = value;
+ ctx.letterSpacing = value;
@assert ctx.wordSpacing === 0;
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
}
@nonfinite test_word_spacing(<0 NaN Infinity -Infinity>);
@@ -1281,28 +1281,28 @@
testing:
- 2d.text.drawing.style.spacing
code: |
- @assert ctx.textLetterSpacing === 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 0;
var width_normal = ctx.measureText('Hello World').width;
- ctx.textLetterSpacing = 3;
- @assert ctx.textLetterSpacing === 3;
+ ctx.letterSpacing = 3;
+ @assert ctx.letterSpacing === 3;
@assert ctx.wordSpacing === 0;
var width_with_spacing = ctx.measureText('Hello World').width;
// Add letter spacing after each letter, so 11 * 3 = 33px longer.
@assert width_with_spacing === width_normal + 33;
ctx.wordSpacing = 5;
- ctx.textLetterSpacing = 0;
- @assert ctx.textLetterSpacing === 0;
+ ctx.letterSpacing = 0;
+ @assert ctx.letterSpacing === 0;
@assert ctx.wordSpacing === 5;
// Add Word Spacing between "Hello" and "World", so it's 5px longer.
width_with_spacing = ctx.measureText('Hello World').width;
@assert width_with_spacing === width_normal + 5;
- ctx.textLetterSpacing = -2;
+ ctx.letterSpacing = -2;
ctx.wordSpacing = -1;
- @assert ctx.textLetterSpacing === -2;
+ @assert ctx.letterSpacing === -2;
@assert ctx.wordSpacing === -1;
// Add Word Spacing and letter spacing, so it's -11*2 = -22px from
// letter spacing and -1px from word spacing.