mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests script: More thoroughly convert between UTF-16 and UTF-8 offsets in text inputs DOM APIs for interacting with selection and text in text inputs `<input type=text>` and `<textarea>` all accept offsets and lenghths in UTF-16 code units. Servo was not converting all of these offsets into UTF-8 code units. This change makes it so that this conversion is done more thoroughly and makes it clear when the code is dealing with UTF-8 offsets and UTF-16 offsets. Helper functions are added for doing this conversion in both directions as it is necessary. In addition, a `char` iterator is added for `TextInput` as it is useful for doing this conversion. It will be used more completely in the future when a `Rope` data structure is extracted from `TextInput`. Finally, specification text is added to all of the DOM implementation touched here. Signed-off-by: Martin Robinson <[email protected]> -- wpt-commits: 78ebe5a82f362d69e24a30a06c994c7425bf4552 wpt-pr: 56945
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<title>Interlinear ruby annotation box with margin</title>
|
|
<link rel="match" href="ruby-annotation-with-margin-ref.html">
|
|
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#interlinear-layout">
|
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
<style>
|
|
body {
|
|
font-family: Ahem;
|
|
font-size: 10px;
|
|
}
|
|
|
|
ruby {
|
|
color: transparent;
|
|
}
|
|
|
|
rt {
|
|
color: green;
|
|
}
|
|
|
|
.under ruby {
|
|
ruby-position: under;
|
|
}
|
|
</style>
|
|
<div><ruby>base<rt style="margin: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-top: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-bottom: 10px;">annotation</rt></ruby></div>
|
|
|
|
<div class=under>
|
|
<div><ruby>base<rt style="margin: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-top: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-bottom: 10px;">annotation</rt></ruby></div>
|
|
</div>
|
|
|
|
<div style="writing-mode: vertical-lr">
|
|
<div><ruby>base<rt style="margin: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-top: 10px;">annotation</rt></ruby></div>
|
|
<div><ruby>base<rt style="margin-bottom: 10px;">annotation</rt></ruby></div>
|
|
</div>
|