mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
stylo: support transform
This commit is contained in:
parent
86a5682247
commit
bb5f351f4a
12 changed files with 2238 additions and 542 deletions
|
@ -104,6 +104,7 @@ COMPILATION_TARGETS = {
|
|||
"nsBorderColors",
|
||||
"nsChangeHint",
|
||||
"nscolor",
|
||||
"nsCSSKeyword",
|
||||
"nsCSSPropertyID",
|
||||
"nsCSSRect",
|
||||
"nsCSSRect_heap",
|
||||
|
@ -271,7 +272,11 @@ COMPILATION_TARGETS = {
|
|||
"StyleBasicShape",
|
||||
"StyleBasicShapeType",
|
||||
"StyleClipPath",
|
||||
"nscoord",
|
||||
"nsCSSKeyword",
|
||||
"nsCSSShadowArray",
|
||||
"nsCSSValue",
|
||||
"nsCSSValueSharedList",
|
||||
"nsChangeHint",
|
||||
"nsFont",
|
||||
"nsIAtom",
|
||||
|
@ -335,6 +340,9 @@ COMPILATION_TARGETS = {
|
|||
"RawGeckoDocument",
|
||||
"RawServoDeclarationBlockStrong",
|
||||
],
|
||||
"servo_borrow_types": [
|
||||
"nsCSSValue",
|
||||
],
|
||||
"whitelist_functions": [
|
||||
"Servo_.*",
|
||||
"Gecko_.*"
|
||||
|
@ -544,7 +552,7 @@ Option<&'a {0}>;".format(ty))
|
|||
zero_size_type(ty, flags)
|
||||
|
||||
if "servo_immutable_borrow_types" in current_target:
|
||||
for ty in current_target["servo_immutable_borrow_types"]:
|
||||
for ty in current_target.get("servo_immutable_borrow_types", []) + current_target.get("servo_borrow_types", []):
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}Borrowed".format(ty))
|
||||
flags.append("--raw-line")
|
||||
|
@ -552,8 +560,18 @@ Option<&'a {0}>;".format(ty))
|
|||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = \
|
||||
Option<&'a {0}>;".format(ty))
|
||||
flags.append("pub type {0}BorrowedOrNull<'a> = Option<&'a {0}>;".format(ty))
|
||||
if "servo_borrow_types" in current_target:
|
||||
for ty in current_target["servo_borrow_types"]:
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedMut".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedMut<'a> = &'a mut {0};".format(ty))
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("{}BorrowedMutOrNull".format(ty))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type {0}BorrowedMutOrNull<'a> = \
|
||||
Option<&'a mut {0}>;".format(ty))
|
||||
# Right now the only immutable borrow types are ones which we import
|
||||
# from the |structs| module. As such, we don't need to create an opaque
|
||||
# type with zero_size_type. If we ever introduce immutable borrow types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue