You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>To <dfnid="scroll-an-element-into-view">scroll an element into view</dfn>, optionally with an <i>align to top flag</i> set, and optionally with a scroll behavior<var>behavior</var> (which
1033
-
is <codetitle="">auto</code> if omitted), means to run these steps for each ancestor element or <ahref="#viewport">viewport</a> that establishes a scrolling box
1034
-
<var>box</var>, in order of innermost to outermost scrolling box:</p>
1045
+
<p>To <dfnid="scroll-an-element-into-view">scroll an element into view</dfn><var>element</var>, optionally with an <i>align to top flag</i> set, and optionally with a scroll behavior
1046
+
<var>behavior</var> (which is <codetitle="">auto</code> if omitted), means to run these steps for each ancestor element or <ahref="#viewport">viewport</a> that establishes
1047
+
a scrolling box <var>box</var>, in order of innermost to outermost scrolling box:</p>
1035
1048
1036
1049
<ol>
1037
1050
<li><p>If the <codeclass="external" data-anolis-spec="dom"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> associated
1038
-
with the element to be
1039
-
scrolled into view is not <aclass="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#same-origin">same origin</a> with the
1051
+
with <var>element</var> is not <aclass="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#same-origin">same origin</a> with the
1040
1052
<codeclass="external" data-anolis-spec="dom"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> associated with the element or
1041
1053
<ahref="#viewport">viewport</a> associated with <var>box</var>, terminate these
1042
1054
steps.</li>
1043
1055
1044
1056
<li><p>Let <var>position</var> be the scroll position <var>box</var> would have by following these steps:
1045
1057
1046
1058
<ol>
1047
-
<li><p>If the <i>align to top flag</i> is set align the top of
1048
-
the border box of the element to be scrolled into view with the top of
1049
-
<var>box</var>.</li>
1059
+
<li><p>If the <i>align to top flag</i> is set align <var>element</var>'s border box <ahref="#beginning-edges" title="beginning edges">beginning edge</a> in the <ahref="#block-flow-direction">block
1060
+
flow direction</a> with the <ahref="#beginning-edges" title="beginning edges">beginning edge</a> in the <ahref="#block-flow-direction">block flow direction</a> of <var>box</var>.</li>
1050
1061
1051
-
<li><p>Otherwise, if the <i>align to top flag</i> is not set
1062
+
<li><p>Otherwise, the <i>align to top flag</i> is not set;
1052
1063
align the bottom of the border box of the element to be scrolled into
1053
1064
view with the bottom of <var>box</var>.</li>
1054
1065
1055
-
<li><p>Align the left of the border box of the element to be scrolled
1056
-
into view with the left of <var>box</var>.</li>
1057
-
<!-- RTL is not special cased in implementations?! -->
1066
+
<li><p>Otherwise, the <i>align to top flag</i> is not set; align <var>element</var>'s border box <ahref="#ending-edges" title="ending edges">ending edge</a> in the
1067
+
<ahref="#block-flow-direction">block flow direction</a> with the <ahref="#ending-edges" title="ending edges">ending edge</a> in the <ahref="#block-flow-direction">block flow direction</a> of <var>box</var>.</li>
1068
+
1069
+
<li><p>Align <var>element</var>'s border box <ahref="#beginning-edges" title="beginning edges">beginning edge</a> in the <ahref="#inline-base-direction">inline base direction</a> with the
1070
+
<ahref="#beginning-edges" title="beginning edges">beginning edge</a> in the <ahref="#inline-base-direction">inline base direction</a> of <var>box</var>.
1071
+
<!-- This is wrong. It shouldn't scroll in the inline base direction if the element is visible. It should scroll just enough to make it fully visible. -->
1058
1072
</ol>
1059
1073
1060
1074
<li><p>If <var>position</var> is the same as <var>box</var>'s current scroll position, and <var>box</var> does not have an ongoing
<dt>If <var>box</var> is associated with an element</dt>
1066
1080
<dd>
1067
-
<p>Let <var>element</var> be the element.
1081
+
<p>Let <var>associated element</var> be the element.
1068
1082
<p>Let <var>task</var> be these steps:
1069
1083
<ol>
1070
1084
<li><p><aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">Fire an event</a>
1071
-
named <codetitle="">scroll</code> at the element
1072
-
associated <var>box</var>.</p>
1085
+
named <codetitle="">scroll</code> at <var>associated element</var>.</p>
1073
1086
</ol>
1074
1087
</dd>
1075
1088
1076
1089
<dt>If <var>box</var> is associated with a <ahref="#viewport">viewport</a></dt>
1077
1090
<dd>
1078
-
<p>Let <var>element</var> be the <codeclass="external" data-anolis-spec="dom"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code>'s root element as the associated element, if there is one, or
1079
-
null otherwise.
1091
+
<p>Let <var>associated element</var> be the <codeclass="external" data-anolis-spec="dom"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code>'s root element, if there is one, or null otherwise.
1080
1092
<p>Let <var>task</var> be these steps:
1081
1093
<ol>
1082
1094
<li><p><aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">Fire an event</a>
<li><p><ahref="#perform-a-scroll">Perform a scroll</a> of <var>box</var> to <var>position</var>, with the set of steps <var>task</var>,
1090
-
<var>element</var> as the associated element and <var>behavior</var> as the scroll behavior.
1102
+
<var>associated element</var> as the associated element and <var>behavior</var> as the scroll behavior.
1091
1103
1092
1104
</ol>
1093
1105
1094
-
<p>To <dfnid="scroll-an-element">scroll an element</dfn> to <var>x</var>,<var>y</var> optionally with a scroll behavior <var>behavior</var> (which is<codetitle="">auto</code> if
1095
-
omitted) means to:</p>
1106
+
<p>To <dfnid="scroll-an-element">scroll an element</dfn><var>element</var>to <var>x</var>,<var>y</var> optionally with a scroll behavior <var>behavior</var> (which is
1107
+
<codetitle="">auto</code> if omitted) means to:</p>
1096
1108
1097
1109
<ol>
1098
-
<li><p>Let <var>element</var> be the element.
1099
1110
<li><p>Let <var>box</var> be <var>element</var>'s associated scrolling box.
<p>To <dfn>scroll an element into view</dfn>, optionally with an <i>align to top flag</i> set, and optionally with a scroll behavior<var>behavior</var> (which
991
-
is <codetitle>auto</code> if omitted), means to run these steps for each ancestor element or <span>viewport</span> that establishes a scrolling box
992
-
<var>box</var>, in order of innermost to outermost scrolling box:</p>
1003
+
<p>To <dfn>scroll an element into view</dfn><var>element</var>, optionally with an <i>align to top flag</i> set, and optionally with a scroll behavior
1004
+
<var>behavior</var> (which is <codetitle>auto</code> if omitted), means to run these steps for each ancestor element or <span>viewport</span> that establishes
1005
+
a scrolling box <var>box</var>, in order of innermost to outermost scrolling box:</p>
993
1006
994
1007
<ol>
995
1008
<li><p>If the <codedata-anolis-spec=dom>Document</code> associated
996
-
with the element to be
997
-
scrolled into view is not <spandata-anolis-spec=html>same origin</span> with the
1009
+
with <var>element</var> is not <spandata-anolis-spec=html>same origin</span> with the
998
1010
<codedata-anolis-spec=dom>Document</code> associated with the element or
999
1011
<span>viewport</span> associated with <var>box</var>, terminate these
1000
1012
steps.</p></li>
1001
1013
1002
1014
<li><p>Let <var>position</var> be the scroll position <var>box</var> would have by following these steps:
1003
1015
1004
1016
<ol>
1005
-
<li><p>If the <i>align to top flag</i> is set align the top of
1006
-
the border box of the element to be scrolled into view with the top of
1007
-
<var>box</var>.</p></li>
1017
+
<li><p>If the <i>align to top flag</i> is set align <var>element</var>'s border box <spantitle="beginning edges">beginning edge</span> in the <span>block
1018
+
flow direction</span> with the <spantitle="beginning edges">beginning edge</span> in the <span>block flow direction</span> of <var>box</var>.</p></li>
1008
1019
1009
-
<li><p>Otherwise, if the <i>align to top flag</i> is not set
1020
+
<li><p>Otherwise, the <i>align to top flag</i> is not set;
1010
1021
align the bottom of the border box of the element to be scrolled into
1011
1022
view with the bottom of <var>box</var>.</p></li>
1012
1023
1013
-
<li><p>Align the left of the border box of the element to be scrolled
1014
-
into view with the left of <var>box</var>.</p></li>
1015
-
<!-- RTL is not special cased in implementations?! -->
1024
+
<li><p>Otherwise, the <i>align to top flag</i> is not set; align <var>element</var>'s border box <spantitle="ending edges">ending edge</span> in the
1025
+
<span>block flow direction</span> with the <spantitle="ending edges">ending edge</span> in the <span>block flow direction</span> of <var>box</var>.</p></li>
1026
+
1027
+
<li><p>Align <var>element</var>'s border box <spantitle="beginning edges">beginning edge</span> in the <span>inline base direction</span> with the
1028
+
<spantitle="beginning edges">beginning edge</span> in the <span>inline base direction</span> of <var>box</var>.
1029
+
<!-- This is wrong. It shouldn't scroll in the inline base direction if the element is visible. It should scroll just enough to make it fully visible. -->
1016
1030
</ol>
1017
1031
1018
1032
<li><p>If <var>position</var> is the same as <var>box</var>'s current scroll position, and <var>box</var> does not have an ongoing
<li><p><span>Perform a scroll</span> of <var>box</var> to <var>position</var>, with the set of steps <var>task</var>,
1048
-
<var>element</var> as the associated element and <var>behavior</var> as the scroll behavior.
1060
+
<var>associated element</var> as the associated element and <var>behavior</var> as the scroll behavior.
1049
1061
1050
1062
</ol>
1051
1063
1052
-
<p>To <dfn>scroll an element</dfn> to <var>x</var>,<var>y</var> optionally with a scroll behavior <var>behavior</var> (which is<codetitle>auto</code> if
1053
-
omitted) means to:</p>
1064
+
<p>To <dfn>scroll an element</dfn><var>element</var>to <var>x</var>,<var>y</var> optionally with a scroll behavior <var>behavior</var> (which is
1065
+
<codetitle>auto</code> if omitted) means to:</p>
1054
1066
1055
1067
<ol>
1056
-
<li><p>Let <var>element</var> be the element.
1057
1068
<li><p>Let <var>box</var> be <var>element</var>'s associated scrolling box.
0 commit comments