From 16fbdd5a6817fb56e0d992bbf049afcad8e2ff3e Mon Sep 17 00:00:00 2001 From: Xiaocheng Hu Date: Fri, 25 Sep 2020 18:50:08 -0700 Subject: [PATCH] Add metric override descriptors to FontFace JS interface Following the CSSWG resolution to add metric override descriptors to @font-face, this patch also adds these descriptors as attributes to the JavaScript FontFace interface. Bug: 1098355 Change-Id: Ia5ef4ad870559457834fe9fafaaab79b24a0e08b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425484 Reviewed-by: Anders Hartvoll Ruud Reviewed-by: Chris Harrelson Commit-Queue: Xiaocheng Hu Cr-Commit-Position: refs/heads/master@{#810907} --- ...ace-override-descriptor-getter-setter.html | 222 ++++++++++++++++++ .../fontface-override-descriptors-ref.html | 27 +++ .../fontface-override-descriptors.html | 29 +++ lint.ignore | 1 + 4 files changed, 279 insertions(+) create mode 100644 css/css-font-loading/fontface-override-descriptor-getter-setter.html create mode 100644 css/css-font-loading/fontface-override-descriptors-ref.html create mode 100644 css/css-font-loading/fontface-override-descriptors.html diff --git a/css/css-font-loading/fontface-override-descriptor-getter-setter.html b/css/css-font-loading/fontface-override-descriptor-getter-setter.html new file mode 100644 index 00000000000000..a674c22285af20 --- /dev/null +++ b/css/css-font-loading/fontface-override-descriptor-getter-setter.html @@ -0,0 +1,222 @@ + +Tests getters and setters of the font metrics override descriptors of FontFace + + + + + + diff --git a/css/css-font-loading/fontface-override-descriptors-ref.html b/css/css-font-loading/fontface-override-descriptors-ref.html new file mode 100644 index 00000000000000..4a6d26ead980c5 --- /dev/null +++ b/css/css-font-loading/fontface-override-descriptors-ref.html @@ -0,0 +1,27 @@ + +Tests that the ascentOverride, descentOverride and lineGapOverride attributes of FontFace work + + + +
+
XXXXX
+
XXXXX
+
diff --git a/css/css-font-loading/fontface-override-descriptors.html b/css/css-font-loading/fontface-override-descriptors.html new file mode 100644 index 00000000000000..40de722981221f --- /dev/null +++ b/css/css-font-loading/fontface-override-descriptors.html @@ -0,0 +1,29 @@ + +Tests that the ascentOverride, descentOverride and lineGapOverride attributes of FontFace work + + + + + + +
+ XXXXX
+ XXXXX +
diff --git a/lint.ignore b/lint.ignore index 64684fa8b82cd5..ae6c07b877cb80 100644 --- a/lint.ignore +++ b/lint.ignore @@ -728,6 +728,7 @@ AHEM SYSTEM FONT: acid/acid3/test.html AHEM SYSTEM FONT: resource-timing/resources/all_resource_types.htm AHEM SYSTEM FONT: resource-timing/resources/iframe-reload-TAO.sub.html AHEM SYSTEM FONT: html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html +AHEM SYSTEM FONT: css/css-font-loading/fontface-override-descriptors.html # TODO: The following should be deleted along with the Ahem web font cleanup # PR (https://github.com/web-platform-tests/wpt/pull/18702)