diff --git a/source b/source index 213f90acbef..227d39761e4 100644 --- a/source +++ b/source @@ -3956,6 +3956,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The following features are defined in CSS Text: CSSTEXT
height
content attributes of this
canvas
element.
- Set the placeholder canvas
- element of offscreenCanvas to a weak reference to this canvas
- element.
Set the offscreenCanvas's placeholder canvas
element of
+ offscreenCanvas to a weak reference to this canvas
element.
Set this canvas
element's context
mode to placeholder.
Set the offscreenCanvas's inherited language to the language of this canvas
element.
Set the offscreenCanvas's inherited direction to the directionality of this canvas
element.
Return offscreenCanvas.
shadowOffsetY
, shadowBlur
, lang
, font
, textAlign
, textBaseline
,
Text styles
+ context.lang [ = value ]
+ styles.lang [ = value ]
+ -
+
Returns the current language setting.
+
+ Can be set, to change the language used when resolving fonts. The syntax and valid values
+ are the same as those for the lang element attribute, or the
+ value "inherit" with meaning given
+ below.
+
+ The default is "inherit".
+
+
context.font [ = value ]
styles.font [ = value ]
-
Returns the current font settings.
Can be set, to change the font. The syntax is the same as for the CSS 'font'
- property; values that cannot be parsed as CSS font values are ignored.
+ property; values that cannot be parsed as CSS font values are ignored. The default is "10px
+ sans-serif".
Relative keywords and lengths are computed relative to the font of the canvas
element.
@@ -66716,7 +66741,7 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
with the 'font-size' component converted to CSS pixels,
and with system fonts being computed to explicit values. If the new value is syntactically
incorrect (including using property-independent style sheet syntax like 'inherit' or 'initial'),
- then it must be ignored, without assigning a new font value. CSS
+ then it must be ignored, without assigning a new font value.CSS
Font family names must be interpreted in the context of the font style source
object when the font is to be used; any fonts embedded using
data-x="dom-context-2d-textBaseline">textBaseline
attribute must initially have the value
alphabetic
.
Objects that implement the CanvasTextDrawingStyles
interface have a
+ lang
+ attribute to localize font rendering.
The lang
IDL attribute, on getting, must return
+ the current value. On setting, the current value must be changed to the new value. When the object
+ implementing the CanvasTextDrawingStyles
interface is created, the lang
attribute must initially have the value
+ "inherit".
The direction
IDL attribute, on getting, must return
the current value. On setting, the current value must be changed to the new value. When the object
@@ -66902,6 +66937,27 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
The lang
attribute's allowed values are either
+ a value that is valid for the lang
element attribute, or the value
+ "inherit".
+
+
If the value is "inherit", use the
+ following process to determine the value for the inherited language
referred to in the
+ text preparation algorithm:
If object's font style source object is a canvas
+ element, then set the inherited
+ language
to the element's language.
Otherwise, object's font style source object is an
+ OffscreenCanvas
object. Set the inherited language
to the
+ OffscreenCanvas
's internal
+ inherited language.
The direction
attribute's allowed keywords are
as follows:
Treat input to the text preparation algorithm as right-to-left text.
Use the following process to determine the value for the
+ inherited
+ direction
referred to in the text preparation algorithm:
inherit
+ If object's font style source object is a canvas
+ element:
If the element has a computed value for + 'direction' use that as the inherited direction.
Otherwise, use the directionality + of the element as the inherited direction.
Default to the directionality of the canvas
element or Document
- as appropriate.
Otherwise, object's font style source object is an
+ OffscreenCanvas
object. Set the inherited direction to the
+ OffscreenCanvas
's internal inherited
+ direction.
The fontKerning
attribute's allowed keywords
@@ -67032,6 +67103,24 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Let font be the current font of target, as given
by that object's font
attribute.
Apply the appropriate step from the following list to determine the value of language:
+ +lang
attribute has the value "inherit"lang
attribute with the semantics of the lang
element attribute.Apply the appropriate step from the following list to determine the value of direction:
@@ -67047,32 +67136,11 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]); data-x="dom-context-2d-direction-rtl">rtl"Document
with a non-null document elementOffscreenCanvas
object. Initially, all the bitmap's pixels are transparent black.
+ An OffscreenCanvas
object has an internal inherited language and inherited direction set when
+ the OffscreenCanvas
is created.
An OffscreenCanvas
object can have a rendering context bound to it. Initially,
it does not have a bound rendering context. To keep track of whether it has a rendering context
or not, and what kind of rendering context it is, an OffscreenCanvas
object also
@@ -71302,9 +71379,37 @@ interface OffscreenCanvas : EventTarget {
array of transparent black pixels of the dimensions specified by width and
height; and its width
and height
attributes initialized to width and
- height respectively.
Let global be the OffscreenCanvas
's relevant global
+ object.
If global is a Window
object:
Let Document be the global's
+ associated Document
.
Set the OffscreenCanvas
's inherited language to the
+ Document's language.
Set the OffscreenCanvas
's inherited direction
+ to the Document's directionality.
Otherwise:
+Set the inherited language + to explicitly unknown.
Set the inherited direction + to "ltr".
OffscreenCanvas
objects are transferable. Their transfer steps, given value and
@@ -71321,11 +71426,18 @@ interface OffscreenCanvas : EventTarget {
Let width and height be the dimensions of value's bitmap.
Let language and direction be the values of value's + inherited language and + inherited direction.
Unset value's bitmap.
Set dataHolder.[[Width]] to width and dataHolder.[[Height]] to height.
Set dataHolder.[[Language]] to language and + dataHolder.[[Direction]] to direction.
Set dataHolder.[[PlaceholderCanvas]] to be a weak reference to
value's placeholder canvas
element, if value has one, or null if it does not.
Set value's inherited + language to dataHolder.[[Language]] and inherited direction to + dataHolder.[[Direction]].
If dataHolder.[[PlaceholderCanvas]] is not null, set value's placeholder canvas
element to
dataHolder.[[PlaceholderCanvas]] (while maintaining the weak reference
@@ -147039,6 +147156,7 @@ INSERT INTERFACES HERE
Ştefan Vargyas,
Stefan Weiss,
Steffen Meschkat,
+ Stephen Chenney,
Stephen Ma,
Stephen Stewart,
Stephen White,