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
[cssom-view] Make scrollIntoView use the element's bounding border box so that elements with several boxes work. Also make scrollIntoView work for SVG elements. https://www.w3.org/Bugs/Public/show_bug.cgi?id=22060
<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
1011
1011
<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
1012
-
a scrolling box <var>box</var>, in order of innermost to outermost scrolling box:</p>
1012
+
a scrolling box <var>scrolling box</var>, in order of innermost to outermost scrolling box:</p>
1013
1013
1014
1014
<ol>
1015
1015
<li><p>If the <codedata-anolis-spec=dom>Document</code> associated
<span>viewport</span> associated with <var>box</var>, terminate these
1019
1019
steps.</p></li>
1020
1020
1021
-
<li><p>Let <var>box edge A</var> be the <spantitle="beginning edges">beginning edge</span> in the <span>block flow direction</span> of <var>box</var>, and let
1022
-
<var>element edge A</var> be <var>element</var>'s border box edge on the same physical side as that of <var>box edge A</var>.
1021
+
<li><p>Let <var>element bounding border box</var> be the box that the return value of invoking
1022
+
<codetitle=dom-Element-getBoundingClientRect>getBoundingClientRect()</code> on <var>element</var> represents.
1023
+
1024
+
<li><p>Let <var>scrolling box edge A</var> be the <spantitle="beginning edges">beginning edge</span> in the <span>block flow direction</span> of
1025
+
<var>scrolling box</var>, and let <var>element edge A</var> be <var>element bounding border box</var>'s edge on the same physical side as that of
1026
+
<var>scrolling box edge A</var>.
1023
1027
1024
-
<li><p>Let <var>box edge B</var> be the <spantitle="ending edges">ending edge</span> in the <span>block flow direction</span> of <var>box</var>, and let
1025
-
<var>element edge B</var> be <var>element</var>'s border box edge on the same physical side as that of <var>box edge B</var>.
1028
+
<li><p>Let <var>scrolling box edge B</var> be the <spantitle="ending edges">ending edge</span> in the <span>block flow direction</span> of <var>scrolling
1029
+
box</var>, and let <var>element edge B</var> be <var>element bounding border box</var>'s edge on the same physical side as that of <var>scrolling box edge
1030
+
B</var>.
1026
1031
1027
-
<li><p>Let <var>box edge C</var> be the <spantitle="beginning edges">beginning edge</span> in the <span>inline base direction</span> of <var>box</var>, and
1028
-
let <var>element edge C</var> be <var>element</var>'s border box edge on the same physical side as that of <var>box edge C</var>.
1032
+
<li><p>Let <var>scrolling box edge C</var> be the <spantitle="beginning edges">beginning edge</span> in the <span>inline base direction</span> of
1033
+
<var>scrolling box</var>, and let <var>element edge C</var> be <var>element bounding border box</var>'s edge on the same physical side as that of
1034
+
<var>scrolling box edge C</var>.
1029
1035
1030
-
<li><p>Let <var>box edge D</var> be the <spantitle="ending edges">ending edge</span> in the <span>inline base direction</span> of <var>box</var>, and let
1031
-
<var>element edge D</var> be <var>element</var>'s border box edge on the same physical side as that of <var>box edge D</var>.
1036
+
<li><p>Let <var>scrolling box edge D</var> be the <spantitle="ending edges">ending edge</span> in the <span>inline base direction</span> of <var>scrolling
1037
+
box</var>, and let <var>element edge D</var> be <var>element bounding border box</var>'s edge on the same physical side as that of <var>box edge D</var>.
1032
1038
1033
1039
<li><p>Let <var>element width</var> be the distance between <var>element edge C</var> and <var>element edge D</var>.
1034
1040
1035
-
<li><p>Let <var>box width</var> be the distance between <var>box edge C</var> and <var>box edge D</var>.
1041
+
<li><p>Let <var>scrolling box width</var> be the distance between <var>scrolling box edge C</var> and <var>scrolling box edge D</var>.
1036
1042
1037
-
<li><p>Let <var>position</var> be the scroll position <var>box</var> would have by following these steps:
1043
+
<li><p>Let <var>position</var> be the scroll position <var>scrolling box</var> would have by following these steps:
1038
1044
1039
1045
<ol>
1040
-
<li><p>If the <i>align to top flag</i> is set align <var>element edge A</var> with <var>box edge A</var>.</p></li>
1046
+
<li><p>If the <i>align to top flag</i> is set align <var>element edge A</var> with <var>scrolling box edge A</var>.</p></li>
1041
1047
1042
-
<li><p>Otherwise, the <i>align to top flag</i> is not set; align <var>element edge B</var> with <var>box edge B</var>.</p></li>
1048
+
<li><p>Otherwise, the <i>align to top flag</i> is not set; align <var>element edge B</var> with <var>scrolling box edge B</var>.</p></li>
1043
1049
1044
1050
<li>
1045
1051
<dlclass=switch>
1046
-
<dt>If <var>element edge C</var> and <var>element edge D</var> are both outside <var>box edge C</var> and <var>box edge D</var>
1052
+
<dt>If <var>element edge C</var> and <var>element edge D</var> are both outside <var>scrolling box edge C</var> and <var>scrolling box edge D</var>
1047
1053
<dd><p>Do nothing.
1048
1054
1049
-
<dt>If <var>element edge C</var> is outside <var>box edge C</var> and <var>element width</var> is less than <var>box width</var>
1050
-
<dt>If <var>element edge D</var> is outside <var>box edge D</var> and <var>element width</var> is greater than <var>box width</var>
1051
-
<dd><p>Align <var>element edge C</var> with <var>box edge C</var>.
1055
+
<dt>If <var>element edge C</var> is outside <var>scrolling box edge C</var> and <var>element width</var> is less than <var>scrolling box width</var>
1056
+
<dt>If <var>element edge D</var> is outside <var>scrolling box edge D</var> and <var>element width</var> is greater than <var>scrolling box width</var>
1057
+
<dd><p>Align <var>element edge C</var> with <var>scrolling box edge C</var>.
1052
1058
1053
-
<dt>If <var>element edge C</var> is outside <var>box edge C</var> and <var>element width</var> is greater than <var>box width</var>
1054
-
<dt>If <var>element edge D</var> is outside <var>box edge D</var> and <var>element width</var> is less than <var>box width</var>
1055
-
<dd><p>Align <var>element edge D</var> with <var>box edge D</var>.
1059
+
<dt>If <var>element edge C</var> is outside <var>scrolling box edge C</var> and <var>element width</var> is greater than <var>scrolling box width</var>
1060
+
<dt>If <var>element edge D</var> is outside <var>scrolling box edge D</var> and <var>element width</var> is less than <var>scrolling box width</var>
1061
+
<dd><p>Align <var>element edge D</var> with <var>scrolling box edge D</var>.
1056
1062
</dl>
1057
1063
</ol>
1058
1064
1059
-
<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
1065
+
<li><p>If <var>position</var> is the same as <var>scrolling box</var>'s current scroll position, and <var>scrolling box</var> does not have an ongoing
1060
1066
<spantitle=concept-smooth-scroll>smooth scroll</span>, abort these steps.
1061
1067
1062
1068
<li>
1063
1069
<dlclass=switch>
1064
-
<dt>If <var>box</var> is associated with an element</dt>
1070
+
<dt>If <var>scrolling box</var> is associated with an element</dt>
1065
1071
<dd>
1066
1072
<p>Let <var>associated element</var> be the element.
0 commit comments