Skip to content

Commit ded115c

Browse files
committed
elements relative to <body> will now report their offset relative to <body> rather than the initial containing block
1 parent dec59e8 commit ded115c

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

cssom-view/Overview.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,10 +1143,10 @@ <h3 id=offset-attributes><span class=secno>6.1. </span>The <code
11431143
<li>
11441144
<p>If the <a
11451145
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
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.
1146+
the element is null return the y-coordinate of the top <a
1147+
href="#border-edge">border edge</a> of the element, relative to the <a
1148+
href="#initial-containing-block">initial containing block</a> origin,
1149+
and terminate this algorithm.
11501150

11511151
<li>
11521152
<p>Return the result of subtracting the y-coordinate of the top <a
@@ -1173,10 +1173,10 @@ <h3 id=offset-attributes><span class=secno>6.1. </span>The <code
11731173
<li>
11741174
<p>If the <a
11751175
href="#dom-htmlelement-offsetparent"><code>offsetParent</code></a> of
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.
1176+
the element is null return the x-coordinate of the left <a
1177+
href="#border-edge">border edge</a> of the element, relative to the <a
1178+
href="#initial-containing-block">initial containing block</a> origin,
1179+
and terminate this algorithm.
11801180

11811181
<li>
11821182
<p>Return the result of subtracting the x-coordinate of the left <a

cssom-view/Overview.src.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -941,10 +941,10 @@ <h3 id="offset-attributes">The <code title="">offsetParent</code>,
941941
or does not have an associated CSS layout box return zero and terminate
942942
this algorithm.</p></li>
943943

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>
944+
<li><p>If the <code>offsetParent</code> of the element is null return the
945+
y-coordinate of the top <span>border edge</span> of the element, relative
946+
to the <span>initial containing block</span> origin, and terminate this
947+
algorithm.</p></li>
948948

949949
<li>
950950
<p>Return the result of subtracting the y-coordinate of the top
@@ -968,10 +968,10 @@ <h3 id="offset-attributes">The <code title="">offsetParent</code>,
968968
element</span> or does not have an associated CSS layout box return zero
969969
and terminate this algorithm.</p></li>
970970

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>
971+
<li><p>If the <code>offsetParent</code> of the element is null return the
972+
x-coordinate of the left <span>border edge</span> of the element,
973+
relative to the <span>initial containing block</span> origin, and
974+
terminate this algorithm.</p></li>
975975

976976
<li>
977977
<p>Return the result of subtracting the x-coordinate of the left

0 commit comments

Comments
 (0)