Permalink
Browse files

Perform "is not origin-clean" on ImageBitmap too

Fixes part of #3341.
  • Loading branch information...
annevk committed Jan 12, 2018
1 parent 42dd707 commit 25c1eefe3c123c57431f0e854a6b6d2127049629
Showing with 16 additions and 18 deletions.
  1. +16 −18 source
View
34 source
@@ -62308,12 +62308,20 @@ try {
<p>When a <code>CanvasImageSource</code> object represents an <code>ImageBitmap</code>, the
object's bitmap image data must be used as the source image.</p>
<p><dfn>The <var>image argument</var> is not origin-clean</dfn> if it is an
<code>HTMLOrSVGImageElement</code> or <code>HTMLVideoElement</code> whose <span>origin</span> is
not the <span data-x="same origin">same</span> as the <span
data-x="concept-settings-object-origin">origin</span> specified by the <span>entry settings
object</span>, or if it is an <code>HTMLCanvasElement</code> whose bitmap's <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag is false.</p>
<p>An object <var>image</var> <dfn id=the-image-argument-is-not-origin-clean>is not
origin-clean</dfn> if, switching on <var>image</var>:</p>
<dl class=switch>
<dt><code>HTMLOrSVGImageElement</code>
<dt><code>HTMLVideoElement</code>
<dd><p><var>image</var>'s <span>origin</span> is not <span>same origin</span> with <span>entry
settings object</span>'s <span data-x="concept-settings-object-origin">origin</span>.</p></dd>
<dt><code>HTMLCanvasElement</code>
<dt><code>ImageBitMap</code>
<dd><p><var>image</var>'s bitmap's <span data-x="concept-canvas-origin-clean">origin-clean</span>
flag is false.</p></dd>
</dl>
@@ -62626,10 +62634,6 @@ try {
<var>repetition</var>)</code></dfn> method, when invoked, must run these steps:</p>
<ol>
<li><p>Let <var>image</var> be the first argument and <var>repetition</var> be
the second argument.</p></li>
<li><p>Let <var>usability</var> be the result of <span data-x="check the usability of the image
argument">checking the usability of</span> <var>image</var>.</p></li>
@@ -62648,14 +62652,11 @@ try {
<li><p>Create a new <code>CanvasPattern</code> object with the image <var>image</var>
and the repetition behavior given by <var>repetition</var>.</p></li>
<!--ADD-TOPIC:Security-->
<li><p>If <span>the <var>image argument</var> is not origin-clean</span>, then mark the
<li><p>If <var>image</var> <span>is not origin-clean</span>, then mark the
<code>CanvasPattern</code> object as <dfn data-x="concept-canvas-pattern-not-origin-clean">not
origin-clean</dfn>.</p></li>
<!--REMOVE-TOPIC:Security-->
<li><p>Return the <code>CanvasPattern</code> object.</p></li>
</ol>
<p>Modifying the <var>image</var> used when creating a <code>CanvasPattern</code> object
@@ -63738,12 +63739,9 @@ v6DVT (also check for '- -' bits in the part above) -->
</li>
<!--ADD-TOPIC:Security-->
<li><p>If <span>the <var>image argument</var> is not origin-clean</span>, then set the
<li><p>If <var>image</var> <span>is not origin-clean</span>, then set the
<code>CanvasRenderingContext2D</code>'s <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag to false.</p></li>
<!--REMOVE-TOPIC:Security-->
</ol>
</div>

0 comments on commit 25c1eef

Please sign in to comment.