Skip to content

Commit e2ab706

Browse files
authored
[cssom-view] Remove caret range concept from CaretPosition interface. (#10307)
* Remove `caret range` concept from `CaretPosition` interface. * Fix grammar. * Add note that `caret position` is not live.
1 parent 938e313 commit e2ab706

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

cssom-view-1/Overview.bs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,9 +1070,6 @@ result of running these steps:
10701070
<dt><a>caret offset</a>
10711071
<dd>The amount of 16-bit units to the left of where the
10721072
text insertion point indicator would have inserted.
1073-
1074-
<dt><a>caret range</a>
1075-
<dd>null
10761073
</dl>
10771074
1. Otherwise:
10781075

@@ -1085,7 +1082,8 @@ result of running these steps:
10851082
1. Return a <a>caret position</a> with its properties set as follows:
10861083
1. <a>caret node</a> is set to <var>startNode</var>.
10871084
1. <a>caret offset</a> is set to <var>startOffset</var>.
1088-
1. <a>caret range</a> is set to a collapsed {{Range}} object which [=range/start node=] and [=range/end node=] are <var>startNode</var>, and which [=range/start offset=] and [=range/end offset=] are <var>startOffset</var>.
1085+
1086+
Note: This <a>caret position</a> is not <a spec=html>live</a>.
10891087

10901088
Note: The specifics of hit testing are out of scope of this
10911089
specification and therefore the exact details of
@@ -1118,7 +1116,7 @@ in that the latter can return a <code>frameset</code> element.
11181116
<h3 id=the-caretposition-interface>The {{CaretPosition}} Interface</h3>
11191117

11201118
A <dfn>caret position</dfn> gives the position of a text insertion point indicator. It always has an associated
1121-
<dfn>caret node</dfn>, <dfn>caret offset</dfn>, and <dfn>caret range</dfn>. It is represented by a {{CaretPosition}} object.
1119+
<dfn>caret node</dfn> and <dfn>caret offset</dfn>. It is represented by a {{CaretPosition}} object.
11221120

11231121
<pre class=idl>
11241122
[Exposed=Window]
@@ -1136,20 +1134,17 @@ The <dfn attribute for=CaretPosition>offset</dfn> attribute must return the <a>c
11361134
The <dfn method for=CaretPosition>getClientRect()</dfn> method must follow these steps,
11371135
aborting on the first step that returns a value:
11381136

1139-
1. If <a>caret range</a> is not null:
1140-
1. Let <var>list</var> be the result of invoking the {{Range/getClientRects()}} method on the range.
1141-
1. If <var>list</var> is empty, return null.
1142-
1. Return the {{DOMRect}} object in <var>list</var> at index 0.
11431137
1. If <a>caret node</a> is a text entry widget that is a replaced element,
11441138
and that is in the document,
11451139
return a [=scaled=] {{DOMRect}} object for the caret in the widget
11461140
as represented by the <a>caret offset</a> value.
11471141
The <a>transforms</a> that apply to the element and its ancestors are applied.
1148-
1. Return null.
1142+
1. Otherwise:
11491143

1150-
Note: This {{DOMRect}} object is not <a spec=html>live</a>.
1144+
1. Let <var>caretRange</var> be a collapsed {{Range}} object whose [=range/start node=] and [=range/end node=] are set to <a>caret node</a>, and whose [=range/start offset=] and [=range/end offset=] are set to <a>caret offset</a>.
1145+
1. Return the {{DOMRect}} object which is the result of invoking the {{Range/getBoundingClientRect()}} method on <var>caretRange</var>.
11511146

1152-
Issue(10230): Consider removing <a>caret range</a> concept from <a>caret position</a> interface.
1147+
Note: This {{DOMRect}} object is not <a spec=html>live</a>.
11531148

11541149
<h2 id=extension-to-the-element-interface caniuse="element-scroll-methods">
11551150
Extensions to the {{Element}} Interface</h2>

0 commit comments

Comments
 (0)