Skip to content

Commit 23108b1

Browse files
committed
Note effect of orientation metadata on naturalWidth and naturalHeight
Partially addresses whatwg#4495.
1 parent b07b778 commit 23108b1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,6 +3559,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
35593559
height</dfn></li>
35603560
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#intrinsic-width">intrinsic
35613561
width</dfn></li>
3562+
<li>The <dfn
3563+
data-x-href="https://drafts.csswg.org/css-images-3/#the-image-orientation">'image-orientation'</dfn>
3564+
property</li>
35623565
</ul>
35633566

35643567
<p>The term <dfn data-x-href="https://drafts.csswg.org/css-images-4/#paint-source">paint
@@ -26855,6 +26858,14 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
2685526858
data-x="'px'">CSS pixels</span>, if the image has <span>intrinsic dimensions</span> and is <i
2685626859
data-x="img-available">available</i>, or else 0. <ref spec=CSS></p>
2685726860

26861+
<div class="note">
26862+
<p>Since the <span>intrinsic dimensions</span> of an image take into account any
26863+
orientation specified in its metadata, <code data-x="dom-img-naturalWidth">naturalWidth</code>
26864+
and <code data-x="dom-img-naturalHeight">naturalHeight</code> reflect the dimensions after
26865+
applying any rotation <!--non-normative-->required to correctly orient the image, regardless of
26866+
the value of the <span>'image-orientation'</span> property.</p>
26867+
</div>
26868+
2685826869
<p>The IDL attribute <dfn data-x="dom-img-complete"><code>complete</code></dfn> must return true if
2685926870
any of the following conditions is true:</p>
2686026871

0 commit comments

Comments
 (0)