Skip to content

Commit

Permalink
[cssom-view] Specify partial grapheme clusters for range.getClientRec…
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Apr 14, 2016
1 parent e711a2f commit 7dd1183
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cssom-view/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,15 @@ static {{DOMRect}} objects in content order that matches the
following constraints:

* For each element selected by the range, whose parent is not selected by the range, include the border areas returned by invoking {{Element/getClientRects()}} on the element.
* For each {{Text}} node selected or partially selected by the range (including when the boundary-points are identical), include a {{DOMRect}} object (for the part that is selected, not the whole line box). The bounds of these {{DOMRect}} objects are computed using font metrics; thus, for horizontal writing, the vertical dimension of each box is determined by the font ascent and descent, and the horizontal dimension by the text advance width. The <a>transforms</a> that apply to the ancestors are applied.
* For each {{Text}} node selected or partially selected by the range (including when the
boundary-points are identical), include a {{DOMRect}} object (for the part that is selected, not
the whole line box). The bounds of these {{DOMRect}} objects are computed using font metrics;
thus, for horizontal writing, the vertical dimension of each box is determined by the font
ascent and descent, and the horizontal dimension by the text advance width. If the range covers
a partial <a spec=css-text>typographic character unit</a> (e.g. half a surrogate pair or part of
a grapheme cluster), the full <a spec=css-text>typographic character unit</a> must be included
for the purpose of computing the bounds of the relevant {{DOMRect}}. [[!CSS-TEXT-3]] The
<a>transforms</a> that apply to the ancestors are applied.

The <dfn method for=Range>getBoundingClientRect()</dfn> method, when invoked, must return the result of the following
algorithm:
Expand Down

0 comments on commit 7dd1183

Please sign in to comment.