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
When the selection's range is mutated by scripts, e.g. via selectNode(node), direction of the selection must be preserved.
815
822
</p>
816
823
817
824
<p>
818
-
各 `選択$には
825
+
各 `選択$ %選択 は、
819
826
`~anchor@sL
820
827
( `anchor^en ),
821
828
`~focus@sL
822
-
( `focus^en )もある
823
-
【順に, “選択し始めた地点”, “選択し終えた地点” を表す】:
829
+
( `focus^en )
830
+
も有する
831
+
【順に, “選択し始めた地点”, “選択し終えた地点” を表現する】。
832
+
それらは、
833
+
%選択 の`範囲o$sL %範囲o ~EQ ~NULL の場合,
834
+
どちらも ~NULL になるとする
835
+
— 他の場合、
836
+
%選択 の`方向$sLに応じて:
824
837
◎
825
838
Each selections also have an anchor and a focus.\
839
+
If the selection's range is null, its anchor and focus are both null.\
840
+
If the selection's range is not null and its direction\
826
841
</p>
827
-
<ul>
842
+
<ulclass="switch">
828
843
<li>
829
-
`選択$の`範囲o$sL ~EQ ~NULL の場合、[
830
-
`~anchor$sL, `~focus$sL
831
-
]どちらも ~NULL を返すとする。
844
+
`前方$i
845
+
⇒#
846
+
`~anchor$sLは %範囲o の`始端$を指すとする。
847
+
`~focus$sLは %範囲o の`終端$を指すとする。
832
848
◎
833
-
If the selection's range is null, its anchor and focus are both null.\
849
+
is forwards, its anchor is the range's start, and its focus is the end.\
834
850
</li>
835
851
<li>
836
-
<p>
837
-
`選択$の`範囲o$sL ~NEQ ~NULL の場合、
838
-
`選択$の`方向$sLに応じて
839
-
</p>
840
-
<ul>
841
-
<li>
842
-
`前方$i ならば [
843
-
`~anchor$sLは`範囲o$sLの`始端$,`~focus$sLは`範囲o$sLの`終端$
844
-
]を返すとする。
845
-
</li>
846
-
<li>
847
-
他の場合は[
848
-
`~anchor$sLは`範囲o$sLの`終端$, `~focus$sLは`範囲o$sLの`始端$
849
-
]を返すとする。
850
-
</li>
851
-
</ul>
852
+
他の場合
853
+
⇒#
854
+
`~anchor$sLは %範囲o の`終端$を指すとする。
855
+
`~focus$sLは %範囲o の`始端$を指すとする。
852
856
◎
853
-
If the selection's range is not null and its direction is forwards, its anchor is the range's start, and its focus is the end. Otherwise, its focus is the start and its anchor is the end.
857
+
Otherwise, its focus is the start and its anchor is the end.
If alter is not ASCII case-insensitive match with "extend" or "move", abort these steps.
1867
-
◎
1868
-
If direction is not ASCII case-insensitive match with "forward", "backward", "left", or "right", abort these steps.
1869
-
◎
1870
-
If granularity is not ASCII case-insensitive match with "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", "documentboundary", abort these steps.
If direction is ASCII case-insensitive match with "forward", set effectiveDirection to forwards.
1892
-
◎
1893
-
If direction is ASCII case-insensitive match with "right" and inline base direction of this selection's focus is ltr, set effectiveDirection to forwards.
1894
-
◎
1895
-
If direction is ASCII case-insensitive match with "left" and inline base direction of this selection's focus is rtl, set effectiveDirection to forwards.
1896
-
◎
1897
-
Set this selection's direction to effectiveDirection.
1891
+
%direction ~IN { `forward^l, %~text方向 }
1898
1892
</li>
1899
1893
<li>
1900
1894
<p>
1901
1895
%alter に応じて:
1902
-
◎
1903
-
↓</p>
1896
+
</p>
1904
1897
<ulclass="switch">
1905
1898
<li>
1906
1899
`extend^l
1907
1900
⇒
1908
1901
コレの`~focus$sL ~SET [
1909
1902
利用者が選択を %granularity により拡張するよう要請した
1910
1903
]とするときの所在
1911
-
◎
1912
-
If alter is ASCII case-insensitive match with "extend", set this selection's focus to the location as if the user had requested to extend selection by granularity.
Otherwise, set this selection's focus and anchor to the location as if the user had requested to move selection by granularity.
1924
1913
</li>
1925
1914
</ul>
1926
1915
1927
-
<pclass="note">注記:
1916
+
<pclass="issue">【! class="note"】
1928
1917
%granularity により選択を[
1929
1918
拡張する/移動する
1930
1919
]とは何を意味するか,もっと精確に定義する必要がある。
1920
+
</p>
1921
+
</li>
1922
+
</ol>
1923
+
1924
+
◎
1925
+
The method must follow these steps:
1926
+
• If alter is not ASCII case-insensitive match with "extend" or "move", abort these steps.
1927
+
• If direction is not ASCII case-insensitive match with "forward", "backward", "left", or "right", abort these steps.
1928
+
• If granularity is not ASCII case-insensitive match with "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", "documentboundary", abort these steps.
1929
+
• If this selection is empty, abort these steps.
1930
+
• Let effectiveDirection be backwards.
1931
+
• If direction is ASCII case-insensitive match with "forward", set effectiveDirection to forwards.
1932
+
• If direction is ASCII case-insensitive match with "right" and the resolved text direction at this selection's focus is ltr, set effectiveDirection to forwards.
1933
+
• If direction is ASCII case-insensitive match with "left" and the resolved text direction at this selection's focus is rtl, set effectiveDirection to forwards.
1934
+
• Set this selection's direction to effectiveDirection.
1935
+
• If alter is ASCII case-insensitive match with "extend", set this selection's focus to the location as if the user had requested to extend selection by granularity.
1936
+
• Otherwise, set this selection's focus and anchor to the location as if the user had requested to move selection by granularity.
1937
+
◎
1938
+
The resolved text direction at a boundary point is ltr if the embedding direction ([UAX9] BD3) of the character at that position is L, and rtl if the embedding direction is R.
1931
1939
◎
1932
1940
Note
1933
1941
1934
-
We need to more precisely define what it means to extend or move selection by each granularity.
1935
-
</p>
1942
+
At a bidi boundary—where adjacent characters have different embedding directions—user agents may use additional context (such as caret affinity based on the direction of cursor movement) to determine which character's embedding direction to use.
1943
+
◎
1944
+
Note
1936
1945
1937
-
</li>
1938
-
</ol>
1946
+
We need to more precisely define what it means to extend or move selection by each granularity.
0 commit comments