Skip to content

Commit 2053069

Browse files
authored
Note how orientation metadata affects naturalWidth/Height
Partially addresses #4495. This also cleans up some of the references and bibliography data for CSS Images.
1 parent 203842a commit 2053069

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

source

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,7 +3450,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
34503450
<li><dfn data-x-href="https://drafts.csswg.org/css2/visuren.html#line-box">line box</dfn></li>
34513451
<li><dfn data-x-href="https://drafts.csswg.org/css2/visuren.html#x24">out-of-flow</dfn></li>
34523452
<li><dfn data-x-href="https://drafts.csswg.org/css2/visuren.html#x25">in-flow</dfn></li>
3453-
<li><dfn data-x-href="https://drafts.csswg.org/css2/conform.html#intrinsic">intrinsic dimensions</dfn></li>
34543453
<li><dfn data-x-href="https://drafts.csswg.org/css2/box.html#box-content-area">content area</dfn></li>
34553454
<li><dfn data-x-href="https://drafts.csswg.org/css2/box.html#x10">content box</dfn></li>
34563455
<li><dfn data-x-href="https://drafts.csswg.org/css2/box.html#x14">border box</dfn></li>
@@ -3515,9 +3514,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
35153514
<td><dfn data-x-href="https://drafts.csswg.org/css2/box.html#propdef-border-right-color">'border-right-color'</dfn>
35163515
</table>
35173516

3518-
<p>The terms <dfn>intrinsic width</dfn> and <dfn>intrinsic height</dfn> refer to the width dimension and the height
3519-
dimension, respectively, of <span>intrinsic dimensions</span>.</p>
3520-
35213517
<p>The basic version of the <dfn
35223518
data-x-href="https://drafts.csswg.org/css2/visuren.html#display-prop">'display'</dfn> property
35233519
is defined in <cite>CSS</cite>, and the property is extended by other CSS
@@ -3552,21 +3548,22 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
35523548
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#transparent-black">transparent black</dfn></li>
35533549
</ul>
35543550

3555-
<p>The term <dfn
3556-
data-x-href="https://drafts.csswg.org/css-images/#intrinsic-aspect-ratio">intrinsic aspect
3557-
ratio</dfn> is used as defined in <cite>CSS Image Values and Replaced Content</cite> to define
3558-
the sizing of replaced content. <ref spec=CSSIMAGES></p>
3551+
<p>The following terms are defined in <cite>CSS Images</cite>: <ref spec=CSSIMAGES></p>
3552+
3553+
<ul class="brief">
3554+
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#default-object-size">default object size</dfn></li>
3555+
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#intrinsic-dimensions">intrinsic dimensions</dfn></li>
3556+
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#intrinsic-aspect-ratio">intrinsic aspect ratio</dfn></li>
3557+
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#intrinsic-height">intrinsic height</dfn></li>
3558+
<li><dfn data-x-href="https://drafts.csswg.org/css-images/#intrinsic-width">intrinsic width</dfn></li>
3559+
<li>The <dfn data-x-href="https://drafts.csswg.org/css-images-3/#the-image-orientation">'image-orientation'</dfn> property</li>
3560+
<li>The <dfn data-x-href="https://drafts.csswg.org/css-images/#the-object-fit">'object-fit'</dfn> property</li>
3561+
</ul>
35593562

35603563
<p>The term <dfn data-x-href="https://drafts.csswg.org/css-images-4/#paint-source">paint
3561-
source</dfn> is used as defined in <cite>CSS Image Values and Replaced Content</cite>
3564+
source</dfn> is used as defined in <cite>CSS Images Level 4</cite>
35623565
to define the interaction of certain HTML elements with the CSS 'element()'
3563-
function. <ref spec=CSSIMAGES></p>
3564-
3565-
<p>The term <dfn data-x-href="https://drafts.csswg.org/css-images/#default-object-size">default
3566-
object size</dfn> and the <dfn
3567-
data-x-href="https://drafts.csswg.org/css-images/#the-object-fit">'object-fit'</dfn> property
3568-
are also defined in <cite>CSS Image Values and Replaced Content</cite>: <ref
3569-
spec=CSSIMAGES></p>
3566+
function. <ref spec=CSSIMAGES4></p>
35703567

35713568
<p>The following features are defined in <cite>CSS Backgrounds and Borders</cite>: <ref
35723569
spec=CSSBG></p>
@@ -26851,6 +26848,12 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
2685126848
data-x="'px'">CSS pixels</span>, if the image has <span>intrinsic dimensions</span> and is <i
2685226849
data-x="img-available">available</i>, or else 0. <ref spec=CSS></p>
2685326850

26851+
<p class="note">Since the <span>intrinsic dimensions</span> of an image take into account any
26852+
orientation specified in its metadata, <code data-x="dom-img-naturalWidth">naturalWidth</code> and
26853+
<code data-x="dom-img-naturalHeight">naturalHeight</code> reflect the dimensions after applying
26854+
any rotation needed to correctly orient the image, regardless of the value of the
26855+
<span>'image-orientation'</span> property.</p>
26856+
2685426857
<p>The IDL attribute <dfn data-x="dom-img-complete"><code>complete</code></dfn> must return true if
2685526858
any of the following conditions is true:</p>
2685626859

@@ -124730,7 +124733,7 @@ INSERT INTERFACES HERE
124730124733
<dd><cite><a href="https://drafts.csswg.org/css-style-attr/">CSS Style Attributes</a></cite>, T. &Ccedil;elik, E. Etemad. W3C.</dd>
124731124734

124732124735
<dt id="refsCSSBG">[CSSBG]</dt>
124733-
<dd><cite><a href="https://drafts.csswg.org/css-backgrounds/">CSS Backgrounds and Borders </a></cite>, B. Bos, E. Etemad, B. Kemper. W3C.</dd>
124736+
<dd><cite><a href="https://drafts.csswg.org/css-backgrounds/">CSS Backgrounds and Borders</a></cite>, B. Bos, E. Etemad, B. Kemper. W3C.</dd>
124734124737

124735124738
<dt id="refsCSSCASCADE">[CSSCASCADE]</dt>
124736124739
<dd><cite><a href="https://drafts.csswg.org/css-cascade/">CSS Cascading and Inheritance</a></cite>, E. Etemad, T. Atkins. W3C.</dd>
@@ -124757,7 +124760,10 @@ INSERT INTERFACES HERE
124757124760
<dd><cite><a href="https://drafts.csswg.org/css-grid/">CSS Grid Layout</a></cite>, T. Atkins, E. Etemad, R. Atanassov. W3C.</dd>
124758124761

124759124762
<dt id="refsCSSIMAGES">[CSSIMAGES]</dt>
124760-
<dd><cite><a href="https://drafts.csswg.org/css-images/">CSS Image Values and Replaced Content Module</a></cite>, E. Etemad, T. Atkins. W3C.</dd>
124763+
<dd><cite><a href="https://drafts.csswg.org/css-images/">CSS Images Module</a></cite>, E. Etemad, T. Atkins, L. Verou. W3C.</dd>
124764+
124765+
<dt id="refsCSSIMAGES4">[CSSIMAGES4]</dt>
124766+
<dd><cite><a href="https://drafts.csswg.org/css-images-4/">CSS Images Module Level 4</a></cite>, E. Etemad, T. Atkins, L. Verou. W3C.</dd>
124761124767

124762124768
<dt id="refsCSSLISTS">[CSSLISTS]</dt>
124763124769
<dd><cite><a href="https://drafts.csswg.org/css-lists/">CSS Lists and Counters</a></cite>, T. Atkins. W3C.</dd>

0 commit comments

Comments
 (0)