зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central r=merge a=merge
This commit is contained in:
Коммит
6664176f99
|
@ -133,14 +133,14 @@ var inputTests = [
|
|||
|
||||
// 13
|
||||
{
|
||||
input: "new Object({1: 'this\\nis\\nsupposed\\nto\\nbe\\na\\nvery" +
|
||||
input: "new Object({0: 'this\\nis\\nsupposed\\nto\\nbe\\na\\nvery" +
|
||||
"\\nlong\\nstring\\n,shown\\non\\na\\nsingle\\nline', " +
|
||||
"2: 'a shorter string', 3: 100})",
|
||||
output: '[ <1 empty slot>, "this is supposed to be a very long ' + ELLIPSIS +
|
||||
"1: 'a shorter string', 2: 100})",
|
||||
output: '[ "this is supposed to be a very long ' + ELLIPSIS +
|
||||
'", "a shorter string", 100 ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[4]"
|
||||
variablesViewLabel: "Object[3]"
|
||||
},
|
||||
|
||||
// 14
|
||||
|
|
|
@ -129,15 +129,6 @@ var inputTests = [
|
|||
},
|
||||
|
||||
// 14
|
||||
{
|
||||
input: '({0: "a", 42: "b"})',
|
||||
output: '[ "a", <9 empty slots>, 33 more\u2026 ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[43]",
|
||||
},
|
||||
|
||||
// 15
|
||||
{
|
||||
input: '({0: "a", 1: "b", 2: "c", 3: "d", 4: "e", 5: "f", 6: "g", ' +
|
||||
'7: "h", 8: "i", 9: "j", 10: "k", 11: "l"})',
|
||||
|
@ -148,7 +139,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object[12]",
|
||||
},
|
||||
|
||||
// 16
|
||||
// 15
|
||||
{
|
||||
input: '({0: "a", 1: "b", 2: "c", 3: "d", 4: "e", 5: "f", 6: "g", ' +
|
||||
'7: "h", 8: "i", 9: "j", 10: "k", 11: "l", m: "n"})',
|
||||
|
@ -159,7 +150,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 17
|
||||
// 16
|
||||
{
|
||||
input: '({" ": "a"})',
|
||||
output: 'Object { : "a" }',
|
||||
|
@ -168,7 +159,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 18
|
||||
// 17
|
||||
{
|
||||
input: '({})',
|
||||
output: 'Object { }',
|
||||
|
@ -177,34 +168,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 19
|
||||
{
|
||||
input: '({length: 0})',
|
||||
output: 'Object [ ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[0]",
|
||||
},
|
||||
|
||||
// 20
|
||||
{
|
||||
input: '({length: 1})',
|
||||
output: '[ <1 empty slot> ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[1]",
|
||||
},
|
||||
|
||||
// 21
|
||||
{
|
||||
input: '({0: "a", 1: "b", length: 1})',
|
||||
output: 'Object { 0: "a", 1: "b", length: 1 }',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 22
|
||||
// 18
|
||||
{
|
||||
input: '({0: "a", 1: "b", length: 2})',
|
||||
output: 'Object [ "a", "b" ]',
|
||||
|
@ -213,16 +177,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object[2]",
|
||||
},
|
||||
|
||||
// 23
|
||||
{
|
||||
input: '({0: "a", 1: "b", length: 3})',
|
||||
output: '[ "a", "b", <1 empty slot> ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[3]",
|
||||
},
|
||||
|
||||
// 24
|
||||
// 19
|
||||
{
|
||||
input: '({0: "a", 2: "b", length: 2})',
|
||||
output: 'Object { 0: "a", 2: "b", length: 2 }',
|
||||
|
@ -231,16 +186,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 25
|
||||
{
|
||||
input: '({0: "a", 2: "b", length: 3})',
|
||||
output: '[ "a", <1 empty slot>, "b" ]',
|
||||
printOutput: "[object Object]",
|
||||
inspectable: true,
|
||||
variablesViewLabel: "Object[3]",
|
||||
},
|
||||
|
||||
// 26
|
||||
// 20
|
||||
{
|
||||
input: '({0: "a", b: "b", length: 1})',
|
||||
output: 'Object { 0: "a", b: "b", length: 1 }',
|
||||
|
@ -249,7 +195,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 27
|
||||
// 21
|
||||
{
|
||||
input: '({0: "a", b: "b", length: 2})',
|
||||
output: 'Object { 0: "a", b: "b", length: 2 }',
|
||||
|
@ -258,7 +204,7 @@ var inputTests = [
|
|||
variablesViewLabel: "Object",
|
||||
},
|
||||
|
||||
// 28
|
||||
// 22
|
||||
{
|
||||
input: '({42: "a"})',
|
||||
output: 'Object { 42: "a" }',
|
||||
|
|
|
@ -1941,9 +1941,9 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
return false;
|
||||
}
|
||||
|
||||
// If no item is going to be displayed in preview, better display as sparse object.
|
||||
// The first key should contain the smallest integer index (if any).
|
||||
if (keys[0] >= OBJECT_PREVIEW_MAX_ITEMS) {
|
||||
// We don't want to represent Objects as sparse arrays, so every property
|
||||
// should match its index, or be the length property.
|
||||
if (keys.some((key, i) => parseInt(key, 10) !== i && key !== "length")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1956,8 +1956,16 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
// Otherwise, let length be the (presumably) greatest array index plus 1.
|
||||
length = +keys[keys.length - 1] + 1;
|
||||
}
|
||||
// Check if length is a valid array length, i.e. is a Uint32 number.
|
||||
if (typeof length !== "number" || length >>> 0 !== length) {
|
||||
|
||||
// If they are no numeric keys, or if the length does not represent the actual
|
||||
// object length, or is not a valid array length, i.e. is a Uint32 number,
|
||||
// do not label the object as ArrayLike.
|
||||
if (
|
||||
keys.length === 0 ||
|
||||
keys.length !== length ||
|
||||
typeof length !== "number" ||
|
||||
length >>> 0 !== length
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Test that objects are labeled as ArrayLike only when they have sequential
|
||||
// numeric keys, and if they have a length property, that it matches the number
|
||||
// of numeric keys. (See Bug 1371936)
|
||||
|
||||
async function run_test() {
|
||||
do_test_pending();
|
||||
await run_test_with_server(DebuggerServer);
|
||||
await run_test_with_server(WorkerDebuggerServer);
|
||||
do_test_finished();
|
||||
}
|
||||
|
||||
async function run_test_with_server(server) {
|
||||
initTestDebuggerServer(server);
|
||||
const debuggee = addTestGlobal("test-grips", server);
|
||||
debuggee.eval(function stopMe(arg1) {
|
||||
debugger;
|
||||
}.toString());
|
||||
|
||||
const dbgClient = new DebuggerClient(server.connectPipe());
|
||||
await dbgClient.connect();
|
||||
const [,, threadClient] = await attachTestTabAndResume(dbgClient, "test-grips");
|
||||
|
||||
// Currying test function so we don't have to pass the debuggee and clients
|
||||
const isArrayLike = object => test_object_grip_is_array_like(
|
||||
debuggee, dbgClient, threadClient, object);
|
||||
|
||||
equal(await isArrayLike({}), false, "An empty object is not ArrayLike");
|
||||
equal(await isArrayLike({length: 0}), false,
|
||||
"An object with only a length property is not ArrayLike");
|
||||
equal(await isArrayLike({2: "two"}), false,
|
||||
"Object not starting at 0 is not ArrayLike");
|
||||
equal(await isArrayLike({0: "zero", 2: "two"}), false,
|
||||
"Object with non-consecutive numeric keys is not ArrayLike");
|
||||
equal(await isArrayLike({0: "zero", 2: "two", length: 2}), false,
|
||||
"Object with non-consecutive numeric keys is not ArrayLike");
|
||||
equal(await isArrayLike({0: "zero", 1: "one", 2: "two", three: 3}), false,
|
||||
"Object with a non-numeric property other than `length` is not ArrayLike");
|
||||
equal(await isArrayLike({0: "zero", 1: "one", 2: "two", three: 3, length: 3}), false,
|
||||
"Object with a non-numeric property other than `length` is not ArrayLike");
|
||||
equal(await isArrayLike({0: "zero", 1: "one", 2: "two", length: 30}), false,
|
||||
"Object with a wrongful `length` property is not ArrayLike");
|
||||
|
||||
equal(await isArrayLike({0: "zero"}), true);
|
||||
equal(await isArrayLike({0: "zero", 1: "two"}), true);
|
||||
equal(await isArrayLike({0: "zero", 1: "one", 2: "two", length: 3}), true);
|
||||
|
||||
await dbgClient.close();
|
||||
}
|
||||
|
||||
async function test_object_grip_is_array_like(debuggee, dbgClient, threadClient, object) {
|
||||
return new Promise((resolve, reject) => {
|
||||
threadClient.addOneTimeListener("paused", async function (event, packet) {
|
||||
let [grip] = packet.frame.arguments;
|
||||
await threadClient.resume();
|
||||
resolve(grip.preview.kind === "ArrayLike");
|
||||
});
|
||||
|
||||
debuggee.eval(`
|
||||
stopMe(${JSON.stringify(object)});
|
||||
`);
|
||||
});
|
||||
}
|
|
@ -177,6 +177,7 @@ reason = only ran on B2G
|
|||
[test_objectgrips-18.js]
|
||||
[test_objectgrips-19.js]
|
||||
[test_objectgrips-20.js]
|
||||
[test_objectgrips-array-like-object.js]
|
||||
[test_promise_state-01.js]
|
||||
[test_promise_state-02.js]
|
||||
[test_promise_state-03.js]
|
||||
|
|
|
@ -14,6 +14,10 @@ this.EXPORTED_SYMBOLS = [ "PluralForm" ];
|
|||
*
|
||||
* See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
|
||||
*
|
||||
* NOTE: any change to these plural forms need to be reflected in
|
||||
* compare-locales:
|
||||
* https://hg.mozilla.org/l10n/compare-locales/file/default/compare_locales/plurals.py
|
||||
*
|
||||
* List of methods:
|
||||
*
|
||||
* string pluralForm
|
||||
|
@ -43,7 +47,7 @@ var gFunctions = [
|
|||
// 2: French
|
||||
[2, (n) => n>1?1:0],
|
||||
// 3: Latvian
|
||||
[3, (n) => n%10==1&&n%100!=11?1:n!=0?2:0],
|
||||
[3, (n) => n%10==1&&n%100!=11?1:n%10==0?0:2],
|
||||
// 4: Scottish Gaelic
|
||||
[4, (n) => n==1||n==11?0:n==2||n==12?1:n>0&&n<20?2:3],
|
||||
// 5: Romanian
|
||||
|
|
|
@ -116,37 +116,37 @@ function run_test()
|
|||
], [
|
||||
// 3: Latvian 0-9, 10-19, ..., 90-99
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
3,3,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
1,3,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
// 100-109, 110-119, ..., 190-199
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,3,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,3,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
// 200-209, 210-219, ..., 290-299
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,3,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
3,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,3,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
1,2,3,3,3,3,3,3,3,3,
|
||||
], [
|
||||
// 4: Scottish Gaelic 0-9, 10-19, ..., 90-99
|
||||
4,1,2,3,3,3,3,3,3,3,
|
||||
|
|
|
@ -56,7 +56,8 @@ sudo apt install git curl freeglut3-dev autoconf libx11-dev \
|
|||
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
|
||||
gperf g++ build-essential cmake virtualenv python-pip \
|
||||
libssl1.0-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
|
||||
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev
|
||||
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev \
|
||||
libpulse-dev
|
||||
```
|
||||
|
||||
If you using a version prior to **Ubuntu 17.04** or **Debian Sid**, replace `libssl1.0-dev` with `libssl-dev`.
|
||||
|
@ -72,7 +73,7 @@ sudo dnf install curl freeglut-devel libtool gcc-c++ libXi-devel \
|
|||
freetype-devel mesa-libGL-devel mesa-libEGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
|
||||
fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \
|
||||
rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel \
|
||||
dbus-devel ncurses-devel
|
||||
dbus-devel ncurses-devel pulseaudio-libs-devel
|
||||
```
|
||||
#### On CentOS
|
||||
|
||||
|
@ -81,7 +82,7 @@ sudo yum install curl freeglut-devel libtool gcc-c++ libXi-devel \
|
|||
freetype-devel mesa-libGL-devel mesa-libEGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
|
||||
fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \
|
||||
rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel \
|
||||
dbus-devel ncurses-devel python34
|
||||
dbus-devel ncurses-devel python34 pulseaudio-libs-devel
|
||||
```
|
||||
|
||||
#### On openSUSE Linux
|
||||
|
|
|
@ -1365,6 +1365,9 @@ where
|
|||
{
|
||||
let namespace;
|
||||
let local_name;
|
||||
|
||||
input.skip_whitespace();
|
||||
|
||||
match parse_qualified_name(parser, input, /* in_attr_selector = */ true)? {
|
||||
OptionalQName::None(t) => {
|
||||
return Err(input.new_custom_error(
|
||||
|
|
|
@ -146,8 +146,9 @@ def arg_to_bool(arg):
|
|||
|
||||
class Longhand(object):
|
||||
def __init__(self, style_struct, name, spec=None, animation_value_type=None, derived_from=None, keyword=None,
|
||||
predefined_type=None, custom_cascade=False, servo_pref=None, gecko_pref=None, internal=False,
|
||||
need_index=False, custom_cascade_function=None, gecko_ffi_name=None,
|
||||
predefined_type=None, custom_cascade=False, servo_pref=None, gecko_pref=None,
|
||||
enabled_in="content", need_index=False,
|
||||
custom_cascade_function=None, gecko_ffi_name=None,
|
||||
allowed_in_keyframe_block=True, cast_type='u8',
|
||||
logical=False, alias=None, extra_prefixes=None, boxed=False,
|
||||
flags=None, allowed_in_page_rule=False, allow_quirks=False, ignored_when_colors_disabled=False,
|
||||
|
@ -165,7 +166,15 @@ class Longhand(object):
|
|||
self.gecko_pref = gecko_pref
|
||||
self.custom_cascade = custom_cascade
|
||||
self.custom_cascade_function = custom_cascade_function if custom_cascade else None
|
||||
self.internal = internal
|
||||
# For enabled_in, the setup is as follows:
|
||||
# It needs to be one of the four values: ["", "ua", "chrome", "content"]
|
||||
# * "chrome" implies "ua", and implies that they're explicitly
|
||||
# enabled.
|
||||
# * "" implies the property will never be parsed.
|
||||
# * "content" implies the property is accessible unconditionally,
|
||||
# modulo a pref, set via servo_pref / gecko_pref.
|
||||
assert enabled_in in ["", "ua", "chrome", "content"]
|
||||
self.enabled_in = enabled_in
|
||||
self.need_index = need_index
|
||||
self.gecko_ffi_name = gecko_ffi_name or "m" + self.camel_case
|
||||
self.derived_from = (derived_from or "").split()
|
||||
|
@ -212,16 +221,18 @@ class Longhand(object):
|
|||
|
||||
# FIXME(emilio): Shorthand and Longhand should really share a base class.
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
return self.enabled_in in ["ua", "chrome"]
|
||||
|
||||
# TODO(emilio): Change the `internal` field to something like `enabled_in`.
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
return self.enabled_in == "chrome"
|
||||
|
||||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
|
||||
class Shorthand(object):
|
||||
def __init__(self, name, sub_properties, spec=None, servo_pref=None, gecko_pref=None,
|
||||
internal=False,
|
||||
enabled_in="content",
|
||||
allowed_in_keyframe_block=True, alias=None, extra_prefixes=None,
|
||||
allowed_in_page_rule=False, flags=None):
|
||||
self.name = name
|
||||
|
@ -234,7 +245,8 @@ class Shorthand(object):
|
|||
self.servo_pref = servo_pref
|
||||
self.gecko_pref = gecko_pref
|
||||
self.sub_properties = sub_properties
|
||||
self.internal = internal
|
||||
assert enabled_in in ["", "ua", "chrome", "content"]
|
||||
self.enabled_in = enabled_in
|
||||
self.alias = alias.split() if alias else []
|
||||
self.extra_prefixes = extra_prefixes.split() if extra_prefixes else []
|
||||
self.allowed_in_page_rule = arg_to_bool(allowed_in_page_rule)
|
||||
|
@ -271,11 +283,15 @@ class Shorthand(object):
|
|||
return bool(self.gecko_pref)
|
||||
return bool(self.servo_pref)
|
||||
|
||||
# FIXME(emilio): Shorthand and Longhand should really share a base class.
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
return self.enabled_in in ["ua", "chrome"]
|
||||
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
return self.enabled_in == "chrome"
|
||||
|
||||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
|
||||
class Alias(object):
|
||||
|
@ -283,7 +299,7 @@ class Alias(object):
|
|||
self.name = name
|
||||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.internal = original.internal
|
||||
self.enabled_in = original.enabled_in
|
||||
self.servo_pref = original.servo_pref
|
||||
self.gecko_pref = original.gecko_pref
|
||||
self.allowed_in_page_rule = original.allowed_in_page_rule
|
||||
|
@ -295,10 +311,13 @@ class Alias(object):
|
|||
return bool(self.servo_pref)
|
||||
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
return self.enabled_in in ["ua", "chrome"]
|
||||
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
return self.enabled_in == "chrome"
|
||||
|
||||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
|
||||
class Method(object):
|
||||
|
|
|
@ -222,7 +222,8 @@
|
|||
${helpers.single_keyword("-moz-top-layer", "none top",
|
||||
gecko_constant_prefix="NS_STYLE_TOP_LAYER",
|
||||
gecko_ffi_name="mTopLayer",
|
||||
products="gecko", animation_value_type="none", internal=True,
|
||||
products="gecko", animation_value_type="none",
|
||||
enabled_in="ua",
|
||||
spec="Internal (not web-exposed)")}
|
||||
|
||||
${helpers.single_keyword("position", "static absolute relative fixed sticky",
|
||||
|
@ -368,12 +369,12 @@ ${helpers.predefined_type(
|
|||
// CSS 2.1, Section 11 - Visual effects
|
||||
|
||||
${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box",
|
||||
products="servo", animation_value_type="none", internal=True,
|
||||
products="servo", animation_value_type="none", enabled_in="ua",
|
||||
spec="Internal, not web-exposed, \
|
||||
may be standardized in the future (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)")}
|
||||
|
||||
${helpers.single_keyword("overflow-clip-box", "padding-box content-box",
|
||||
products="gecko", animation_value_type="discrete", internal=True,
|
||||
products="gecko", animation_value_type="discrete", enabled_in="ua",
|
||||
gecko_pref="layout.css.overflow-clip-box.enabled",
|
||||
flags="APPLIES_TO_PLACEHOLDER",
|
||||
spec="Internal, not web-exposed, \
|
||||
|
|
|
@ -928,7 +928,8 @@ ${helpers.predefined_type("font-language-override",
|
|||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||
spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override")}
|
||||
|
||||
<%helpers:longhand name="-x-lang" products="gecko" animation_value_type="none" internal="True"
|
||||
<%helpers:longhand name="-x-lang" products="gecko" animation_value_type="none"
|
||||
enabled_in=""
|
||||
spec="Internal (not web-exposed)">
|
||||
pub use self::computed_value::T as SpecifiedValue;
|
||||
|
||||
|
@ -963,7 +964,7 @@ ${helpers.predefined_type("font-language-override",
|
|||
<%helpers:longhand name="-moz-script-size-multiplier" products="gecko" animation_value_type="none"
|
||||
predefined_type="Number" gecko_ffi_name="mScriptSizeMultiplier"
|
||||
spec="Internal (not web-exposed)"
|
||||
internal="True">
|
||||
enabled_in="">
|
||||
pub use self::computed_value::T as SpecifiedValue;
|
||||
|
||||
pub mod computed_value {
|
||||
|
@ -987,7 +988,7 @@ ${helpers.predefined_type("-moz-script-level",
|
|||
0,
|
||||
animation_value_type="none",
|
||||
products="gecko",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
gecko_ffi_name="mScriptLevel",
|
||||
spec="Internal (not web-exposed)")}
|
||||
|
||||
|
@ -1016,7 +1017,7 @@ ${helpers.predefined_type("-moz-script-min-size",
|
|||
"specified::MozScriptMinSize::get_initial_value()",
|
||||
animation_value_type="none",
|
||||
products="gecko",
|
||||
internal=True,
|
||||
enabled_in="",
|
||||
gecko_ffi_name="mScriptMinSize",
|
||||
spec="Internal (not web-exposed)")}
|
||||
|
||||
|
@ -1025,7 +1026,7 @@ ${helpers.predefined_type("-x-text-zoom",
|
|||
"computed::XTextZoom(true)",
|
||||
animation_value_type="none",
|
||||
products="gecko",
|
||||
internal=True,
|
||||
enabled_in="",
|
||||
spec="Internal (not web-exposed)")}
|
||||
|
||||
% if product == "gecko":
|
||||
|
@ -1232,7 +1233,7 @@ ${helpers.predefined_type("-moz-font-smoothing-background-color",
|
|||
animation_value_type="AnimatedRGBA",
|
||||
products="gecko",
|
||||
gecko_ffi_name="mFont.fontSmoothingBackgroundColor",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="None (Nonstandard internal property)")}
|
||||
|
||||
${helpers.predefined_type("-moz-min-font-size-ratio",
|
||||
|
@ -1240,5 +1241,5 @@ ${helpers.predefined_type("-moz-min-font-size-ratio",
|
|||
"computed::Percentage::hundred()",
|
||||
animation_value_type="none",
|
||||
products="gecko",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="Nonstandard (Internal-only)")}
|
||||
|
|
|
@ -16,4 +16,4 @@ ${helpers.predefined_type("-x-span",
|
|||
products="gecko",
|
||||
spec="Internal-only (for `<col span>` pres attr)",
|
||||
animation_value_type="none",
|
||||
internal=True)}
|
||||
enabled_in="")}
|
||||
|
|
|
@ -37,20 +37,20 @@ ${helpers.single_keyword("-moz-window-shadow", "none default menu tooltip sheet"
|
|||
gecko_ffi_name="mWindowShadow",
|
||||
gecko_constant_prefix="NS_STYLE_WINDOW_SHADOW",
|
||||
animation_value_type="discrete",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="None (Nonstandard internal property)")}
|
||||
|
||||
${helpers.predefined_type("-moz-window-opacity", "Opacity", "1.0", products="gecko",
|
||||
gecko_ffi_name="mWindowOpacity",
|
||||
animation_value_type="ComputedValue",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="None (Nonstandard internal property)")}
|
||||
|
||||
${helpers.predefined_type("-moz-window-transform", "Transform",
|
||||
"generics::transform::Transform::none()",
|
||||
products="gecko", gecko_ffi_name="mSpecifiedWindowTransform",
|
||||
animation_value_type="ComputedValue",
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="None (Nonstandard internal property)")}
|
||||
|
||||
${helpers.predefined_type("-moz-window-transform-origin",
|
||||
|
@ -60,7 +60,7 @@ ${helpers.predefined_type("-moz-window-transform-origin",
|
|||
gecko_ffi_name="mWindowTransformOrigin",
|
||||
products="gecko",
|
||||
boxed=True,
|
||||
internal=True,
|
||||
enabled_in="ua",
|
||||
spec="None (Nonstandard internal property)")}
|
||||
|
||||
<%helpers:longhand name="-moz-force-broken-image-icon"
|
||||
|
|
|
@ -174,7 +174,7 @@ pub mod shorthands {
|
|||
for p in data.longhands:
|
||||
if p.name in ['direction', 'unicode-bidi']:
|
||||
continue;
|
||||
if p.internal:
|
||||
if not p.enabled_in_content() and not p.experimental(product):
|
||||
continue;
|
||||
if p.logical:
|
||||
logical_longhands.append(p.name)
|
||||
|
@ -1303,7 +1303,7 @@ impl PropertyId {
|
|||
${id_set("ENABLED_IN_UA_SHEETS", lambda p: p.explicitly_enabled_in_ua_sheets())}
|
||||
${id_set("ENABLED_IN_CHROME", lambda p: p.explicitly_enabled_in_chrome())}
|
||||
${id_set("EXPERIMENTAL", lambda p: p.experimental(product))}
|
||||
${id_set("ALWAYS_ENABLED", lambda p: not p.experimental(product) and not p.explicitly_enabled_in_ua_sheets())}
|
||||
${id_set("ALWAYS_ENABLED", lambda p: not p.experimental(product) and p.enabled_in_content())}
|
||||
|
||||
let passes_pref_check = || {
|
||||
% if product == "servo":
|
||||
|
@ -3605,13 +3605,15 @@ impl AliasId {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME(emilio): This macro doesn't account for experimental properties, so
|
||||
// even with the pref disabled you can set them from CSSOM in Servo.
|
||||
#[macro_export]
|
||||
macro_rules! css_properties_accessors {
|
||||
($macro_name: ident) => {
|
||||
$macro_name! {
|
||||
% for kind, props in [("Longhand", data.longhands), ("Shorthand", data.shorthands)]:
|
||||
% for property in props:
|
||||
% if not property.derived_from and not property.internal:
|
||||
% if not property.derived_from and property.enabled_in_content():
|
||||
% for name in [property.name] + property.alias:
|
||||
% if '-' in name:
|
||||
[${to_rust_ident(name).capitalize()}, Set${to_rust_ident(name).capitalize()},
|
||||
|
|
Загрузка…
Ссылка в новой задаче