Skip to content

Commit dec59e8

Browse files
committed
remove the confusing concept of variable A; remove limited support for AREA elements
1 parent f7d68af commit dec59e8

2 files changed

Lines changed: 96 additions & 135 deletions

File tree

cssom-view/Overview.html

Lines changed: 45 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,74 +1091,69 @@ <h3 id=offset-attributes><span class=secno>6.1. </span>The <code
10911091

10921092
<ol>
10931093
<li>
1094-
<p>If <var>A</var> is an <code>area</code> <a href="#html-element">HTML
1095-
element</a> which has a <code>map</code> <a href="#html-element">HTML
1096-
element</a> somewhere in the ancestor chain return the nearest ancestor
1097-
<code>map</code> <a href="#html-element">HTML element</a> and stop this
1098-
algorithm.
1099-
1100-
<li>
1101-
<p>If any of the following holds true return <code>null</code> and stop
1102-
this algorithm:</p>
1094+
<p>If any of the following holds true return null and terminate this
1095+
algorithm:</p>
11031096

11041097
<ul>
1105-
<li><var>A</var> does not have an associated CSS layout box.
1098+
<li>The element does not have an associated CSS layout box.
11061099

1107-
<li><var>A</var> is the root element.
1100+
<li>The element is the root element.
11081101

1109-
<li><var>A</var> is <a href="#the-html-body-element">the HTML
1102+
<li>The element is <a href="#the-html-body-element">the HTML
11101103
<code>body</code> element</a>.
11111104

1112-
<li>The computed value of the <code>position</code> property for element
1113-
<var>A</var> is <code>fixed</code>.
1105+
<li>The element's computed value of the &lsquo;<code
1106+
class=css><code>position</code></code>&rsquo; property is
1107+
<code>fixed</code>.
11141108
</ul>
11151109

11161110
<li>
1117-
<p>Return the nearest ancestor element of <var>A</var> for which at least
1111+
<p>Return the nearest ancestor element of the element for which at least
11181112
one of the following is true and stop this algorithm if such an ancestor
11191113
is found:</p>
11201114

11211115
<ul>
1122-
<li>The computed value of the <code>position</code> property is not
1116+
<li>The computed value of the &lsquo;<code
1117+
class=css><code>position</code></code>&rsquo; property is not
11231118
<code>static</code>.
11241119

11251120
<li>It is <a href="#the-html-body-element">the HTML <code>body</code>
11261121
element</a>.
11271122

1128-
<li>The computed value of the <code>position</code> property of
1129-
<var>A</var> is <code>static</code> and the ancestor is one of the
1130-
following <a href="#html-element" title="HTML element">HTML
1131-
elements</a>: <code>td</code>, <code>th</code>, or <code>table</code>.
1123+
<li>The computed value of the &lsquo;<code
1124+
class=css><code>position</code></code>&rsquo; property of the element
1125+
is <code>static</code> and the ancestor is one of the following <a
1126+
href="#html-element" title="HTML element">HTML elements</a>:
1127+
<code>td</code>, <code>th</code>, or <code>table</code>.
11321128
</ul>
11331129

11341130
<li>
1135-
<p>Return <code>null</code>.
1131+
<p>Return null.
11361132
</ol>
11371133

11381134
<p>The <dfn id=dom-htmlelement-offsettop><code>offsetTop</code></dfn>
1139-
attribute, when called on element <var>A</var>, <em class=ct>must</em>
1140-
return the value that is the result of the following algorithm:
1135+
attribute <em class=ct>must</em> return the result of running these steps:
11411136

11421137
<ol>
11431138
<li>
1144-
<p>If <var>A</var> is <a href="#the-html-body-element">the HTML
1139+
<p>If the element is <a href="#the-html-body-element">the HTML
11451140
<code>body</code> element</a> or does not have an associated CSS layout
1146-
box return zero and stop this algorithm.
1141+
box return zero and terminate this algorithm.
11471142

11481143
<li>
11491144
<p>If the <a
11501145
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
1151-
<var>A</var> is <code>null</code> or <a
1152-
href="#the-html-body-element">the HTML <code>body</code> element</a>
1153-
return the y-coordinate of the top <a href="#border-edge">border
1154-
edge</a> of <var>A</var> and stop this algorithm.
1146+
the element is null or <a href="#the-html-body-element">the HTML
1147+
<code>body</code> element</a> return the y-coordinate of the top <a
1148+
href="#border-edge">border edge</a> the element and terminate this
1149+
algorithm.
11551150

11561151
<li>
11571152
<p>Return the result of subtracting the y-coordinate of the top <a
11581153
href="#padding-edge">padding edge</a> of the <a
11591154
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
1160-
<var>A</var> from the y-coordinate of the top <a
1161-
href="#border-edge">border edge</a> of <var>A</var>, relative to the <a
1155+
the element from the y-coordinate of the top <a
1156+
href="#border-edge">border edge</a> of the element, relative to the <a
11621157
href="#initial-containing-block">initial containing block</a> origin.</p>
11631158

11641159
<p>In case of an inline element that consists of multiple line boxes only
@@ -1167,73 +1162,59 @@ <h3 id=offset-attributes><span class=secno>6.1. </span>The <code
11671162
</ol>
11681163

11691164
<p>The <dfn id=dom-htmlelement-offsetleft><code>offsetLeft</code></dfn>
1170-
attribute, when called on element <var>A</var>, <em class=ct>must</em>
1171-
return the value that is the result of the following algorithm:
1165+
attribute <em class=ct>must</em> return the result of running these steps:
11721166

11731167
<ol>
11741168
<li>
1175-
<p>If element <var>A</var> is <a href="#the-html-body-element">the HTML
1169+
<p>If the element is <a href="#the-html-body-element">the HTML
11761170
<code>body</code> element</a> or does not have an associated CSS layout
1177-
box return zero and stop this algorithm.
1171+
box return zero and terminate this algorithm.
11781172

11791173
<li>
11801174
<p>If the <a
11811175
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
1182-
<var>A</var> is <code>null</code> or <a
1183-
href="#the-html-body-element">the HTML <code>body</code> element</a>
1184-
return the x-coordinate of the left <a href="#border-edge">border
1185-
edge</a> of <var>A</var> and stop this algorithm.
1176+
the element is null or <a href="#the-html-body-element">the HTML
1177+
<code>body</code> element</a> return the x-coordinate of the left <a
1178+
href="#border-edge">border edge</a> the element and terminate this
1179+
algorithm.
11861180

11871181
<li>
11881182
<p>Return the result of subtracting the x-coordinate of the left <a
11891183
href="#padding-edge">padding edge</a> of the <a
11901184
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
1191-
<var>A</var> from the x-coordinate of the left <a
1192-
href="#border-edge">border edge</a> of <var>A</var>, relative to the <a
1185+
the element from the x-coordinate of the left <a
1186+
href="#border-edge">border edge</a> of the element, relative to the <a
11931187
href="#initial-containing-block">initial containing block</a> origin.</p>
11941188

11951189
<p>In case of an inline element that consists of multiple line boxes only
11961190
the first in content order is to be considered for the purposes of the
11971191
above algorithm.</p>
11981192
</ol>
1199-
<!--
1200-
When html:area has an html:map and that has an associated html:img
1201-
1202-
The shape attribute is set to default
1203-
offsetLeft and offsetTop are 0.
1204-
The shape attribute is set to circle
1205-
offsetLeft is the center-x value minus the radius and offsetTop is the center-y value minus the radius.
1206-
The shape attribute is set to rect
1207-
The shape attribute is set to poly
1208-
offsetLeft is the minimum of all x values and offsetTop is the minimum of all y values.
1209-
-->
12101193

12111194
<p>The <dfn id=dom-htmlelement-offsetwidth><code>offsetWidth</code></dfn>
1212-
attribute, when called on element <var>A</var>, <em class=ct>must</em>
1213-
return value that is the result of the following algorithm:
1195+
attribute <em class=ct>must</em> return the result of running these steps:
12141196

12151197
<ol>
12161198
<li>
1217-
<p>If <var>A</var> does not have an associated CSS layout box return zero
1218-
and stop this algorithm.
1199+
<p>If the element does not have an associated CSS layout box return zero
1200+
and terminate this algorithm.
12191201

12201202
<li>
1221-
<p>Return the <a href="#border-edge">border edge</a> width of
1222-
<var>A</var>.
1203+
<p>Return the <a href="#border-edge">border edge</a> width of the
1204+
element.
12231205
</ol>
12241206

12251207
<p>The <dfn id=dom-htmlelement-offsetheight><code>offsetHeight</code></dfn>
1226-
attribute, when called on element <var>A</var>, <em class=ct>must</em>
1227-
return value that is the result of the following algorithm:
1208+
attribute <em class=ct>must</em> return the result of running these steps:
12281209

12291210
<ol>
12301211
<li>
1231-
<p>If <var>A</var> does not have an associated CSS layout box return zero
1232-
and stop this algorithm.
1212+
<p>If the element does not have an associated CSS layout box return zero
1213+
and terminate this algorithm.
12331214

12341215
<li>
1235-
<p>Return the <a href="#border-edge">border edge</a> height of
1236-
<var>A</var>.
1216+
<p>Return the <a href="#border-edge">border edge</a> height of the
1217+
element.
12371218
</ol>
12381219

12391220
<h2 id=extensions-to-the-range-interface><span class=secno>7.

cssom-view/Overview.src.html

Lines changed: 51 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -894,69 +894,63 @@ <h3 id="offset-attributes">The <code title="">offsetParent</code>,
894894
steps:</p>
895895

896896
<ol>
897-
<li><p>If <var>A</var> is an <code>area</code> <span>HTML element</span>
898-
which has a <code>map</code> <span>HTML element</span> somewhere in the
899-
ancestor chain return the nearest ancestor <code>map</code>
900-
<span>HTML element</span> and stop this algorithm.</p></li>
901-
902897
<li>
903-
<p>If any of the following holds true return <code>null</code> and stop
904-
this algorithm:</p>
898+
<p>If any of the following holds true return null and terminate this
899+
algorithm:</p>
905900

906901
<ul>
907-
<li><var>A</var> does not have an associated CSS layout box.</li>
902+
<li>The element does not have an associated CSS layout box.</li>
908903

909-
<li><var>A</var> is the root element.</li>
904+
<li>The element is the root element.</li>
910905

911-
<li><var>A</var> is <span>the HTML <code>body</code>
912-
element</span>.</li>
906+
<li>The element is
907+
<span>the HTML <code>body</code> element</span>.</li>
913908

914-
<li>The computed value of the <code>position</code> property for
915-
element <var>A</var> is <code>fixed</code>.</li>
909+
<li>The element's computed value of the '<code>position</code>'
910+
property is <code>fixed</code>.</li>
916911
</ul>
917912
</li>
918913

919914
<li>
920-
<p>Return the nearest ancestor element of <var>A</var> for
921-
which at least one of the following is true and stop this algorithm if
922-
such an ancestor is found:</p>
915+
<p>Return the nearest ancestor element of the element for which at least
916+
one of the following is true and stop this algorithm if such an ancestor
917+
is found:</p>
923918

924919
<ul>
925-
<li>The computed value of the <code>position</code> property is not
920+
<li>The computed value of the '<code>position</code>' property is not
926921
<code>static</code>.</li>
927922

928923
<li>It is <span>the HTML <code>body</code> element</span>.</li>
929924

930-
<li>The computed value of the <code>position</code> property of
931-
<var>A</var> is <code>static</code> and the ancestor is one of the
925+
<li>The computed value of the '<code>position</code>' property of
926+
the element is <code>static</code> and the ancestor is one of the
932927
following <span title="HTML element">HTML elements</span>:
933928
<code>td</code>, <code>th</code>, or <code>table</code>.</li>
934929
</ul>
935930
</li>
936931

937-
<li><p>Return <code>null</code>.</p></li>
932+
<li><p>Return null.</p></li>
938933
</ol>
939934

940935
<p>The <dfn id="dom-htmlelement-offsettop"><code>offsetTop</code></dfn>
941-
attribute, when called on element <var>A</var>,
942-
<em class="ct">must</em> return the value that is the result of the
943-
following algorithm:</p>
936+
attribute <em class="ct">must</em> return the result of running these
937+
steps:</p>
944938

945939
<ol>
946-
<li><p>If <var>A</var> is <span>the HTML <code>body</code> element</span>
947-
or does not have an associated CSS layout box return zero and stop this
948-
algorithm.</p></li>
940+
<li><p>If the element is <span>the HTML <code>body</code> element</span>
941+
or does not have an associated CSS layout box return zero and terminate
942+
this algorithm.</p></li>
949943

950-
<li><p>If the <code>offsetParent</code> of <var>A</var> is
951-
<code>null</code> or <span>the HTML <code>body</code> element</span>
952-
return the y-coordinate of the top <span>border edge</span> of
953-
<var>A</var> and stop this algorithm.</p></li>
944+
<li><p>If the <code>offsetParent</code> of the element is
945+
null or <span>the HTML <code>body</code> element</span>
946+
return the y-coordinate of the top <span>border edge</span> the element
947+
and terminate this algorithm.</p></li>
954948

955949
<li>
956950
<p>Return the result of subtracting the y-coordinate of the top
957951
<span>padding edge</span> of the <code>offsetParent</code> of
958-
<var>A</var> from the y-coordinate of the top <span>border edge</span>
959-
of <var>A</var>, relative to the <span>initial containing block</span>
952+
the element from the y-coordinate of the top <span>border edge</span>
953+
of the element, relative to the <span>initial containing block</span>
960954
origin.</p>
961955

962956
<p>In case of an inline element that consists of multiple line boxes
@@ -966,25 +960,24 @@ <h3 id="offset-attributes">The <code title="">offsetParent</code>,
966960
</ol>
967961

968962
<p>The <dfn id="dom-htmlelement-offsetleft"><code>offsetLeft</code></dfn>
969-
attribute, when called on element <var>A</var>,
970-
<em class="ct">must</em> return the value that is the result of the
971-
following algorithm:</p>
963+
attribute <em class="ct">must</em> return the result of running these
964+
steps:</p>
972965

973966
<ol>
974-
<li><p>If element <var>A</var> is <span>the HTML <code>body</code>
967+
<li><p>If the element is <span>the HTML <code>body</code>
975968
element</span> or does not have an associated CSS layout box return zero
976-
and stop this algorithm.</p></li>
969+
and terminate this algorithm.</p></li>
977970

978-
<li><p>If the <code>offsetParent</code> of <var>A</var> is
979-
<code>null</code> or <span>the HTML <code>body</code> element</span>
980-
return the x-coordinate of the left <span>border edge</span> of
981-
<var>A</var> and stop this algorithm.</p></li>
971+
<li><p>If the <code>offsetParent</code> of the element is
972+
null or <span>the HTML <code>body</code> element</span>
973+
return the x-coordinate of the left <span>border edge</span> the element
974+
and terminate this algorithm.</p></li>
982975

983976
<li>
984977
<p>Return the result of subtracting the x-coordinate of the left
985978
<span>padding edge</span> of the <code>offsetParent</code> of
986-
<var>A</var> from the x-coordinate of the left <span>border edge</span>
987-
of <var>A</var>, relative to the <span>initial containing block</span>
979+
the element from the x-coordinate of the left <span>border edge</span>
980+
of the element, relative to the <span>initial containing block</span>
988981
origin.</p>
989982

990983
<p>In case of an inline element that consists of multiple line boxes
@@ -993,42 +986,29 @@ <h3 id="offset-attributes">The <code title="">offsetParent</code>,
993986
</li>
994987
</ol>
995988

996-
<!--
997-
When html:area has an html:map and that has an associated html:img
998-
999-
The shape attribute is set to default
1000-
offsetLeft and offsetTop are 0.
1001-
The shape attribute is set to circle
1002-
offsetLeft is the center-x value minus the radius and offsetTop is the center-y value minus the radius.
1003-
The shape attribute is set to rect
1004-
The shape attribute is set to poly
1005-
offsetLeft is the minimum of all x values and offsetTop is the minimum of all y values.
1006-
-->
1007-
1008-
<p>The <dfn id="dom-htmlelement-offsetwidth"><code>offsetWidth</code></dfn>
1009-
attribute, when called on element <var>A</var>,
1010-
<em class="ct">must</em> return value that is the result of the following
1011-
algorithm:</p>
989+
<p>The
990+
<dfn id="dom-htmlelement-offsetwidth"><code>offsetWidth</code></dfn>
991+
attribute <em class="ct">must</em> return the result of running these
992+
steps:</p>
1012993

1013994
<ol>
1014-
<li><p>If <var>A</var> does not have an associated CSS layout box return
1015-
zero and stop this algorithm.</p></li>
995+
<li><p>If the element does not have an associated CSS layout box return
996+
zero and terminate this algorithm.</p></li>
1016997

1017-
<li><p>Return the <span>border edge</span> width of
1018-
<var>A</var>.</p></li>
998+
<li><p>Return the <span>border edge</span> width of the element.</p></li>
1019999
</ol>
10201000

1021-
<p>The <dfn id="dom-htmlelement-offsetheight"><code>offsetHeight</code></dfn>
1022-
attribute, when called on element <var>A</var>,
1023-
<em class="ct">must</em> return value that is the result of the following
1024-
algorithm:</p>
1001+
<p>The
1002+
<dfn id="dom-htmlelement-offsetheight"><code>offsetHeight</code></dfn>
1003+
attribute <em class="ct">must</em> return the result of running these
1004+
steps:</p>
10251005

10261006
<ol>
1027-
<li><p>If <var>A</var> does not have an associated CSS layout box return
1028-
zero and stop this algorithm.</p></li>
1007+
<li><p>If the element does not have an associated CSS layout box return
1008+
zero and terminate this algorithm.</p></li>
10291009

1030-
<li><p>Return the <span>border edge</span> height of
1031-
<var>A</var>.</p></li>
1010+
<li><p>Return the <span>border edge</span> height of the
1011+
element.</p></li>
10321012
</ol>
10331013

10341014

0 commit comments

Comments
 (0)