mirror of
https://github.com/servo/servo.git
synced 2025-06-13 02:44:29 +00:00
Auto merge of #24261 - paulrouget:fakeMeasureTExt, r=jdm
Temporary implementation of Canvas.MeasureText @jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261) <!-- Reviewable:end -->
This commit is contained in:
commit
cf725fc3f5
11 changed files with 207 additions and 122 deletions
|
@ -24,6 +24,7 @@ use crate::dom::globalscope::GlobalScope;
|
||||||
use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
|
use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
|
||||||
use crate::dom::imagedata::ImageData;
|
use crate::dom::imagedata::ImageData;
|
||||||
use crate::dom::node::{Node, NodeDamage};
|
use crate::dom::node::{Node, NodeDamage};
|
||||||
|
use crate::dom::textmetrics::TextMetrics;
|
||||||
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
|
use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
|
||||||
use canvas_traits::canvas::{Canvas2dMsg, CanvasId, CanvasMsg};
|
use canvas_traits::canvas::{Canvas2dMsg, CanvasId, CanvasMsg};
|
||||||
use canvas_traits::canvas::{CompositionOrBlending, FillOrStrokeStyle, FillRule};
|
use canvas_traits::canvas::{CompositionOrBlending, FillOrStrokeStyle, FillRule};
|
||||||
|
@ -873,6 +874,15 @@ impl CanvasState {
|
||||||
self.send_canvas_2d_msg(Canvas2dMsg::FillText(parsed_text, x, y, max_width));
|
self.send_canvas_2d_msg(Canvas2dMsg::FillText(parsed_text, x, y, max_width));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#textmetrics
|
||||||
|
pub fn MeasureText(&self, global: &GlobalScope, _text: DOMString) -> DomRoot<TextMetrics> {
|
||||||
|
// FIXME: for now faking the implementation of MeasureText().
|
||||||
|
// See https://github.com/servo/servo/issues/5411#issuecomment-533776291
|
||||||
|
TextMetrics::new(
|
||||||
|
global, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth
|
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth
|
||||||
pub fn LineWidth(&self) -> f64 {
|
pub fn LineWidth(&self) -> f64 {
|
||||||
self.state.borrow().line_width
|
self.state.borrow().line_width
|
||||||
|
@ -1671,6 +1681,11 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
|
||||||
self.mark_as_dirty();
|
self.mark_as_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#textmetrics
|
||||||
|
fn MeasureText(&self, text: DOMString) -> DomRoot<TextMetrics> {
|
||||||
|
self.canvas_state.borrow().MeasureText(&self.global(), text)
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-drawimage
|
// https://html.spec.whatwg.org/multipage/#dom-context-2d-drawimage
|
||||||
fn DrawImage(&self, image: CanvasImageSource, dx: f64, dy: f64) -> ErrorResult {
|
fn DrawImage(&self, image: CanvasImageSource, dx: f64, dy: f64) -> ErrorResult {
|
||||||
self.canvas_state
|
self.canvas_state
|
||||||
|
|
|
@ -484,6 +484,7 @@ pub mod text;
|
||||||
pub mod textcontrol;
|
pub mod textcontrol;
|
||||||
pub mod textdecoder;
|
pub mod textdecoder;
|
||||||
pub mod textencoder;
|
pub mod textencoder;
|
||||||
|
pub mod textmetrics;
|
||||||
pub mod texttrack;
|
pub mod texttrack;
|
||||||
pub mod texttrackcue;
|
pub mod texttrackcue;
|
||||||
pub mod texttrackcuelist;
|
pub mod texttrackcuelist;
|
||||||
|
|
|
@ -23,6 +23,7 @@ use crate::dom::globalscope::GlobalScope;
|
||||||
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
|
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
|
||||||
use crate::dom::imagedata::ImageData;
|
use crate::dom::imagedata::ImageData;
|
||||||
use crate::dom::offscreencanvas::OffscreenCanvas;
|
use crate::dom::offscreencanvas::OffscreenCanvas;
|
||||||
|
use crate::dom::textmetrics::TextMetrics;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use euclid::default::Size2D;
|
use euclid::default::Size2D;
|
||||||
|
|
||||||
|
@ -244,6 +245,11 @@ impl OffscreenCanvasRenderingContext2DMethods for OffscreenCanvasRenderingContex
|
||||||
self.canvas_state.borrow().FillText(text, x, y, max_width)
|
self.canvas_state.borrow().FillText(text, x, y, max_width)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#textmetrics
|
||||||
|
fn MeasureText(&self, text: DOMString) -> DomRoot<TextMetrics> {
|
||||||
|
self.canvas_state.borrow().MeasureText(&self.global(), text)
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth
|
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth
|
||||||
fn LineWidth(&self) -> f64 {
|
fn LineWidth(&self) -> f64 {
|
||||||
self.canvas_state.borrow().LineWidth()
|
self.canvas_state.borrow().LineWidth()
|
||||||
|
|
158
components/script/dom/textmetrics.rs
Normal file
158
components/script/dom/textmetrics.rs
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use crate::dom::bindings::codegen::Bindings::TextMetricsBinding;
|
||||||
|
use crate::dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetricsMethods;
|
||||||
|
use crate::dom::bindings::num::Finite;
|
||||||
|
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||||
|
use crate::dom::bindings::root::DomRoot;
|
||||||
|
use crate::dom::globalscope::GlobalScope;
|
||||||
|
use dom_struct::dom_struct;
|
||||||
|
|
||||||
|
#[dom_struct]
|
||||||
|
pub struct TextMetrics {
|
||||||
|
reflector_: Reflector,
|
||||||
|
width: Finite<f64>,
|
||||||
|
actualBoundingBoxLeft: Finite<f64>,
|
||||||
|
actualBoundingBoxRight: Finite<f64>,
|
||||||
|
fontBoundingBoxAscent: Finite<f64>,
|
||||||
|
fontBoundingBoxDescent: Finite<f64>,
|
||||||
|
actualBoundingBoxAscent: Finite<f64>,
|
||||||
|
actualBoundingBoxDescent: Finite<f64>,
|
||||||
|
emHeightAscent: Finite<f64>,
|
||||||
|
emHeightDescent: Finite<f64>,
|
||||||
|
hangingBaseline: Finite<f64>,
|
||||||
|
alphabeticBaseline: Finite<f64>,
|
||||||
|
ideographicBaseline: Finite<f64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TextMetrics {
|
||||||
|
fn new_inherited(
|
||||||
|
width: f64,
|
||||||
|
actualBoundingBoxLeft: f64,
|
||||||
|
actualBoundingBoxRight: f64,
|
||||||
|
fontBoundingBoxAscent: f64,
|
||||||
|
fontBoundingBoxDescent: f64,
|
||||||
|
actualBoundingBoxAscent: f64,
|
||||||
|
actualBoundingBoxDescent: f64,
|
||||||
|
emHeightAscent: f64,
|
||||||
|
emHeightDescent: f64,
|
||||||
|
hangingBaseline: f64,
|
||||||
|
alphabeticBaseline: f64,
|
||||||
|
ideographicBaseline: f64,
|
||||||
|
) -> TextMetrics {
|
||||||
|
TextMetrics {
|
||||||
|
reflector_: Reflector::new(),
|
||||||
|
width: Finite::wrap(width),
|
||||||
|
actualBoundingBoxLeft: Finite::wrap(actualBoundingBoxLeft),
|
||||||
|
actualBoundingBoxRight: Finite::wrap(actualBoundingBoxRight),
|
||||||
|
fontBoundingBoxAscent: Finite::wrap(fontBoundingBoxAscent),
|
||||||
|
fontBoundingBoxDescent: Finite::wrap(fontBoundingBoxDescent),
|
||||||
|
actualBoundingBoxAscent: Finite::wrap(actualBoundingBoxAscent),
|
||||||
|
actualBoundingBoxDescent: Finite::wrap(actualBoundingBoxDescent),
|
||||||
|
emHeightAscent: Finite::wrap(emHeightAscent),
|
||||||
|
emHeightDescent: Finite::wrap(emHeightDescent),
|
||||||
|
hangingBaseline: Finite::wrap(hangingBaseline),
|
||||||
|
alphabeticBaseline: Finite::wrap(alphabeticBaseline),
|
||||||
|
ideographicBaseline: Finite::wrap(ideographicBaseline),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(
|
||||||
|
global: &GlobalScope,
|
||||||
|
width: f64,
|
||||||
|
actualBoundingBoxLeft: f64,
|
||||||
|
actualBoundingBoxRight: f64,
|
||||||
|
fontBoundingBoxAscent: f64,
|
||||||
|
fontBoundingBoxDescent: f64,
|
||||||
|
actualBoundingBoxAscent: f64,
|
||||||
|
actualBoundingBoxDescent: f64,
|
||||||
|
emHeightAscent: f64,
|
||||||
|
emHeightDescent: f64,
|
||||||
|
hangingBaseline: f64,
|
||||||
|
alphabeticBaseline: f64,
|
||||||
|
ideographicBaseline: f64,
|
||||||
|
) -> DomRoot<TextMetrics> {
|
||||||
|
reflect_dom_object(
|
||||||
|
Box::new(TextMetrics::new_inherited(
|
||||||
|
width,
|
||||||
|
actualBoundingBoxLeft,
|
||||||
|
actualBoundingBoxRight,
|
||||||
|
fontBoundingBoxAscent,
|
||||||
|
fontBoundingBoxDescent,
|
||||||
|
actualBoundingBoxAscent,
|
||||||
|
actualBoundingBoxDescent,
|
||||||
|
emHeightAscent,
|
||||||
|
emHeightDescent,
|
||||||
|
hangingBaseline,
|
||||||
|
alphabeticBaseline,
|
||||||
|
ideographicBaseline,
|
||||||
|
)),
|
||||||
|
global,
|
||||||
|
TextMetricsBinding::Wrap,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TextMetricsMethods for TextMetrics {
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-width
|
||||||
|
fn Width(&self) -> Finite<f64> {
|
||||||
|
self.width
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxleft
|
||||||
|
fn ActualBoundingBoxLeft(&self) -> Finite<f64> {
|
||||||
|
self.actualBoundingBoxLeft
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxright
|
||||||
|
fn ActualBoundingBoxRight(&self) -> Finite<f64> {
|
||||||
|
self.actualBoundingBoxRight
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
|
||||||
|
fn FontBoundingBoxAscent(&self) -> Finite<f64> {
|
||||||
|
self.fontBoundingBoxAscent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
|
||||||
|
fn FontBoundingBoxDescent(&self) -> Finite<f64> {
|
||||||
|
self.fontBoundingBoxDescent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxascent
|
||||||
|
fn ActualBoundingBoxAscent(&self) -> Finite<f64> {
|
||||||
|
self.actualBoundingBoxAscent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxdescent
|
||||||
|
fn ActualBoundingBoxDescent(&self) -> Finite<f64> {
|
||||||
|
self.actualBoundingBoxDescent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightascent
|
||||||
|
fn EmHeightAscent(&self) -> Finite<f64> {
|
||||||
|
self.emHeightAscent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightdescent
|
||||||
|
fn EmHeightDescent(&self) -> Finite<f64> {
|
||||||
|
self.emHeightDescent
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-hangingbaseline
|
||||||
|
fn HangingBaseline(&self) -> Finite<f64> {
|
||||||
|
self.hangingBaseline
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-alphabeticbaseline
|
||||||
|
fn AlphabeticBaseline(&self) -> Finite<f64> {
|
||||||
|
self.alphabeticBaseline
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#dom-textmetrics-ideographicbaseline
|
||||||
|
fn IdeographicBaseline(&self) -> Finite<f64> {
|
||||||
|
self.ideographicBaseline
|
||||||
|
}
|
||||||
|
}
|
|
@ -153,7 +153,8 @@ interface CanvasText {
|
||||||
optional unrestricted double maxWidth);
|
optional unrestricted double maxWidth);
|
||||||
//void strokeText(DOMString text, unrestricted double x, unrestricted double y,
|
//void strokeText(DOMString text, unrestricted double x, unrestricted double y,
|
||||||
// optional unrestricted double maxWidth);
|
// optional unrestricted double maxWidth);
|
||||||
//TextMetrics measureText(DOMString text);
|
[Pref="dom.canvas-text.enabled"]
|
||||||
|
TextMetrics measureText(DOMString text);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker), NoInterfaceObject]
|
[Exposed=(PaintWorklet, Window, Worker), NoInterfaceObject]
|
||||||
|
|
23
components/script/dom/webidls/TextMetrics.webidl
Normal file
23
components/script/dom/webidls/TextMetrics.webidl
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#textmetrics
|
||||||
|
[Exposed=(PaintWorklet, Window, Worker), Pref="dom.canvas-text.enabled"]
|
||||||
|
interface TextMetrics {
|
||||||
|
// x-direction
|
||||||
|
readonly attribute double width; // advance width
|
||||||
|
readonly attribute double actualBoundingBoxLeft;
|
||||||
|
readonly attribute double actualBoundingBoxRight;
|
||||||
|
|
||||||
|
// y-direction
|
||||||
|
readonly attribute double fontBoundingBoxAscent;
|
||||||
|
readonly attribute double fontBoundingBoxDescent;
|
||||||
|
readonly attribute double actualBoundingBoxAscent;
|
||||||
|
readonly attribute double actualBoundingBoxDescent;
|
||||||
|
readonly attribute double emHeightAscent;
|
||||||
|
readonly attribute double emHeightDescent;
|
||||||
|
readonly attribute double hangingBaseline;
|
||||||
|
readonly attribute double alphabeticBaseline;
|
||||||
|
readonly attribute double ideographicBaseline;
|
||||||
|
};
|
|
@ -140,9 +140,6 @@
|
||||||
[ApplicationCache interface: attribute onprogress]
|
[ApplicationCache interface: attribute onprogress]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "measureText(DOMString)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[SVGElement interface: attribute ondragleave]
|
[SVGElement interface: attribute ondragleave]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -233,12 +230,6 @@
|
||||||
[ElementInternals interface: operation setFormValue([object Object\],[object Object\],[object Object\], [object Object\],[object Object\],[object Object\])]
|
[ElementInternals interface: operation setFormValue([object Object\],[object Object\],[object Object\], [object Object\],[object Object\],[object Object\])]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface object length]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CanvasRenderingContext2D interface: operation measureText(DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "strokeText(DOMString, unrestricted double, unrestricted double, unrestricted double)" with the proper type]
|
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "strokeText(DOMString, unrestricted double, unrestricted double, unrestricted double)" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -254,9 +245,6 @@
|
||||||
[SVGElement interface: operation blur()]
|
[SVGElement interface: operation blur()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute ideographicBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation beginPath()]
|
[OffscreenCanvasRenderingContext2D interface: operation beginPath()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -305,9 +293,6 @@
|
||||||
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "ports" with the proper type]
|
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "ports" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute emHeightDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Location interface: window.location must have own property "ancestorOrigins"]
|
[Location interface: window.location must have own property "ancestorOrigins"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -428,9 +413,6 @@
|
||||||
[MessageChannel interface: existence and properties of interface prototype object's @@unscopables property]
|
[MessageChannel interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ValidityState interface: document.createElement("input").validity must inherit property "tooShort" with the proper type]
|
[ValidityState interface: document.createElement("input").validity must inherit property "tooShort" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -446,9 +428,6 @@
|
||||||
[ImageBitmap interface: existence and properties of interface prototype object's @@unscopables property]
|
[ImageBitmap interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object's @@unscopables property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DataTransfer interface: attribute items]
|
[DataTransfer interface: attribute items]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -689,9 +668,6 @@
|
||||||
[Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
[Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DataTransferItem interface object name]
|
[DataTransferItem interface object name]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -707,9 +683,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation isPointInPath(unrestricted double, unrestricted double, CanvasFillRule)]
|
[OffscreenCanvasRenderingContext2D interface: operation isPointInPath(unrestricted double, unrestricted double, CanvasFillRule)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxLeft]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DataTransfer interface: attribute dropEffect]
|
[DataTransfer interface: attribute dropEffect]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -890,9 +863,6 @@
|
||||||
[Navigator interface: operation unregisterProtocolHandler(DOMString, USVString)]
|
[Navigator interface: operation unregisterProtocolHandler(DOMString, USVString)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type]
|
[ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1010,9 +980,6 @@
|
||||||
[ApplicationCache interface: window.applicationCache must inherit property "onprogress" with the proper type]
|
[ApplicationCache interface: window.applicationCache must inherit property "onprogress" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute hangingBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CanvasRenderingContext2D interface: operation setTransform(DOMMatrix2DInit)]
|
[CanvasRenderingContext2D interface: operation setTransform(DOMMatrix2DInit)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1031,9 +998,6 @@
|
||||||
[SVGElement interface: attribute onselect]
|
[SVGElement interface: attribute onselect]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute width]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ApplicationCache interface: existence and properties of interface prototype object's @@unscopables property]
|
[ApplicationCache interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1058,9 +1022,6 @@
|
||||||
[External interface: operation IsSearchProviderInstalled()]
|
[External interface: operation IsSearchProviderInstalled()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxRight]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[SVGElement interface: attribute onkeydown]
|
[SVGElement interface: attribute onkeydown]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1082,9 +1043,6 @@
|
||||||
[SharedWorker interface: existence and properties of interface prototype object]
|
[SharedWorker interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute fontBoundingBoxAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MessageChannel interface: existence and properties of interface prototype object]
|
[MessageChannel interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1100,9 +1058,6 @@
|
||||||
[History interface: attribute scrollRestoration]
|
[History interface: attribute scrollRestoration]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CanvasRenderingContext2D interface: calling measureText(DOMString) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ImageBitmap interface: attribute height]
|
[ImageBitmap interface: attribute height]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1127,9 +1082,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation strokeText(DOMString, unrestricted double, unrestricted double, unrestricted double)]
|
[OffscreenCanvasRenderingContext2D interface: operation strokeText(DOMString, unrestricted double, unrestricted double, unrestricted double)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute alphabeticBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation stroke(Path2D)]
|
[OffscreenCanvasRenderingContext2D interface: operation stroke(Path2D)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1151,9 +1103,6 @@
|
||||||
[SVGElement interface: operation focus(FocusOptions)]
|
[SVGElement interface: operation focus(FocusOptions)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ApplicationCache interface: window.applicationCache must inherit property "UNCACHED" with the proper type]
|
[ApplicationCache interface: window.applicationCache must inherit property "UNCACHED" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1208,9 +1157,6 @@
|
||||||
[WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "extensions" with the proper type]
|
[WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "extensions" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute fontBoundingBoxDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ApplicationCache must be primary interface of window.applicationCache]
|
[ApplicationCache must be primary interface of window.applicationCache]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1313,9 +1259,6 @@
|
||||||
[ImageBitmapRenderingContext interface: existence and properties of interface prototype object]
|
[ImageBitmapRenderingContext interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object's "constructor" property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DataTransfer interface: attribute effectAllowed]
|
[DataTransfer interface: attribute effectAllowed]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1490,12 +1433,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation clip(CanvasFillRule)]
|
[OffscreenCanvasRenderingContext2D interface: operation clip(CanvasFillRule)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute emHeightAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[TextMetrics interface object name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[External interface: existence and properties of interface prototype object's @@unscopables property]
|
[External interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -98,12 +98,6 @@
|
||||||
[SharedWorker interface: existence and properties of interface object]
|
[SharedWorker interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface object length]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[TextMetrics interface: attribute emHeightAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[WorkerGlobalScope interface: self must inherit property "ononline" with the proper type]
|
[WorkerGlobalScope interface: self must inherit property "ononline" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -116,9 +110,6 @@
|
||||||
[DedicatedWorkerGlobalScope interface: calling requestAnimationFrame(FrameRequestCallback) on self with too few arguments must throw TypeError]
|
[DedicatedWorkerGlobalScope interface: calling requestAnimationFrame(FrameRequestCallback) on self with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute ideographicBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation beginPath()]
|
[OffscreenCanvasRenderingContext2D interface: operation beginPath()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -173,9 +164,6 @@
|
||||||
[MessageChannel interface: existence and properties of interface prototype object's @@unscopables property]
|
[MessageChannel interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
[OffscreenCanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -191,9 +179,6 @@
|
||||||
[ImageBitmap interface: existence and properties of interface prototype object's @@unscopables property]
|
[ImageBitmap interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object's @@unscopables property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MessagePort interface: existence and properties of interface object]
|
[MessagePort interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -236,9 +221,6 @@
|
||||||
[Path2D interface object length]
|
[Path2D interface object length]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute emHeightDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[WorkerGlobalScope interface: operation createImageBitmap(ImageBitmapSource, ImageBitmapOptions)]
|
[WorkerGlobalScope interface: operation createImageBitmap(ImageBitmapSource, ImageBitmapOptions)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -311,9 +293,6 @@
|
||||||
[Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
[Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
|
[Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -323,9 +302,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: existence and properties of interface prototype object]
|
[OffscreenCanvasRenderingContext2D interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxLeft]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via __proto__ should throw a TypeError]
|
[DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via __proto__ should throw a TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -392,9 +368,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation isPointInPath(Path2D, unrestricted double, unrestricted double, CanvasFillRule)]
|
[OffscreenCanvasRenderingContext2D interface: operation isPointInPath(Path2D, unrestricted double, unrestricted double, CanvasFillRule)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DedicatedWorkerGlobalScope interface: self must inherit property "name" with the proper type]
|
[DedicatedWorkerGlobalScope interface: self must inherit property "name" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -440,9 +413,6 @@
|
||||||
[OffscreenCanvas interface object length]
|
[OffscreenCanvas interface object length]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute hangingBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ImageBitmapRenderingContext interface: existence and properties of interface prototype object's @@unscopables property]
|
[ImageBitmapRenderingContext interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -452,18 +422,9 @@
|
||||||
[WorkerGlobalScope interface: attribute onoffline]
|
[WorkerGlobalScope interface: attribute onoffline]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute width]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Path2D interface: existence and properties of interface prototype object's @@unscopables property]
|
[Path2D interface: existence and properties of interface prototype object's @@unscopables property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute actualBoundingBoxRight]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[TextMetrics interface: attribute fontBoundingBoxAscent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MessageChannel interface: existence and properties of interface prototype object]
|
[MessageChannel interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -485,9 +446,6 @@
|
||||||
[SharedWorker interface: existence and properties of interface prototype object]
|
[SharedWorker interface: existence and properties of interface prototype object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute alphabeticBaseline]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via Object.setPrototypeOf should throw a TypeError]
|
[DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via Object.setPrototypeOf should throw a TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -497,9 +455,6 @@
|
||||||
[ImageBitmap interface: operation close()]
|
[ImageBitmap interface: operation close()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation fill(Path2D, CanvasFillRule)]
|
[OffscreenCanvasRenderingContext2D interface: operation fill(Path2D, CanvasFillRule)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -527,9 +482,6 @@
|
||||||
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "ports" with the proper type]
|
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "ports" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: attribute fontBoundingBoxDescent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[WorkerGlobalScope interface: attribute ononline]
|
[WorkerGlobalScope interface: attribute ononline]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -587,9 +539,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
|
[OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, boolean)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface: existence and properties of interface prototype object's "constructor" property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[SharedWorker interface: attribute onerror]
|
[SharedWorker interface: attribute onerror]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -683,9 +632,6 @@
|
||||||
[OffscreenCanvasRenderingContext2D interface: operation clip(CanvasFillRule)]
|
[OffscreenCanvasRenderingContext2D interface: operation clip(CanvasFillRule)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[TextMetrics interface object name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "source" with the proper type]
|
[MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "source" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,3 @@
|
||||||
[The IDBTransaction interface object should be exposed.]
|
[The IDBTransaction interface object should be exposed.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[The TextMetrics interface object should be exposed.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -18960,7 +18960,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"mozilla/interfaces.js": [
|
"mozilla/interfaces.js": [
|
||||||
"6f2a54524ef317a48d758f7e50f742fd9b3a93e4",
|
"26db0c23e544d38f02b9573ffaa44bf5dee8370a",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"mozilla/interfaces.worker.js": [
|
"mozilla/interfaces.worker.js": [
|
||||||
|
|
|
@ -38,6 +38,7 @@ function test_interfaces(interfaceNamesInGlobalScope) {
|
||||||
"String",
|
"String",
|
||||||
"Symbol",
|
"Symbol",
|
||||||
"SyntaxError",
|
"SyntaxError",
|
||||||
|
"TextMetrics",
|
||||||
"TypeError",
|
"TypeError",
|
||||||
"URIError",
|
"URIError",
|
||||||
"Uint16Array",
|
"Uint16Array",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue