diff --git a/source b/source index 7e505507297..916906b48f5 100644 --- a/source +++ b/source @@ -2025,6 +2025,10 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d +
The word "or", in cases where both inclusive "or" and exclusive "or" are possible (e.g., "if + either width or height are zero"), means an inclusive "or" (implying "or both"), unless it is + called out as being exclusive (with "but not both").
+The term "transparent black" refers to the color with red, green, blue, and alpha channels all set to zero.
@@ -40388,7 +40392,7 @@ interface HTMLTableCellElement : HTMLElement {If either x or y is less than 0, then abort this +
If either x or y are less than 0, then abort this internal algorithm.
In interactive visual media, if scripting is enabled for
the canvas
element, and if support for canvas
elements has been enabled,
- the canvas
element represents embedded content consisting
- of a dynamically created image, the element's bitmap.
canvas
element represents embedded content
+ consisting of a dynamically created image, the element's bitmap.
In non-interactive, static, visual media, if the canvas
element has been
previously associated with a rendering context (e.g. if the page was viewed in an interactive
@@ -59153,7 +59157,7 @@ callback BlobCallback = void (Blob? blob);
data-x="attr-canvas-height">height content attributes are set, removed, changed, or
redundantly set to the value they already have, if the canvas context mode is 2d, the user agent must 2d, then the user agent must set bitmap dimensions to the numeric values
of the width
and height
content attributes.
The toDataURL(type,
- quality)
method, when invoked, must run the following steps:
If this canvas
element's bitmap's origin-clean flag is set to false, throw a
+ data-x="concept-canvas-origin-clean">origin-clean flag is set to false, then throw a
"SecurityError
" DOMException
and abort these steps.
The toBlob(callback, type,
- quality)
method, when invoked, must run the following steps:
If the canvas
element's bitmap's origin-clean flag is set to false, throw a
+ data-x="concept-canvas-origin-clean">origin-clean flag is set to false, then throw a
"SecurityError
" DOMException
and abort these steps.
If the algorithm was passed some arguments, let arg be the first such argument. - Otherwise, let arg be undefined.
If the algorithm was passed some arguments, then let arg be the first such + argument. Otherwise, let arg be undefined.
Let settings be the result of coercing the arg context arguments for 2D.
When a user agent is required to coerce context arguments for 2D, it must run the - following steps:
+When a user agent is required to coerce context arguments for 2D, it must run these + steps:
When the user agent is to set bitmap - dimensions to width and height, it must run the - following steps:
+ dimensions to width and height, it must run these steps:When the user agent is to run the unbinding - steps for a rendering context, it must run the following steps:
+ steps for a rendering context, it must run these steps:When the user agent is to run the binding steps
- to bind the rendering context to the canvas
element target, it
- must run the following steps:
When the user agent is to run the binding
+ steps to bind the rendering context to the canvas
element target, it
+ must run these steps:
Except where otherwise specified, for the 2D context interface, any method call with a - numeric argument whose value is infinite or a NaN value must be ignored.
- - -Whenever the CSS value currentColor
is used as a color in the CanvasRenderingContext2D
API, the computed value of the currentColor
keyword is
@@ -60117,12 +60105,12 @@ context.fillRect(100,0,50,50); // only this square remains
The save()
method must push a copy of the
- current drawing state onto the drawing state stack.
The save()
method, when invoked, must push
+ a copy of the current drawing state onto the drawing state stack.
The restore()
method must pop the top
- entry in the drawing state stack, and reset the drawing state it describes. If there is no saved
- state, the method must do nothing.
The restore()
method, when invoked,
+ must pop the top entry in the drawing state stack, and reset the drawing state it describes. If
+ there is no saved state, then the method must do nothing.
When the user agent is to reset the rendering context to its default state, it must clear the drawing state stack and everything that drawing state consists of to @@ -60303,8 +60291,8 @@ idea from Mihai: empty or consists of an even number of non-negative numbers. Initially, the dash list must be empty.
-When the setLineDash()
method is
- invoked, it must run the following steps:
The setLineDash()
method, when
+ invoked, must run these steps:
If the styles dash list is empty, jump to the step +
If the styles dash list is empty, then jump to the step labeled convert.
If segment length is non-zero, let current state be on.
If segment length is non-zero, then let current state be + on.
Increment index by one.
Post-cut: If position is greater than subpath width, then jump to the step labeled convert.
If segment length is greater than zero, let positioned-at-on-dash be false.
If segment length is greater than zero, then let + positioned-at-on-dash be false.
Increment index by one. If it is equal to the number of entries in
the styles dash list, then let index be
@@ -60556,7 +60546,7 @@ idea from Mihai:
the line edges on the outside of the join. The miter limit ratio is the maximum allowed ratio of
the miter length to half the line width. If the miter length would cause the miter limit ratio
(as set by the style miterLimit
attribute) to be exceeded, this second
+ data-x="dom-context-2d-miterLimit">miterLimit attribute) to be exceeded, then this second
triangle must not be added.
If maxWidth was provided but is less than or equal to zero or equal to NaN, - return an empty array.
Replace all the space characters in text with U+0020 SPACE characters.
Adds an arc with the given control points and radius to the current subpath, connected to the previous point by a straight line.
-If two radii are provided, the first controls the width of the arc's ellipse, and the second - controls the height. If only one is provided, or if they are the same, the arc is from a circle. - In the case of an ellipse, the rotation argument controls the clockwise inclination of the - ellipse relative to the x-axis.
+If two radii are provided, then the first controls the width of the arc's ellipse, and the + second controls the height. If only one is provided, or if they are the same, then the arc is + from a circle. In the case of an ellipse, the rotation argument controls the clockwise + inclination of the ellipse relative to the x-axis.
Throws an "IndexSizeError
" DOMException
if the given
radius is negative.
The moveTo(x, y)
method must create a new subpath with the specified point as its
- first (and only) point.
The moveTo(x, y)
+ method, when invoked, must run these steps:
When the user agent is to ensure there is a subpath for a coordinate (x, y) on a path, the user
- agent must check to see if the path has its need new
- subpath flag set. If it does, the user agent must create a new subpath with the point (x, y) as its first (and only) point, as if the moveTo()
method had been called, and must then unset the
- path's need new subpath flag.
If either of the arguments are infinite or NaN, then abort these steps.
Create a new subpath with the specified point as its first (and only) point.
When the user agent is to ensure there is a subpath for a coordinate (x,
+ y) on a path, the user agent must check to see if
+ the path has its need new subpath flag set. If it
+ does, then the user agent must create a new subpath with the point (x, y) as
+ its first (and only) point, as if the moveTo()
method
+ had been called, and must then unset the path's need new
+ subpath flag.
The closePath()
method must do nothing
- if the object's path has no subpaths. Otherwise, it must mark the last subpath as closed, create a
- new subpath whose first point is the same as the previous subpath's first point, and finally add
- this new subpath to the path.
The closePath()
method, when invoked,
+ must do nothing if the object's path has no subpaths. Otherwise, it must mark the last subpath as
+ closed, create a new subpath whose first point is the same as the previous subpath's first point,
+ and finally add this new subpath to the path.
If the last subpath had more than one point in its list of points, then this is equivalent to adding a straight line connecting the last point back to the first point, thus @@ -61477,62 +61475,100 @@ try { below. In all cases, the methods only modify the last subpath in the object's path.
-The lineTo(x, y)
method must ensure there is a subpath for (x, y) if the object's path has no
- subpaths. Otherwise, it must connect the last point in the subpath to the given point (x, y) using a straight line, and must then add the given point
- (x, y) to the subpath.
The lineTo(x, y)
+ method, when invoked, must run these steps:
If either of the arguments are infinite or NaN, then abort these steps.
If the object's path has no subpaths, then ensure there is a subpath for + (x, y).
Otherwise, connect the last point in the subpath to the given point (x, + y) using a straight line, and then add the given point (x, y) to + the subpath.
The quadraticCurveTo(cpx,
+ cpy, x, y)
method, when invoked, must run these
+ steps:
If any of the arguments are infinite or NaN, then abort these steps.
Ensure there is a subpath for (cpx, + cpy)
The quadraticCurveTo(cpx, cpy, x, y)
method must ensure there is a subpath for (cpx, cpy), and then must connect the last
- point in the subpath to the given point (x, y) using a
- quadratic Bézier curve with control point (cpx, cpy), and must then add the given point (x, y) to the subpath.
Connect the last point in the subpath to the given point (x, y) + using a quadratic Bézier curve with control point (cpx, cpy).
Add the given point (x, y) to the subpath.
The bezierCurveTo(cp1x,
- cp1y, cp2x, cp2y, x, y)
method must ensure there is a
- subpath for (cp1x, cp1y), and
- then must connect the last point in the subpath to the given point (x, y) using a cubic Bézier curve with control points (cp1x,
- cp1y) and (cp2x, cp2y). Then, it must
- add the point (x, y) to the subpath.
If any of the arguments are infinite or NaN, then abort these steps.
Ensure there is a subpath for (cp1x, + cp1y).
Connect the last point in the subpath to the given point (x, y) + using a cubic Bézier curve with control points (cp1x, cp1y) and + (cp2x, cp2y).
Add the point (x, y) to the subpath.
The arcTo(x1, y1, x2, y2, radiusX,
- radiusY, rotation)
method must first
- ensure there is a subpath for (x1, y1). Then, the behavior depends on the arguments and the last point in the
- subpath, as described below.
Negative values for radiusX or radiusY must cause the
- implementation to throw an "IndexSizeError
" DOMException
.
- If radiusY is omitted, user agents must act as if it had the same value as
- radiusX.
Let the point (x0, y0) be the last point in the - subpath, transformed by the inverse of the current - transformation matrix (so that it is in the same coordinate system as the points passed to - the method).
- -If the point (x0, y0) is equal to the point (x1, y1), or if the point (x1, y1) is equal to the point (x2, y2), or if - both radiusX and radiusY are zero, then the method must - add the point (x1, y1) to the subpath, and connect that - point to the previous point (x0, y0) by a straight - line.
- -Otherwise, if the points (x0, y0), (x1, y1), and (x2, y2) - all lie on a single straight line, then the method must add the point (x1, - y1) to the subpath, and connect that point to the previous point (x0, y0) by a straight line.
- -Otherwise, let The Arc be the shortest arc given by circumference of the - ellipse that has radius radiusX on the major axis and radius radiusY on the minor axis, and whose semi-major axis is rotated rotation radians clockwise from the positive x-axis, and that has one point tangent - to the half-infinite line that crosses the point (x0, y0) - and ends at the point (x1, y1), and that has a different - point tangent to the half-infinite line that ends at the point (x1, y1) and crosses the point (x2, y2). The - points at which this ellipse touches these two lines are called the start and end tangent points - respectively. The method must connect the point (x0, y0) - to the start tangent point by a straight line, adding the start tangent point to the subpath, and - then must connect the start tangent point to the end tangent point by The Arc, - adding the end tangent point to the subpath.
+The arcTo(x1, y1, x2,
+ y2, radiusX, radiusY, rotation)
method,
+ when invoked, must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
Ensure there is a subpath for (x1, + y1).
If either radiusX or radiusY are negative, then throw an
+ "IndexSizeError
" DOMException
.
If radiusY is omitted, then set radiusY to + radiusX.
Let the point (x0, y0) be the last point in the subpath, transformed + by the inverse of the current transformation + matrix (so that it is in the same coordinate system as the points passed to the + method).
If the point (x0, y0) is equal to the point (x1, + y1), or if the point (x1, y1) is equal to the point + (x2, y2), or if both radiusX and radiusY are zero, + then add the point (x1, y1) to the subpath, and connect that point to the + previous point (x0, y0) by a straight line.
Otherwise, if the points (x0, y0), (x1, y1), + and (x2, y2) all lie on a single straight line, then add the point + (x1, y1) to the subpath, and connect that point to the previous point + (x0, y0) by a straight line.
Otherwise, let The Arc be the shortest arc given by circumference of the + ellipse that has radius radiusX on the major axis and radius radiusY on the + minor axis, and whose semi-major axis is rotated rotation radians clockwise from the + positive x-axis, and that has one point tangent to the half-infinite line that crosses the point + (x0, y0) and ends at the point (x1, y1), and that has + a different point tangent to the half-infinite line that ends at the point (x1, + y1) and crosses the point (x2, y2). The points at which this + ellipse touches these two lines are called the start and end tangent points respectively. Connect + the point (x0, y0) to the start tangent point by a straight line, adding + the start tangent point to the subpath, and then connect the start tangent point to the end + tangent point by The Arc, adding the end tangent point to the subpath.
arc()
method.
- When the ellipse()
method is invoked, it must
- proceed as follows. First, if the object's path has any subpaths, then the method must add a
- straight line from the last point in the subpath to the start point of the arc. Then, it must add
- the start and end points of the arc to the subpath, and connect them with an arc. The arc and its
- start and end points are defined as follows:
Consider an ellipse that has its origin at (x, y), that - has a major-axis radius radiusX and a minor-axis radius radiusY, and that is rotated about its origin such that its semi-major axis is - inclined rotation radians clockwise from the x-axis.
- -If the anticlockwise argument is false and endAngle-startAngle is equal to or greater than 2π, or, if the anticlockwise argument is true - and startAngle-endAngle is equal - to or greater than 2π, then the arc is the whole circumference of this - ellipse, and the point at startAngle along this circle's circumference, - measured in radians clockwise from the ellipse's semi-major axis, acts as both the start point and - the end point.
- -Otherwise, the points at startAngle and endAngle - along this circle's circumference, measured in radians clockwise from the ellipse's semi-major - axis, are the start and end points respectively, and the arc is the path along the circumference - of this ellipse from the start point to the end point, going anti-clockwise if the anticlockwise argument is true, and clockwise otherwise. Since the points are on - the ellipse, as opposed to being simply angles from zero, the arc can never cover an angle greater - than 2π radians.
- -Even if the arc covers the entire circumference of the ellipse and there are no
- other points in the subpath, the path is not closed unless the closePath()
method is appropriately invoked.
Negative values for radiusX or radiusY must cause the
- implementation to throw an "IndexSizeError
"
- DOMException
.
The ellipse()
method, when invoked, must run these
+ steps:
If any of the arguments are infinite or NaN, then abort these steps.
If either radiusX or radiusY are negative, then throw an
+ "IndexSizeError
" DOMException
.
If the object's path has any subpaths, then add a straight line from the last point in the + subpath to the start point of the arc.
Add the start and end points of the arc to the subpath, and connect them with an arc. The arc + and its start and end points are defined as follows:
+ +Consider an ellipse that has its origin at (x, y), that has a + major-axis radius radiusX and a minor-axis radius radiusY, and that is + rotated about its origin such that its semi-major axis is inclined rotation radians + clockwise from the x-axis.
+ +If anticlockwise is false and endAngle-startAngle is equal to or greater than 2π, or, if anticlockwise is true and startAngle-endAngle is equal to or greater than 2π, then the arc is the whole circumference of this ellipse, and the point + at startAngle along this circle's circumference, measured in radians clockwise from + the ellipse's semi-major axis, acts as both the start point and the end point.
+ +Otherwise, the points at startAngle and endAngle along this circle's + circumference, measured in radians clockwise from the ellipse's semi-major axis, are the start + and end points respectively, and the arc is the path along the circumference of this ellipse + from the start point to the end point, going anti-clockwise if anticlockwise is true, + and clockwise otherwise. Since the points are on the ellipse, as opposed to being simply angles + from zero, the arc can never cover an angle greater than 2π + radians.
+ +Even if the arc covers the entire circumference of the ellipse and there are no
+ other points in the subpath, the path is not closed unless the closePath()
method is appropriately invoked.
The rect(x, y, w, h)
method must create
- a new subpath containing just the four points (x, y),
- (x+w, y), (x+w, y+h), (x, y+h), in that order, with those four
- points connected by straight lines, and must then mark the subpath as closed. It must then create
- a new subpath with the point (x, y) as the only point in
- the subpath.
The rect(x, y, w,
+ h)
method, when invoked, must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
Create a new subpath containing just the four points (x, y), + (x+w, y), (x+w, + y+h), (x, y+h), in that order, with those + four points connected by straight lines.
Mark the subpath as closed.
Create a new subpath with the point (x, y) as the only point in the + subpath.
If image is an HTMLOrSVGImageElement
object with an
+ intrinsic width or intrinsic height (or both) equal to zero, then
+ return bad and abort these steps.
If the image argument is an HTMLCanvasElement
object with
- either a horizontal dimension or a vertical dimension equal to zero, then return bad and
- abort these steps.
If image is an HTMLCanvasElement
object with either a horizontal
+ dimension or a vertical dimension equal to zero, then return bad and abort these
+ steps.
If the image argument is an ImageBitmap
object with its
+
If image is an ImageBitmap
object with its
[[Detached]] internal slot value set to true, then throw an
"InvalidStateError
" DOMException
, return aborted,
and abort these steps.
The createLinearGradient(x0, y0, x1, y1)
method takes four arguments that represent the start point (x0, y0) and end point (x1, y1) of the gradient. The method must return a linear CanvasGradient
- initialized with the specified line.
The createLinearGradient(x0,
+ y0, x1, y1)
method takes four arguments that
+ represent the start point (x0, y0) and end point (x1,
+ y1) of the gradient. The method, when invoked, must return a linear
+ CanvasGradient
initialized with the specified line.
Linear gradients must be rendered such that all points on a line perpendicular to the line that crosses the start and end points have the color at the point where those two lines cross (with the @@ -62259,14 +62352,15 @@ try { data-x="">y0 = y1, then the linear gradient must paint nothing.
-The createRadialGradient(x0, y0, r0, x1, y1, r1)
method takes six arguments, the first
- three representing the start circle with origin (x0, y0)
- and radius r0, and the last three representing the end circle with origin
- (x1, y1) and radius r1. The values are
- in coordinate space units. If either of r0 or r1 are
- negative, an "IndexSizeError
" DOMException
must be thrown.
- Otherwise, the method must return a radial CanvasGradient
initialized with the two
- specified circles.
The createRadialGradient(x0,
+ y0, r0, x1, y1, r1)
method
+ takes six arguments, the first three representing the start circle with origin (x0,
+ y0) and radius r0, and the last three representing the end circle with
+ origin (x1, y1) and radius r1. The values are in coordinate space
+ units. If either of r0 or r1 are negative, then an
+ "IndexSizeError
" DOMException
must be thrown. Otherwise,
+ the method, when invoked, must return a radial CanvasGradient
initialized with the
+ two specified circles.
Radial gradients must be rendered by following these steps:
@@ -62345,8 +62439,8 @@ try {To create objects of this type, the createPattern(image, repetition)
method is used. When the method is invoked, the user agent
- must run the following steps:
The createPattern(image,
+ repetition)
method, when invoked, must run these steps:
If repetition is the empty string, let it be " If repetition is the empty string, then set it to " If repetition is not a case-sensitive match for one of
"
", or "repeat
".repeat
", "repeat-x
", "repeat-y
", or "no-repeat
", throw a
+ data-x="">repeat-yno-repeat
", then throw a
"SyntaxError
" DOMException
and abort these steps.
Create a new CanvasPattern
object with the image image
@@ -62409,18 +62503,18 @@ try {
directions all over the bitmap, if the repetition behavior is "repeat
".
If the original image data is a bitmap image, the value painted at a point in the area of the
- repetitions is computed by filtering the original image data. When scaling up, if the imageSmoothingEnabled
attribute is set to
- false, the image must be rendered using nearest-neighbor interpolation. Otherwise, the user
- agent may use any filtering algorithm (for example bilinear interpolation or nearest-neighbor).
- User agents which support multiple filtering algorithms may use the value of the imageSmoothingQuality
attribute to guide
- the choice of filtering algorithm. When such a filtering algorithm requires a pixel value from
- outside the original image data, it must instead use the value from wrapping the pixel's
- coordinates to the original image's dimensions. (That is, the filter uses 'repeat' behavior,
- regardless of the value of the pattern's repetition behavior.)
If the original image data is a bitmap image, then the value painted at a point in the area
+ of the repetitions is computed by filtering the original image data. When scaling up, if the
+ imageSmoothingEnabled
attribute is
+ set to false, then the image must be rendered using nearest-neighbor interpolation. Otherwise,
+ the user agent may use any filtering algorithm (for example bilinear interpolation or
+ nearest-neighbor). User agents which support multiple filtering algorithms may use the value of
+ the imageSmoothingQuality
attribute
+ to guide the choice of filtering algorithm. When such a filtering algorithm requires a pixel
+ value from outside the original image data, it must instead use the value from wrapping the
+ pixel's coordinates to the original image's dimensions. (That is, the filter uses 'repeat'
+ behavior, regardless of the value of the pattern's repetition behavior.)
If a radial gradient or repeated pattern is used when the transformation matrix is singular, - the resulting style must be transparent black (otherwise the gradient or pattern would be + then the resulting style must be transparent black (otherwise the gradient or pattern would be collapsed to a point or line, leaving the other pixels undefined). Linear gradients and solid colors always define all points even with singular transformation matrices.
@@ -62502,11 +62596,13 @@ try {The clearRect(x, y, w, h)
method must run the
- following steps:
The clearRect(x, y,
+ w, h)
method, when invoked, must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
Let pixels be the set of pixels in the specified rectangle that also intersect the current clipping region.
If either height or width are zero, this method has no effect, since the set of pixels would be empty.
-The fillRect(x, y, w, h)
method must paint the
- specified rectangular area using the fillStyle
. If
- either height or width are zero, this method has no effect.
The fillRect(x, y,
+ w, h)
method, when invoked, must must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
If either w or h are zero, then abort these steps.
Paint the specified rectangular area using the fillStyle
.
The strokeRect(x, y,
+ w, h)
method, when invoked, must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
The strokeRect(x, y, w, h)
method must take the
- result of tracing the path described below, using the
- CanvasPathDrawingStyles
interface's line styles, and fill it with the strokeStyle
.
Take the result of tracing the path described below,
+ using the CanvasPathDrawingStyles
interface's line styles, and fill it with the
+ strokeStyle
.
If both w and h are zero, the path has a single subpath with just one point (x, y), and no lines, and this method @@ -62597,14 +62707,18 @@ try {
Objects that implement the CanvasText
interface provide the following methods for
rendering text.
The fillText()
and strokeText()
methods take three or four
- arguments, text, x, y, and optionally
- maxWidth, and render the given text at the given (x, y) coordinates ensuring that the text isn't wider than maxWidth if specified, using the current font
, textAlign
,
- and textBaseline
values. Specifically, when the
- methods are called, the user agent must run the following steps:
The fillText()
and strokeText()
methods take three or four arguments,
+ text, x, y, and optionally maxWidth, and render the
+ given text at the given (x, y) coordinates ensuring that the text
+ isn't wider than maxWidth if specified, using the current font
, textAlign
, and textBaseline
values. Specifically, when the methods
+ are invoked, the user agent must run these steps:
If any of the arguments are infinite or NaN, then abort these steps.
Run the text preparation algorithm, passing it text, the object
implementing the CanvasText
interface, and, if the maxWidth argument was
@@ -62648,18 +62762,19 @@ WHEN EDITING THIS, FIX THE PARTS MARKED "XXX" BELOW
ALSO NOTE THAT THIS PROBABLY NEEDS ENTIRELY REVISITING NOW THAT WE
HAVE REJIGGED HOW TEXT WORKS IN v5 (e.g. remember security)
-
The fillVerticalText()
and strokeVerticalText()
methods take
- three or four arguments, text, x, y,
- and optionally maxHeight, and render the given text as
- vertical text at the given (x, y) coordinates ensuring
- that the text isn't taller than maxHeight if specified, using the current
- font
and The
fillVerticalText()
and
+ strokeVerticalText()
methods
+ take three or four arguments, text, x, y, and optionally
+ maxHeight, and render the given text as vertical text at the given
+ (x, y) coordinates ensuring that the text isn't taller than
+ maxHeight if specified, using the current font
and textAlign
values. Specifically, when the methods are
- called, the user agent must run the following steps:
If maxHeight is present but less than or equal to zero, return without +
If maxHeight is present but less than or equal to zero, then return without doing anything; abort these steps.
Let font be the current font of the context, as given by the The The Where the following method definitions use the term intended path, it means the
The The The The The The The The The The The The The The When the If any of the arguments are infinite or NaN, then abort these steps. Check the usability of the image argument. If this
returns aborted, then an exception has been thrown and the method doesn't return anything;
@@ -63344,13 +63464,13 @@ v6DVT (also check for '- -' bits in the part above) -->
If not specified, the dw and dh arguments must default to the values of
sw and sh, interpreted such that one CSS pixel
in the image is treated as one unit in the output bitmap's coordinate space. If the
- sx, sy, sw, and sh arguments are omitted, they must
- default to 0, 0, the image's intrinsic width in image pixels, and the image's
+ sx, sy, sw, and sh arguments are omitted, then they
+ must default to 0, 0, the image's intrinsic width in image pixels, and the image's
intrinsic height in image pixels, respectively. If the image has no intrinsic
- dimensions, the concrete object size must be used instead, as determined using the
- CSS "Concrete Object Size
- Resolution" algorithm, with the specified size having neither a definite width nor
- height, nor any additional constraints, the object's intrinsic properties being those of the
+ dimensions, then the concrete object size must be used instead, as determined
+ using the CSS "Concrete Object
+ Size Resolution" algorithm, with the specified size having neither a definite width
+ nor height, nor any additional constraints, the object's intrinsic properties being those of the
image argument, and the default object size being the size of the
output bitmap. If one of the sw or sh arguments is zero, abort
+ If one of the sw or sh arguments is zero, then abort
these steps. Nothing is painted. If the original image data is a bitmap image, the value painted at a point in the destination
- rectangle is computed by filtering the original image data. The user agent may use any filtering
- algorithm (for example bilinear interpolation or nearest-neighbor). When the filtering algorithm
- requires a pixel value from outside the original image data, it must instead use the value from
- the nearest edge pixel. (That is, the filter uses 'clamp-to-edge' behavior.) When the filtering
- algorithm requires a pixel value from outside the source rectangle but inside the original image
- data, then the value from the original image data must be used. If the original image data is a bitmap image, then the value painted at a point in the
+ destination rectangle is computed by filtering the original image data. The user agent may use
+ any filtering algorithm (for example bilinear interpolation or nearest-neighbor). When the
+ filtering algorithm requires a pixel value from outside the original image data, it must instead
+ use the value from the nearest edge pixel. (That is, the filter uses 'clamp-to-edge' behavior.)
+ When the filtering algorithm requires a pixel value from outside the source rectangle but inside
+ the original image data, then the value from the original image data must be used. If the image argument is not origin-clean, set the
+ If the image argument is not origin-clean, then set the
If ID is null, return nothing and abort these steps. Let list be the hit region list associated with bitmap. If region has no control,
+ If region has no control, then
return nothing and abort these steps. Let control be region's set of
pixels and a zero child count, if any. If
- there is no such hit region, abort these steps. If victim has a parent, then
decrement that hit region's child count by one. When the The If the arguments object's Remove from specified pixels any pixels not contained within the
clipping region. If the arguments object's If the arguments object's If the arguments object's If the arguments object's If the arguments object's If the arguments object's If the arguments object's If any of the following conditions are met, throw a
+ If any of the following conditions are met, then throw a
" If any of the following conditions are met, throw a " If any of the following conditions are met, then throw a
+ " If there is a previous region with this ID, remove it, and all If there is a previous region with this ID, then remove it, and all hit regions for which it is an ancestor region, from the
If there is a parent region, increment its hit region's child
+ If there is a parent region, then increment its hit region's child
count by one. Clear regions that cover the pixels in region's
When the The Let region be the region identified by the ID given by the
method's argument in the If the method's argument is the empty string, then no region will match. When the When the Let length be the number of bytes in source. If length is not a non-zero integral multiple of four, throw an
+ If length is not a non-zero integral multiple of four, then throw an
" If length is not an integral multiple of sw,
- throw an " If length is not an integral multiple of sw, then throw an
+ " At this step, the length is guaranteed to be greater than zero (otherwise the
second step above would have aborted the steps), so if sw is zero, this
@@ -64439,7 +64558,7 @@ partial dictionary MouseEventInit {
The When the user agent is required to create an When the user agent is required to create an Let imageData be a new uninitialized ImageData object. If source is specified, assign the If source is specified, then assign the If source is not specified, initialize the If the Canvas Pixel If the Canvas Pixel When invoked, the method must act as follows: The method, when invoked, must act as follows: If the imagedata argument's If imagedata's If dirtyWidth is negative, let dirtyX be dirtyX+dirtyWidth, and let dirtyWidth be equal to the absolute magnitude of dirtyWidth. If dirtyWidth is negative, then let dirtyX be dirtyX+dirtyWidth, and let dirtyWidth be equal
+ to the absolute magnitude of dirtyWidth. If dirtyHeight is negative, let dirtyY be dirtyY+dirtyHeight, and let dirtyHeight be equal to the absolute magnitude of dirtyHeight. If dirtyHeight is negative, then let dirtyY be dirtyY+dirtyHeight, and let dirtyHeight be
+ equal to the absolute magnitude of dirtyHeight. If dirtyX is negative, let dirtyWidth be If dirtyX is negative, then let dirtyWidth be dirtyWidth+dirtyX, and let dirtyX be zero. If dirtyY is negative, let dirtyHeight be If dirtyY is negative, then let dirtyHeight be dirtyHeight+dirtyY, and let dirtyY be zero. If dirtyX+dirtyWidth is greater
- than the If dirtyX+dirtyWidth is greater than the If dirtyY+dirtyHeight is
- greater than the If dirtyY+dirtyHeight is greater than the If, after those changes, either dirtyWidth or dirtyHeight is negative or zero, stop these steps without affecting any
- bitmaps. If, after those changes, either dirtyWidth or dirtyHeight are negative
+ or zero, then abort these steps without affecting any bitmaps. The The If the current composition operation is If the current composition operation is If the value of the If the value of the When a user agent is required to set an
If doing these measurements requires using a font that has an origin that is not the
same as that of the
Document
object that owns the
canvas
element (even if "using a font" means just checking if that font has a
- particular glyph in it before falling back to another font), then the method must throw a
- "SecurityError
" DOMException
.
+ particular glyph in it before falling back to another font), then the method, when invoked, must
+ throw a "SecurityError
" DOMException
.
Otherwise, it must return the new TextMetrics
object.
@@ -63005,9 +63120,9 @@ v6DVT (also check for '- -' bits in the part above) -->
beginPath()
method must empty the
- list of subpaths in the context's current default path so that the it once again has
- zero subpaths.beginPath()
method, when invoked,
+ must empty the list of subpaths in the context's current default path so that the it
+ once again has zero subpaths.Path2D
argument, if one was provided, or the current default path
@@ -63022,13 +63137,14 @@ v6DVT (also check for '- -' bits in the part above) -->
the current default path when it is constructed, so applying it when it is painted as
well would result in a double transformation.)fill()
method must fill all the
- subpaths of the intended path, using fillStyle
, and
- using the fill rule indicated by the fillRule argument. Open
- subpaths must be implicitly closed when being filled (without affecting the actual subpaths).fill()
method, when invoked, must fill
+ all the subpaths of the intended path, using fillStyle
, and using the fill rule indicated
+ by the fillRule argument. Open subpaths must be implicitly closed when being filled
+ (without affecting the actual subpaths).stroke()
method must trace the intended path, using this
+ stroke()
method, when invoked, must
+ trace the intended path, using this
CanvasPathDrawingStyles
object for the line styles, and then fill the resulting path
using the strokeStyle
attribute, using the non-zero winding rule.
- clip()
method must create a new
- clipping region by calculating the intersection of the current clipping region and the
- area described by the intended path, using the fill rule indicated by the fillRule argument. Open subpaths must be implicitly closed when computing the
+ clip()
method, when invoked, must
+ create a new clipping region by calculating the intersection of the current clipping
+ region and the area described by the intended path, using the fill rule indicated by
+ the fillRule argument. Open subpaths must be implicitly closed when computing the
clipping region, without affecting the actual subpaths. The new clipping region replaces the
current clipping region.resetClip()
method must create a
- new clipping region that is the largest infinite surface. The new clipping region
- replaces the current clipping region.resetClip()
method, when invoked,
+ must create a new clipping region that is the largest infinite surface. The new
+ clipping region replaces the current clipping region.
- isPointInPath()
method must
- return true if the point given by the x and y coordinates
+ isPointInPath()
method, when
+ invoked, must return true if the point given by the x and y coordinates
passed to the method, when treated as coordinates in the canvas coordinate space unaffected by the
current transformation, is inside the intended path as determined by the fill rule
- indicated by the fillRule argument; and must return false otherwise. Open
- subpaths must be implicitly closed when computing the area inside the path, without affecting the
- actual subpaths. Points on the path itself must be considered to be inside the path. If either of
- the arguments is infinite or NaN, then the method must return false.
- isPointInStroke()
method
- must return true if the point given by the x and y
- coordinates passed to the method, when treated as coordinates in the canvas coordinate space
- unaffected by the current transformation, is inside the path that results from tracing the intended path, using the The isPointInStroke()
method,
+ when invoked, must return true if the point given by the x and y coordinates
+ passed to the method, when treated as coordinates in the canvas coordinate space unaffected by the
+ current transformation, is inside the path that results from tracing the intended path, using the non-zero winding rule, and using the
CanvasPathDrawingStyles
interface for the line styles; and must return false
- otherwise. Points on the resulting path must be considered to be inside the path. If either of
- the arguments is infinite or NaN, then the method must return false.
@@ -63209,7 +63326,9 @@ v6DVT (also check for '- -' bits in the part above) -->
- drawFocusIfNeeded(element)
method, when invoked, must run the following steps:drawFocusIfNeeded(element)
+ method, when invoked, must run these steps:
@@ -63257,7 +63376,7 @@ v6DVT (also check for '- -' bits in the part above) -->
scrollPathIntoView()
- method, when invoked, must run the following steps:
@@ -63328,9 +63447,10 @@ v6DVT (also check for '- -' bits in the part above) -->
drawImage()
method is invoked, the user
- agent must run the following steps:
+
canvas
element onto overlapping parts of itself.
- CanvasRenderingContext2D
's origin-clean flag to false.
-
-
- addHitRegion()
method is
- invoked, the user agent must run the following steps:addHitRegion()
method, when
+ invoked, must run these steps:
@@ -63794,7 +63915,7 @@ v6DVT (also check for '- -' bits in the part above) -->
argument.
- path
member is not null, let source
+ data-x="dom-HitRegionOptions-path">path member is not null, then let source
path be the path
member's value. Otherwise,
let it be the CanvasRenderingContext2D
object's current default
path.id
member is the empty string, let it be null
- instead.id
+ member is the empty string, then set it to null.id
member is not null, then let previous
- region for this ID be the region identified by the ID given by the id
member's value in this
- CanvasRenderingContext2D
, if any. If the id
member is null or no such region currently exists, let previous region for this ID be null.id
+ member is not null, then let previous region for this ID be the region
+ identified by the ID given by the id
+ member's value in this CanvasRenderingContext2D
, if any. If the id
member is null or no such region currently exists,
+ then let previous region for this ID be null.parentID
member is the empty string, let it be null
- instead.parentID
member is not null, then let parent region be the region identified by the ID given by the parentID
member's value in the
CanvasRenderingContext2D
, if any. If the parentID
member is null or no such region
- currently exists, let parent region be null.label
member is the empty string, let it be null
@@ -63849,7 +63969,7 @@ v6DVT (also check for '- -' bits in the part above) -->
NotSupportedError
" DOMException
and abort these
steps.SyntaxError
"
- DOMException
and abort these steps.SyntaxError
" DOMException
and abort these steps.
@@ -64007,13 +64127,13 @@ v6DVT (also check for '- -' bits in the part above) -->
CanvasRenderingContext2D
's hit region list; then, if it had a parent region, decrement that hit region's child
count by one.removeHitRegion()
- method is invoked, the user agent must run the following steps:removeHitRegion()
+ method, when invoked, must run these steps:
@@ -64035,7 +64155,7 @@ v6DVT (also check for '- -' bits in the part above) -->
CanvasRenderingContext2D
's hit region list.
- If no such region currently exists, abort these steps.ImageData()
constructor is invoked with two
numeric arguments sw and sh, it must create an ImageData
- object with parameter pixelsPerRow set to sw, and rows
- set to sh. The image data of the newly created ImageData
object must be
- intializedzed to transparent black. If both sw and sh are non-zero, return
- the new ImageData
object. If one or both of sw and sh are
- zero, then the constructor must throw an "IndexSizeError
"
+ object with parameter pixelsPerRow set to sw, and rows set
+ to sh. The image data of the newly created ImageData
object must be
+ intializedzed to transparent black. If both sw and sh are non-zero, then
+ return the new ImageData
object. If one or both of sw and sh
+ are zero, then the constructor must throw an "IndexSizeError
"
DOMException
instead.ImageData()
constructor is invoked with its first
argument being an Uint8ClampedArray
source
and its second and optional third arguments being numeric arguments sw and
- sh, it must run the following steps:
InvalidStateError
" DOMException
and abort these
steps.IndexSizeError
" DOMException
and abort these
- steps.IndexSizeError
" DOMException
and abort these steps.ImageData
object, with parameter pixelsPerRow set to the
absolute magnitude of sw, and parameter rows set to the absolute magnitude
of sh. Initialize the image data of the new ImageData
object to
- transparent black. If both sw and sh are non-zero, return
+ transparent black. If both sw and sh are non-zero, then return
the new ImageData
object. If one or both of sw and sh are
zero, then throw an "IndexSizeError
" DOMException
instead.ImageData
object.
getImageData(sx,
- sy, sw, sh)
method must,
+ sy, sw, sh) method, when invoked, must,
if either the sw or sh arguments are zero, throw an
"IndexSizeError
" DOMException
; otherwise,
@@ -64474,21 +64593,21 @@ partial dictionary MouseEventInit {
Pixels outside the output bitmap must be set to transparent black. Pixel values
must not be premultiplied by alpha.ImageData
object, given
- a positive integer number of rows rows, a positive integer number of pixels per row
+ ImageData
object, given a
+ positive integer number of rows rows, a positive integer number of pixels per row
pixelsPerRow, and an optional Uint8ClampedArray
source, it must run the
- following steps.
+ data-x="idl-Uint8ClampedArray">Uint8ClampedArray source, it must run these
+ steps:
data
attribute of imageData to
source.If source is not specified, then initialize the
data
attribute of imageData to a new Uint8ClampedArray
object. The Uint8ClampedArray
object must use a new Canvas
@@ -64497,8 +64616,8 @@ partial dictionary MouseEventInit {
Pixel ArrayBuffer
must have the correct size to
store rows × pixelsPerRow pixels.ArrayBuffer
cannot
- be allocated, rethrow the RangeError
thrown by JavaScript,
+ ArrayBuffer
cannot be
+ allocated, then rethrow the RangeError
thrown by JavaScript,
and abort these steps.width
member of the imagedata structure, and the height
member of the imagedata structure, respectively.
-
data
attribute value's [[Detached]] internal
- slot value is true, throw an "InvalidStateError
"
- DOMException
and abort these steps.data
attribute value's
+ [[Detached]] internal slot value is true, then throw an
+ "InvalidStateError
" DOMException
and abort these
+ steps.width
attribute of the imagedata argument, let dirtyWidth be the value of that width
attribute, minus the value of dirtyX.width
attribute of the imagedata argument, then
+ let dirtyWidth be the value of that width
+ attribute, minus the value of dirtyX.height
attribute of the imagedata argument, let dirtyHeight be the value of that
- height
attribute, minus the value of dirtyY.height
attribute of the imagedata argument, then
+ let dirtyHeight be the value of that height
attribute, minus the value of dirtyY.globalAlpha
attribute gives an
- alpha value that is applied to shapes and images before they are composited onto the
- output bitmap. The value must be in the range from 0.0 (fully transparent) to 1.0
- (no additional transparency). If an attempt is made to set the attribute to a value outside this
- range, including Infinity and Not-a-Number (NaN) values, the attribute must retain its previous
- value. When the context is created, the globalAlpha
attribute must initially have the value
- 1.0.globalAlpha
attribute
+ must initially have the value 1.0.
globalCompositeOperation
attribute
@@ -64974,7 +65096,7 @@ function AddCloud(data, x, y) { ... }
copy
, shadows
+ copy
, then shadows
effectively won't render (since the shape will overwrite the shadow).Filters
@@ -65033,12 +65155,12 @@ function AddCloud(data, x, y) { ... }
'smaller' keywords are not supported.
filter
attribute refers to an
- SVG filter in the same document, and this SVG filter changes, the changed filter is used for the
- next draw operation.filter
attribute refers to an
SVG filter in an external resource document and that document is not loaded when a drawing
- operation is invoked, the drawing operation must proceed with no filtering.ImageBitmapRenderingContext
's output
bitmap, with a context argument that is an
ImageBitmapRenderingContext
object and an optional argument bitmap that
- refers to bitmap data, it must run the
- following steps:
If a bitmap argument was not provided, run these substeps:
+If a bitmap argument was not provided, then run these substeps:
If a bitmap argument was provided, run these substeps:
+If a bitmap argument was provided, then run these substeps:
ImageBitmapRenderingContext
context are set, changed or
removed, if the context's bitmap mode is set to blank, the user agent must run the
+ data-x="concept-ImageBitmapRenderingContext-blank">blank, then the user agent must run the
steps to set an ImageBitmapRenderingContext
's output bitmap, using
context and no bitmap argument.
@@ -65420,7 +65542,7 @@ dictionary ImageBitmapRenderingContextSettings {
If the algorithm was passed some arguments, let arg be the first such +
If the algorithm was passed some arguments, then let arg be the first such argument. Otherwise, let arg be undefined.
Let settings be the result of transferFromImageBitmap(imageBitmap) - method is invoked, the user agent must run the - following steps:
+ method, when invoked, must run these steps:If imageBitmap is null, run the steps to set an
+ If imageBitmap is null, then run the steps to set an
ImageBitmapRenderingContext's output bitmap, with bitmapContext as the
context argument and no bitmap argument, then abort these steps. If the value of imageBitmap's [[Detached]] internal slot is set
- to true, throw an " If the value of imageBitmap's [[Detached]] internal slot is set to
+ true, then throw an " Run the steps to set an The The In user agents that support CSS, the color space used by a InvalidStateError
" DOMException
and
+ InvalidStateError
" DOMException
and
abort these steps.ImageBitmapRenderingContext
's output
@@ -65538,10 +65659,11 @@ dictionary ImageBitmapRenderingContextSettings {
match colors obtained through the getImageData()
method.toDataURL()
method must not include color space
- information in the resources they return. Where the output format allows it, the color of pixels
- in resources created by toDataURL()
must match those
- returned by the getImageData()
method.toDataURL()
method, when invoked, must not
+ include color space information in the resources they return. Where the output format allows it,
+ the color of pixels in resources created by toDataURL()
+ must match those returned by the getImageData()
+ method.canvas
element must
match the color space used for processing any colors for that element in CSS.
If type is supplied, it must be interpreted as a MIME - type giving the format to use. If the type has any parameters, it must be treated as not - supported.
+If type is supplied, then it must be interpreted as a MIME + type giving the format to use. If the type has any parameters, then it must be treated as + not supported.
For example, the value "image/png
" would mean to generate a PNG
image, the value "image/jpeg
" would mean to generate a JPEG image, and the value
@@ -65586,7 +65708,7 @@ dictionary ImageBitmapRenderingContextSettings {
feature).
User agents must support PNG ("image/png
"). User agents may support other types.
- If the user agent does not support the requested type, it must create the file using the PNG
+ If the user agent does not support the requested type, then it must create the file using the PNG
format.
User agents must convert the provided type to ASCII @@ -74952,11 +75074,10 @@ body { display:none } not the read/write mode, abort these steps. Nothing happens.
If the element argument is an img
element, then set the drag
- data store bitmap to the element's image (at its
- intrinsic size); otherwise, set the
- drag data store bitmap to an image generated from the given element (the exact
- mechanism for doing so is not currently specified).
If element is an img
element, then set the drag data store
+ bitmap to the element's image (at its intrinsic
+ size); otherwise, set the drag data store bitmap to an image generated from
+ the given element (the exact mechanism for doing so is not currently specified).
Set the drag data store hot spot coordinate to the given x, y coordinate.
Let urlRecordTwo be the result of parsing part two with base URL.
-If either urlRecordOne or urlRecordTwo is failure, then jump back to the - step labeled start of line.
+If either urlRecordOne or urlRecordTwo are failure, then jump back to + the step labeled start of line.
If the origin of either urlRecordOne or urlRecordTwo is not same origin with the manifest's URL