Bug 1488657 - Have anonymous element in text input inherit scrollbar-width from the element. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D5101

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Xidorn Quan 2018-09-06 23:12:44 +00:00
Родитель dc19891fc2
Коммит fae150af6e
6 изменённых файлов: 70 добавлений и 0 удалений

Просмотреть файл

@ -91,6 +91,14 @@ if (!Services.prefs.getBoolPref("full-screen-api.unprefix.enabled")) {
});
}
if (!Services.prefs.getBoolPref("layout.css.scrollbar-width.enabled")) {
whitelist.push({
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
errorMessage: /Unknown property .*\bscrollbar-width\b/i,
isFromDevTools: false,
});
}
let propNameWhitelist = [
// These are CSS custom properties that we found a definition of but
// no reference to.

Просмотреть файл

@ -163,6 +163,7 @@ textarea > .preview-div {
display: inline-block;
ime-mode: inherit;
resize: inherit;
scrollbar-width: inherit;
-moz-control-character-visibility: visible;
overflow-clip-box: inherit;
}

Просмотреть файл

@ -131833,6 +131833,18 @@
{}
]
],
"css/css-scrollbars/textarea-scrollbar-width-none.html": [
[
"/css/css-scrollbars/textarea-scrollbar-width-none.html",
[
[
"/css/css-scrollbars/textarea-scrollbar-width-none-ref.html",
"=="
]
],
{}
]
],
"css/css-scrollbars/viewport-scrollbar-body.html": [
[
"/css/css-scrollbars/viewport-scrollbar-body.html",
@ -261203,6 +261215,11 @@
{}
]
],
"css/css-scrollbars/textarea-scrollbar-width-none-ref.html": [
[
{}
]
],
"css/css-scrollbars/viewport-scrollbar-body-ref.html": [
[
{}
@ -549827,6 +549844,14 @@
"95101024b4f27e93eb2c61c52df70845ae5842bf",
"support"
],
"css/css-scrollbars/textarea-scrollbar-width-none-ref.html": [
"9f505dd7f1d121c0bd0af0131b51f536225326b1",
"support"
],
"css/css-scrollbars/textarea-scrollbar-width-none.html": [
"dcfaf5b6270ee0e0092dc795d33bb01af0b9a695",
"reftest"
],
"css/css-scrollbars/viewport-scrollbar-body-ref.html": [
"4e07903e2ca1e5d0378845c8cc4754dc82b1ebf8",
"support"

Просмотреть файл

@ -0,0 +1,2 @@
[textarea-scrollbar-width-none.html]
prefs: [layout.css.scrollbar-width.enabled:true]

Просмотреть файл

@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reference</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<style>
textarea {
overflow: hidden;
white-space: pre;
}
</style>
<textarea cols="10" rows="10"></textarea>
<script>
let textarea = document.querySelector("textarea");
textarea.value = ('X'.repeat(100) + '\n').repeat(100);
</script>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Test: scrollbar-width should apply on &lt;textarea&gt;</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width">
<link rel="match" href="textarea-scrollbar-width-none-ref.html">
<style>
textarea {
scrollbar-width: none;
white-space: pre;
}
</style>
<textarea cols="10" rows="10"></textarea>
<script>
let textarea = document.querySelector("textarea");
textarea.value = ('X'.repeat(100) + '\n').repeat(100);
</script>