Bug 1708384 - Properly hide -moz-control-character-visibility from content. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D114481
This commit is contained in:
Emilio Cobos Álvarez 2021-05-12 21:45:18 +00:00
Родитель 0bf5753ff1
Коммит 41179cf5d6
7 изменённых файлов: 31 добавлений и 30 удалений

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

@ -688,21 +688,6 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"-moz-control-character-visibility": {
"isInherited": true,
"subproperties": [
"-moz-control-character-visibility"
],
"supports": [],
"values": [
"hidden",
"inherit",
"initial",
"revert",
"unset",
"visible"
]
},
"-moz-float-edge": {
"isInherited": false,
"subproperties": [
@ -10940,6 +10925,10 @@ exports.PREFERENCES = [
"math-style",
"layout.css.math-style.enabled"
],
[
"-moz-control-character-visibility",
"layout.css.moz-control-character-visibility.enabled"
],
[
"-moz-osx-font-smoothing",
"layout.css.osx-font-smoothing.enabled"

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

@ -343,17 +343,17 @@ fails-if(!cocoaWidget) != osx-font-smoothing-2.html osx-font-smoothing-2-notref.
== osx-font-smoothing-2.html osx-font-smoothing-2-ref.html
# stray control chars should be visible by default, bug 1099557
!= control-chars-01a.html control-chars-01-notref.html
!= control-chars-01b.html control-chars-01-notref.html
!= control-chars-01c.html control-chars-01-notref.html
!= control-chars-01d.html control-chars-01-notref.html
!= control-chars-02.html control-chars-02-notref.html
== control-chars-03a.html control-chars-03-ref.html
== control-chars-03b.html control-chars-03-ref.html
pref(layout.css.control-characters.visible,true) != control-chars-04a.html control-chars-04-notref.html
pref(layout.css.control-characters.visible,true) != control-chars-04b.html control-chars-04-notref.html
pref(layout.css.control-characters.visible,true) != control-chars-04c.html control-chars-04-notref.html
pref(layout.css.control-characters.visible,true) != control-chars-04d.html control-chars-04-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) != control-chars-01a.html control-chars-01-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) != control-chars-01b.html control-chars-01-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) != control-chars-01c.html control-chars-01-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) != control-chars-01d.html control-chars-01-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) != control-chars-02.html control-chars-02-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) == control-chars-03a.html control-chars-03-ref.html
pref(layout.css.moz-control-character-visibility.enabled,true) == control-chars-03b.html control-chars-03-ref.html
pref(layout.css.moz-control-character-visibility.enabled,true) pref(layout.css.control-characters.visible,true) != control-chars-04a.html control-chars-04-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) pref(layout.css.control-characters.visible,true) != control-chars-04b.html control-chars-04-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) pref(layout.css.control-characters.visible,true) != control-chars-04c.html control-chars-04-notref.html
pref(layout.css.moz-control-character-visibility.enabled,true) pref(layout.css.control-characters.visible,true) != control-chars-04d.html control-chars-04-notref.html
# font fallback for <space> when not supported in the primary font family - bug 970891
== space-font-1.html space-font-1-ref.html

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

@ -49,7 +49,6 @@ def is_internal(prop):
# There are some special cases we may want to remove eventually.
OTHER_INTERNALS = [
"-moz-context-properties",
"-moz-control-character-visibility",
]
return prop.name in OTHER_INTERNALS

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

@ -94,7 +94,6 @@ const char* gInaccessibleProperties[] = {
"-x-span",
"-x-text-zoom",
"-moz-context-properties",
"-moz-control-character-visibility",
"-moz-default-appearance",
"-moz-inert",
"-moz-list-reversed", // parsed by UA sheets only

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

@ -24,8 +24,7 @@ const NON_CONTENT_ACCESSIBLE_PROPERTIES = [
"-moz-script-size-multiplier",
"-moz-default-appearance",
"-moz-inert",
// TODO(emilio): Whenever we stop using `-moz-binding` in a gazillion tests
// we should add it here.
"-moz-control-character-visibility",
];
const sheet = document.getElementById("sheet");
@ -56,6 +55,8 @@ for (const prop of NON_CONTENT_ACCESSIBLE_PROPERTIES) {
"",
prop + " shouldn't be accessible via CSSOM in content"
);
assert_false(CSS.supports(prop + ': initial'), prop + " shouldn't be exposed in CSS.supports");
assert_false(CSS.supports(prop, 'initial'), prop + " shouldn't be exposed in CSS.supports (2-value version)");
}, prop);
}
</script>

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

@ -6633,6 +6633,16 @@
mirror: always
rust: true
# Whether the `-moz-control-character-visibility` property is exposed to
# content.
#
# Only for testing purposes.
- name: layout.css.moz-control-character-visibility.enabled
type: RelaxedAtomicBool
value: false
mirror: always
rust: true
# Whether the `accent-color` css property is enabled.
- name: layout.css.accent-color.enabled
type: RelaxedAtomicBool

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

@ -337,6 +337,9 @@ ${helpers.predefined_type(
"text::MozControlCharacterVisibility",
"Default::default()",
engines="gecko",
enabled_in="chrome",
gecko_pref="layout.css.moz-control-character-visibility.enabled",
has_effect_on_gecko_scrollbars=False,
animation_value_type="none",
spec="Nonstandard"
)}