Automatic update from web-platform-tests TextOverflow: Compute ellipsis text with string This CL updates `LineTruncator` to respect a <string> value for the text-overflow CSS property. While this feature provides more flexibility for web developers, allowing a custom string for `text-overflow` can introduce security concerns in privileged UI contexts. A malicious actor could use this to spoof filenames or other sensitive text. To mitigate this risk, this CL also ensures that built-in UI controls force `text-overflow: ellipsis !important;`. This prevents the custom string value from being applied to sensitive system UI, protecting users from potential spoofing attacks. Spec: https://drafts.csswg.org/css-overflow-4/#text-overflow Bug: 41492459 Change-Id: I95d2d07d70e548b7395a6d68c42ecb61cab46625 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6773707 Reviewed-by: Andreu Botella <abotella@igalia.com> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Minseong Kim <jja08111@gmail.com> Cr-Commit-Position: refs/heads/main@{#1499889} -- wpt-commits: f007894c5fdcb709266d84ff808eff3bbd8f6f17 wpt-pr: 54243
29 lines
992 B
HTML
29 lines
992 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Basic User Interface Test: text-overflow with string and bidi text</title>
|
|
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-overflow-4">
|
|
<link rel="match" href="reference/text-overflow-string-005-ref.html">
|
|
<meta name="assert" content="When text-overflow is a string and the content overflows, the string should appear as ellipsis, and it should work correctly with bidirectional text.">
|
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
<style>
|
|
div {
|
|
font-family: monospace;
|
|
font-size: 20px;
|
|
white-space: pre;
|
|
width: 9ch;
|
|
overflow: hidden;
|
|
}
|
|
div.test {
|
|
text-overflow: "-";
|
|
}
|
|
</style>
|
|
<body>
|
|
<p>Test passes if each pair of lines looks identical</p>
|
|
<div class="test">שלום 123456</div>
|
|
<div>ם 123456-</div>
|
|
<br/>
|
|
<div class="test" dir=rtl>שלום 123456</div>
|
|
<div dir=rtl>שלום 456-</div>
|
|
</body>
|