Commit 3211fba0 authored by yiyix's avatar yiyix Committed by Commit Bot

Launch fontBoundingBoxAscent/Descent

This change removes the flag ExtendedTextMetrics.fontBoundingBoxAscent
and Descent and references in code to ship attributes in TextMetrics:
fontBoundingBoxAscent and fontBoundingBoxDescent.
Currently chrome is only returning the width,
actualBoundingBoxLeft/Right/Ascent/Descent of the measured text.
https://html.spec.whatwg.org/multipage/canvas.html#textmetrics

Intend-to-ship:
https://groups.google.com/a/chromium.org/g/blink-dev/c/GSmWjdqmgCA/m/c5Y8DfKyCAAJ

Bug: 1129621

Change-Id: Id367f0f8d74aa82f6baa64f5909b325fede57b60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440847
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812728}
parent b7c8a2dc
......@@ -34,8 +34,8 @@ interface TextMetrics {
readonly attribute double actualBoundingBoxRight;
// y-direction
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute double fontBoundingBoxAscent;
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute double fontBoundingBoxDescent;
readonly attribute double fontBoundingBoxAscent;
readonly attribute double fontBoundingBoxDescent;
readonly attribute double actualBoundingBoxAscent;
readonly attribute double actualBoundingBoxDescent;
[RuntimeEnabled=ExtendedTextMetrics] readonly attribute double emHeightAscent;
......
......@@ -11,7 +11,6 @@ var unexpected = [
"Audio",
"HTMLCanvasElement",
"Path",
"TextMetrics",
"CanvasProxy",
"CanvasRenderingContext2D",
"DrawingStyle",
......
......@@ -8,7 +8,6 @@ PASS The DOMImplementation interface object should not be exposed
PASS The Audio interface object should not be exposed
PASS The HTMLCanvasElement interface object should not be exposed
PASS The Path interface object should not be exposed
FAIL The TextMetrics interface object should not be exposed assert_false: expected false got true
PASS The CanvasProxy interface object should not be exposed
PASS The CanvasRenderingContext2D interface object should not be exposed
PASS The DrawingStyle interface object should not be exposed
......
......@@ -1284,6 +1284,8 @@ interface TextMetrics
getter actualBoundingBoxDescent
getter actualBoundingBoxLeft
getter actualBoundingBoxRight
getter fontBoundingBoxAscent
getter fontBoundingBoxDescent
getter width
method constructor
interface TransformStream
......
......@@ -1172,6 +1172,8 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] getter actualBoundingBoxDescent
[Worker] getter actualBoundingBoxLeft
[Worker] getter actualBoundingBoxRight
[Worker] getter fontBoundingBoxAscent
[Worker] getter fontBoundingBoxDescent
[Worker] getter width
[Worker] method constructor
[Worker] interface TransformStream
......
......@@ -7281,6 +7281,8 @@ interface TextMetrics
getter actualBoundingBoxDescent
getter actualBoundingBoxLeft
getter actualBoundingBoxRight
getter fontBoundingBoxAscent
getter fontBoundingBoxDescent
getter width
method constructor
interface TextTrack : EventTarget
......
......@@ -1172,6 +1172,8 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] getter actualBoundingBoxDescent
[Worker] getter actualBoundingBoxLeft
[Worker] getter actualBoundingBoxRight
[Worker] getter fontBoundingBoxAscent
[Worker] getter fontBoundingBoxDescent
[Worker] getter width
[Worker] method constructor
[Worker] interface TransformStream
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment