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
The "codepoint locations" struct is defined but not really referenced throughout the rest of the spec. Its intention was to allow for multiple ranges of cached codepoint rects, but the getters and setters for character bounds spec assume that only one such range exists.
Since it doesn't seem that support for multiple ranges ended up being needed, remove the "codepoint locations" concept so that the setters/getters are consistent with the actual shape of EditContext's data structures.
Copy file name to clipboardExpand all lines: index.html
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,8 @@ <h4>EditContext state</h4>
115
115
<li><dfn>text formats</dfn> which is an array of [=text format=]. The array is initially empty.</li>
116
116
<li><dfn>control bounds</dfn> is a rectangle describing the area of the screen in which [=text=] is displayed. It is in the [=client coordinate=] system and the initial x, y, width, and height all 0.</li>
117
117
<li><dfn>selection bounds</dfn> is the rectangle describing the position of selection. It is in the [=client coordinate=] system and the initial x, y, width, and height are all 0.</li>
118
-
<li><dfn>codepoint locations</dfn> which is an array of [=codepoint location=]. The array is initially empty.</li>
118
+
<li><dfn>codepoint rects start index</dfn> which is an offset into [=text=] that respresents the position before the first codepoint whose location is reported by the first member of [=codepoint rects=] array.</li>
119
+
<li><dfn>codepoint rects</dfn> is an array of {{DOMRect}} defining the bounding box of each codepoint. The array is initially empty.</li>
119
120
</ul>
120
121
<p><dfn>text format</dfn> is a struct that indicates decorative properties that should be applied to the ranges of [=text=]. The struct contains:</p>
121
122
<ul>
@@ -124,16 +125,15 @@ <h4>EditContext state</h4>
124
125
<li><dfn>underline style</dfn>, a {{UnderlineStyle}} which is the preferred underline style of the decorated [=text=] range.</li>
125
126
<li><dfn>underline thickness</dfn>, a {{UnderlineThickness}} which is the preferred underline thickness of the decorated [=text=] range.</li>
126
127
</ul>
127
-
<p><dfn>codepoint location</dfn> is a struct that captures the location (in [=client coordinate=]s) of codepoints from [=text=]. Each struct represents a contigious run of codepoints starting at an offset within [=text=] indicated by [=start index=]. The struct contains:</p>
128
-
<ul>
129
-
<li><dfn>start index</dfn> which is an offset into [=text=] that respresents the position before the first codepoint whose location is reported by the first member of [=codepoint rects=] array.</li>
130
-
<li><dfn>codepoint rects</dfn> is an array of {{DOMRect}} defining the bounding box of each codepoint.</li>
131
-
</ul>
132
128
<pclass="note">
133
-
[=Codepoint locations=] provides the means for the user agent to query multiple ranges of [=text=] for positioning information.
134
-
Different platforms may require different positions to be cached to fulfill queries from the [=Text Input Service=] and this API shape allows for that flexibility.
135
-
It would be good if the API could be simplified to require just the positions of the actively composed text along with the [=selection bounds=] and [=control bounds=].
136
-
Exploration is needed to see if that is possible.
129
+
[=Codepoint rects=] provides the means for the user agent to query a range of
130
+
[=text=] for positioning information. The [=Text Input Service=] will use this
131
+
information, in tandem with the [=control bounds=] and [=selection bounds=], to
132
+
support the Text Input Method in properly displaying its user interface. For example,
133
+
the info can be used to position an IME window adjacent to text being composed.
134
+
Different platforms may require different positions to be cached to fulfill queries
135
+
from the [=Text Input Service=]. The user agent will indicate which positions are
136
+
required by firing {{CharacterBoundsUpdateEvent}}.
0 commit comments