You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ed/algorithms/html.json
+13-55Lines changed: 13 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -35929,7 +35929,7 @@
35929
35929
"html": "<p><a id=\"the-imagebitmap-interface:check-the-usability-of-the-image-argument\" href=\"https://html.spec.whatwg.org/multipage/canvas.html#check-the-usability-of-the-image-argument\">Check the usability of the <var>image</var> argument</a>. If this throws an\n exception or returns <i>bad</i>, then return <a id=\"the-imagebitmap-interface:a-promise-rejected-with-3\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> an\n <a id=\"the-imagebitmap-interface:invalidstateerror-3\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-imagebitmap-interface:domexception-6\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.\n\n </p>"
35930
35930
},
35931
35931
{
35932
-
"html": "<p>Let <var>p</var> be a new promise.</p>"
35932
+
"html": "<p>Let <var>promise</var> be a new promise.</p>"
35933
35933
},
35934
35934
{
35935
35935
"html": "<p>Let <var>imageBitmap</var> be a new <code id=\"the-imagebitmap-interface:imagebitmap-12\"><a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmap\">ImageBitmap</a></code> object.</p>"
@@ -35959,13 +35959,7 @@
35959
35959
"html": "<p>If <var>image</var> <a id=\"the-imagebitmap-interface:the-image-argument-is-not-origin-clean\" href=\"https://html.spec.whatwg.org/multipage/canvas.html#the-image-argument-is-not-origin-clean\">is not origin-clean</a>, then set the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-4\">origin-clean</a> flag of <var>imageBitmap</var>'s\n bitmap to false.</p>"
35960
35960
},
35961
35961
{
35962
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
35963
-
"rationale": "resolve",
35964
-
"steps": [
35965
-
{
35966
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
35967
-
}
35968
-
]
35962
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
35969
35963
}
35970
35964
]
35971
35965
},
@@ -35987,13 +35981,7 @@
35987
35981
"html": "<p>If <var>image</var> <a id=\"the-imagebitmap-interface:the-image-argument-is-not-origin-clean\" href=\"https://html.spec.whatwg.org/multipage/canvas.html#the-image-argument-is-not-origin-clean\">is not origin-clean</a>, then set the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-4\">origin-clean</a> flag of <var>imageBitmap</var>'s\n bitmap to false.</p>"
35988
35982
},
35989
35983
{
35990
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
35991
-
"rationale": "resolve",
35992
-
"steps": [
35993
-
{
35994
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
35995
-
}
35996
-
]
35984
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
35997
35985
}
35998
35986
]
35999
35987
},
@@ -36012,13 +36000,7 @@
36012
36000
"html": "<p>If <var>image</var> <a id=\"the-imagebitmap-interface:the-image-argument-is-not-origin-clean-2\" href=\"https://html.spec.whatwg.org/multipage/canvas.html#the-image-argument-is-not-origin-clean\">is not origin-clean</a>, then set the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-5\">origin-clean</a> flag of <var>imageBitmap</var>'s\n bitmap to false.</p>"
36013
36001
},
36014
36002
{
36015
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel-2\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36016
-
"rationale": "resolve",
36017
-
"steps": [
36018
-
{
36019
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36020
-
}
36021
-
]
36003
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-2\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-2\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
36022
36004
}
36023
36005
]
36024
36006
},
@@ -36034,35 +36016,29 @@
36034
36016
"html": "<p>Set the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-6\">origin-clean</a> flag of the\n <var>imageBitmap</var>'s bitmap to the same value as the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-7\">origin-clean</a> flag of <var>image</var>'s\n bitmap.</p>"
36035
36017
},
36036
36018
{
36037
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel-3\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36038
-
"rationale": "resolve",
36039
-
"steps": [
36040
-
{
36041
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36042
-
}
36043
-
]
36019
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-3\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-3\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
36044
36020
}
36045
36021
]
36046
36022
},
36047
36023
{
36048
36024
"case": "Blob",
36049
-
"html": "Run these steps <a id=\"the-imagebitmap-interface:in-parallel-4\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36025
+
"html": "Run these steps <a id=\"the-imagebitmap-interface:in-parallel\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36050
36026
"rationale": "let",
36051
36027
"steps": [
36052
36028
{
36053
-
"html": "<p>Let <var>imageData</var> be the result of reading <var>image</var>'s data. If an <a href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#file-error-read\" id=\"the-imagebitmap-interface:file-error-read\">error occurs during reading of the object</a>, then reject\n <var>p</var> with an <a id=\"the-imagebitmap-interface:invalidstateerror-6\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-imagebitmap-interface:domexception-9\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>\n and abort these steps.</p>"
36029
+
"html": "<p>Let <var>imageData</var> be the result of reading <var>image</var>'s data. If an <a href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#file-error-read\" id=\"the-imagebitmap-interface:file-error-read\">error occurs during reading of the object</a>, then <a id=\"the-imagebitmap-interface:queue-a-global-task-4\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">queue a\n global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-4\">bitmap task source</a>, to reject <var>promise</var>\n with an <a id=\"the-imagebitmap-interface:invalidstateerror-6\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-imagebitmap-interface:domexception-9\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code> and abort\n these steps.</p>"
36054
36030
},
36055
36031
{
36056
36032
"html": "<p>Apply the <a href=\"https://mimesniff.spec.whatwg.org/#rules-for-sniffing-images-specifically\" id=\"the-imagebitmap-interface:content-type-sniffing:-image\" data-x-internal=\"content-type-sniffing:-image\">image sniffing rules</a> to\n determine the file format of <var>imageData</var>, with MIME type of <var>image</var> (as\n given by <var>image</var>'s <code id=\"the-imagebitmap-interface:dom-blob-type\"><a data-x-internal=\"dom-blob-type\" href=\"https://w3c.github.io/FileAPI/#dfn-type\">type</a></code> attribute) giving the\n official type.</p>"
36057
36033
},
36058
36034
{
36059
-
"html": "<p>If <var>imageData</var> is not in a supported image file format (e.g., it's not an\n image at all), or if <var>imageData</var> is corrupted in some fatal way such that the image\n dimensions cannot be obtained (e.g., a vector graphic with no natural size), then reject\n <var>p</var> with an <a id=\"the-imagebitmap-interface:invalidstateerror-7\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-imagebitmap-interface:domexception-10\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>\n and abort these steps.</p>"
36035
+
"html": "<p>If <var>imageData</var> is not in a supported image file format (e.g., it's not an\n image at all), or if <var>imageData</var> is corrupted in some fatal way such that the image\n dimensions cannot be obtained (e.g., a vector graphic with no natural size), then <a id=\"the-imagebitmap-interface:queue-a-global-task-5\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">queue\n a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-5\">bitmap task source</a>, to reject <var>promise</var>\n with an <a id=\"the-imagebitmap-interface:invalidstateerror-7\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-imagebitmap-interface:domexception-10\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code> and abort\n these steps.</p>"
36060
36036
},
36061
36037
{
36062
36038
"html": "<p>Set <var>imageBitmap</var>'s <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#concept-imagebitmap-bitmap-data\" id=\"the-imagebitmap-interface:concept-imagebitmap-bitmap-data-13\">bitmap\n data</a> to <var>imageData</var>, <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#cropped-to-the-source-rectangle-with-formatting\" id=\"the-imagebitmap-interface:cropped-to-the-source-rectangle-with-formatting-4\">cropped to the source rectangle with\n formatting</a>. If this is an animated image, <var>imageBitmap</var>'s <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#concept-imagebitmap-bitmap-data\" id=\"the-imagebitmap-interface:concept-imagebitmap-bitmap-data-14\">bitmap data</a> must only be taken from the\n default image of the animation (the one that the format defines is to be used when animation\n is not supported or is disabled), or, if there is no such image, the first frame of the\n animation.</p>"
36063
36039
},
36064
36040
{
36065
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36041
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-6\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-6\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
36066
36042
}
36067
36043
]
36068
36044
},
@@ -36081,13 +36057,7 @@
36081
36057
"html": "<p>Set <var>imageBitmap</var>'s <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#concept-imagebitmap-bitmap-data\" id=\"the-imagebitmap-interface:concept-imagebitmap-bitmap-data-15\">bitmap\n data</a> to <var>image</var>'s image data, <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#cropped-to-the-source-rectangle-with-formatting\" id=\"the-imagebitmap-interface:cropped-to-the-source-rectangle-with-formatting-5\">cropped to the source rectangle with\n formatting</a>.</p>"
36082
36058
},
36083
36059
{
36084
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel-5\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36085
-
"rationale": "resolve",
36086
-
"steps": [
36087
-
{
36088
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36089
-
}
36090
-
]
36060
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-7\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-7\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
36091
36061
}
36092
36062
]
36093
36063
},
@@ -36103,13 +36073,7 @@
36103
36073
"html": "<p>Set the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-8\">origin-clean</a> flag of\n <var>imageBitmap</var>'s bitmap to the same value as the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-imagebitmap-interface:concept-canvas-origin-clean-9\">origin-clean</a> flag of <var>image</var>'s\n bitmap.</p>"
36104
36074
},
36105
36075
{
36106
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel-6\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36107
-
"rationale": "resolve",
36108
-
"steps": [
36109
-
{
36110
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36111
-
}
36112
-
]
36076
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-8\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-8\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
36113
36077
}
36114
36078
]
36115
36079
},
@@ -36122,13 +36086,7 @@
36122
36086
"html": "<p>Set <var>imageBitmap</var>'s <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#concept-imagebitmap-bitmap-data\" id=\"the-imagebitmap-interface:concept-imagebitmap-bitmap-data-18\">bitmap\n data</a> to a copy of <var>image</var>'s visible pixel data, <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#cropped-to-the-source-rectangle-with-formatting\" id=\"the-imagebitmap-interface:cropped-to-the-source-rectangle-with-formatting-7\">cropped to the source\n rectangle with formatting</a>.</p>"
36123
36087
},
36124
36088
{
36125
-
"html": "Run this step <a id=\"the-imagebitmap-interface:in-parallel-7\" href=\"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel\">in parallel</a>:",
36126
-
"rationale": "resolve",
36127
-
"steps": [
36128
-
{
36129
-
"html": "<p>Resolve <var>p</var> with <var>imageBitmap</var>.</p>"
36130
-
}
36131
-
]
36089
+
"html": "<p><a id=\"the-imagebitmap-interface:queue-a-global-task-9\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a>, using the <a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#bitmap-task-source\" id=\"the-imagebitmap-interface:bitmap-task-source-9\">bitmap task source</a>, to\n resolve <var>promise</var> with <var>imageBitmap</var>.</p>"
0 commit comments