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
Add client coordinate definition and note on usage during scroll (#85)
There are ReSpec errors because "client coordinate system" is used but not defined. I didn't find a good definition from another spec, so I've added a definition here.
Per #39, add a note on the fact that authors may want to adjust coordinates during scroll if they want to the IME window position to move with the content.
Closes#39.
Copy file name to clipboardExpand all lines: index.html
+32-2Lines changed: 32 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -113,8 +113,8 @@ <h4>EditContext state</h4>
113
113
<li><dfn>composition start</dfn> which refers to the offset in [=text=] representing the start position of the text being actively composed. The initial value is 0.</p></li>
114
114
<li><dfn>composition end</dfn> which refers to the offset in [=text=] representing the end position of the text being actively composed. The initial value is 0. [=composition end=] must always be greater than or equal to [=composition start=].</li>
115
115
<li><dfn>text formats</dfn> which is an array of [=text format=]. The array is initially empty.</li>
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
-
<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>
116
+
<li><dfn>control bounds</dfn> is a {{DOMRect}} describing the area of the viewport in which [=text=] is displayed. It is in the [=client coordinate system=] and the initial x, y, width, and height are all 0.</li>
117
+
<li><dfn>selection bounds</dfn> is a {{DOMRect}} 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
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
119
<li><dfn>codepoint rects</dfn> is an array of {{DOMRect}} defining the bounding box of each codepoint. The array is initially empty.</li>
120
120
</ul>
@@ -135,6 +135,36 @@ <h4>EditContext state</h4>
135
135
from the [=Text Input Service=]. The user agent will indicate which positions are
136
136
required by firing {{CharacterBoundsUpdateEvent}}.
137
137
</p>
138
+
<p>
139
+
[=Control bounds=], [=selection bounds=], and [=codepoint rects=] are given in the
140
+
<dfn>client coordinate system</dfn>, which is defined as a two-dimensional Cartesian
141
+
coordinate system (x, y) where the origin is the top-left corner of the
0 commit comments