@@ -889,30 +889,61 @@ <h3 id=scroll-attributes><span class=secno>5.2. </span>The <code
889889 title =""> scrollWidth</ code > , and < code title =""> scrollHeight</ code >
890890 attributes</ h3 >
891891
892- < p > The < dfn id =dom-element-scrolltop > < code > scrollTop</ code > </ dfn >
893- attribute, when called on element < var > A</ var > , < em class =ct > must</ em >
894- return the value that is the result of running the following algorithm:
892+ < p > The < dfn id =dom-element-scrolltop > < code > scrollTop</ code > </ dfn > attribute
893+ < em class =ct > must</ em > return the result of running these steps:
895894
896895 < ol >
897896 < li >
898- < p > If < var > A</ var > does not have an associated CSS layout box return zero
899- and stop this algorithm.
897+ < p > If the element does not have any associated CSS layout box or the
898+ element is the root element and the < a
899+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
900+ mode</ span > return zero and terminate these steps.
901+
902+ < li >
903+ < p > If the element is the root element return the value of < a
904+ href ="#dom-window-pageyoffset "> < code > pageYOffset</ code > </ a > .
905+
906+ < li >
907+ < p > If the element is < a href ="#the-html-body-element "> the HTML
908+ < code > body</ code > element</ a > , the < a
909+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
910+ mode</ span > , and the element does not have any overflow, return the
911+ value of < a href ="#dom-window-pageyoffset "> < code > pageYOffset</ code > </ a > .
900912
901913 < li >
902914 < p > Return the y-coordinate of the < a href ="#content "> content</ a > at the
903915 alignment point with the top of the < a href ="#content-edge "> content
904- edge</ a > of < var > A </ var > .
916+ edge</ a > of the element .
905917 </ ol >
906918
907919 < p > When setting the < a
908- href ="#dom-element-scrolltop "> < code > scrollTop</ code > </ a > attribute to < var
909- title =""> y</ var > on element < var > A</ var > , user agents < em
910- class =ct > must</ em > run the following algorithm:
920+ href ="#dom-element-scrolltop "> < code > scrollTop</ code > </ a > attribute these
921+ steps < em class =ct > must</ em > be run:
911922
912923 < ol >
913924 < li >
914- < p > If < var > A</ var > does not have an associated CSS layout box or vertical
915- overflow stop this algorithm.
925+ < p > Let < var title =""> y</ var > be the given value.
926+
927+ < li >
928+ < p > If the element does not have any associated CSS layout box, the
929+ element is the root element and the < a
930+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
931+ mode</ span > , or the element has no overflow, terminate these steps.
932+
933+ < li >
934+ < p > If the element is the root element invoke < a
935+ href ="#dom-window-screen "> < code
936+ title =dom-Window-screen > screen()</ code > </ a > with zero as first argument
937+ and < var title =""> y</ var > as second.
938+
939+ < li >
940+ < p > If the element is < a href ="#the-html-body-element "> the HTML
941+ < code > body</ code > element</ a > , the < a
942+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
943+ mode</ span > , and the element does not have any vertical overflow, invoke
944+ < a href ="#dom-window-screen "> < code
945+ title =dom-Window-screen > screen()</ code > </ a > with zero as first argument
946+ and < var title =""> y</ var > as second.
916947
917948 < li >
918949 < p > If < var title =""> y</ var > is infinite or NaN stop this algorithm.</ p >
@@ -928,33 +959,64 @@ <h3 id=scroll-attributes><span class=secno>5.2. </span>The <code
928959 < li >
929960 < p > Align < a href ="#content "> content</ a > y-coordinate < var
930961 title =""> y</ var > with the top of the < a href ="#content-edge "> content
931- edge</ a > of < var > A </ var > .
962+ edge</ a > of the element .
932963 </ ol >
933964
934965 < p > The < dfn id =dom-element-scrollleft > < code > scrollLeft</ code > </ dfn >
935- attribute, when called on element < var > A</ var > , < em class =ct > must</ em >
936- return the value that is the result of running the following algorithm:
966+ attribute < em class =ct > must</ em > return the result of running these steps:
937967
938968 < ol >
939969 < li >
940- < p > If < var > A</ var > does not have an associated CSS layout box return zero
941- and stop this algorithm.
970+ < p > If the element does not have any associated CSS layout box or the
971+ element is the root element and the < a
972+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
973+ mode</ span > return zero and terminate these steps.
974+
975+ < li >
976+ < p > If the element is the root element return the value of < a
977+ href ="#dom-window-pagexoffset "> < code > pageXOffset</ code > </ a > .
978+
979+ < li >
980+ < p > If the element is < a href ="#the-html-body-element "> the HTML
981+ < code > body</ code > element</ a > , the < a
982+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
983+ mode</ span > , and the element does not have any overflow, return the
984+ value of < a href ="#dom-window-pagexoffset "> < code > pageXOffset</ code > </ a > .
942985
943986 < li >
944987 < p > Return the x-coordinate of the < a href ="#content "> content</ a > at the
945988 alignment point with the left of the < a href ="#content-edge "> content
946- edge</ a > of < var > A </ var > .
989+ edge</ a > of the element .
947990 </ ol >
948991
949992 < p > When setting the < a
950- href ="#dom-element-scrollleft "> < code > scrollLeft</ code > </ a > attribute to
951- < var title =""> x</ var > on element < var > A</ var > , user agents < em
952- class =ct > must</ em > run the following algorithm:
993+ href ="#dom-element-scrollleft "> < code > scrollLeft</ code > </ a > attribute these
994+ steps < em class =ct > must</ em > be run:
953995
954996 < ol >
955997 < li >
956- < p > If < var > A</ var > does not have an associated CSS layout box or
957- horizontal overflow stop this algorithm.
998+ < p > Let < var title =""> x</ var > be the given value.
999+
1000+ < li >
1001+ < p > If the element does not have any associated CSS layout box, the
1002+ element is the root element and the < a
1003+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
1004+ mode</ span > , or the element has no overflow, terminate these steps.
1005+
1006+ < li >
1007+ < p > If the element is the root element invoke < a
1008+ href ="#dom-window-screen "> < code
1009+ title =dom-Window-screen > screen()</ code > </ a > with < var title =""> x</ var >
1010+ as first argument and zero as second.
1011+
1012+ < li >
1013+ < p > If the element is < a href ="#the-html-body-element "> the HTML
1014+ < code > body</ code > element</ a > , the < a
1015+ href ="#document "> < code > Document</ code > </ a > is in < span > quirks
1016+ mode</ span > , and the element does not have any vertical overflow, invoke
1017+ < a href ="#dom-window-screen "> < code
1018+ title =dom-Window-screen > screen()</ code > </ a > with < var title =""> x</ var >
1019+ as first argument and zero as second.
9581020
9591021 < li >
9601022 < p > If < var title =""> x</ var > is infinite or NaN stop this algorithm.</ p >
@@ -1001,8 +1063,8 @@ <h3 id=scroll-attributes><span class=secno>5.2. </span>The <code
10011063
10021064 < ol >
10031065 < li >
1004- < p > If < var > A</ var > does not have an associated CSS layout box return zero
1005- and stop this algorithm .
1066+ < p > If < var > A</ var > does not have any associated CSS layout box return
1067+ zero and terminate these steps .
10061068
10071069 < li >
10081070 < p > Return the computed value of the < code > padding-left</ code > property of
@@ -1017,8 +1079,8 @@ <h3 id=scroll-attributes><span class=secno>5.2. </span>The <code
10171079
10181080 < ol >
10191081 < li >
1020- < p > If < var > A</ var > does not have an associated CSS layout box return zero
1021- and stop this algorithm.
1082+ < p > If < var > A</ var > does not have any associated CSS layout box return
1083+ zero and stop this algorithm.
10221084
10231085 < li >
10241086 < p > Return the computed value of the < code > padding-top</ code > property of
0 commit comments