mirror of
https://github.com/servo/servo.git
synced 2025-06-29 11:33:39 +01:00
Add stylo FFI for CSSRuleList
This commit is contained in:
parent
210b1be1d0
commit
9d4ab0d3e9
5 changed files with 105 additions and 4 deletions
|
@ -328,8 +328,13 @@ COMPILATION_TARGETS = {
|
|||
"nsStyleVisibility",
|
||||
"nsStyleXUL",
|
||||
],
|
||||
"array_types": {
|
||||
"uintptr_t": "usize",
|
||||
},
|
||||
"servo_nullable_arc_types": [
|
||||
"ServoComputedValues", "RawServoStyleSheet",
|
||||
"ServoComputedValues",
|
||||
"ServoCssRules",
|
||||
"RawServoStyleSheet",
|
||||
"RawServoDeclarationBlock"
|
||||
],
|
||||
"servo_owned_types": [
|
||||
|
@ -535,6 +540,14 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
|
|||
flags.append("--opaque-type")
|
||||
flags.append(ty)
|
||||
|
||||
if "array_types" in current_target:
|
||||
for cpp_type, rust_type in current_target["array_types"].items():
|
||||
flags.append("--blacklist-type")
|
||||
flags.append("nsTArrayBorrowed_{}".format(cpp_type))
|
||||
flags.append("--raw-line")
|
||||
flags.append("pub type nsTArrayBorrowed_{0}<'a> = &'a mut ::gecko_bindings::structs::nsTArray<{1}>;"
|
||||
.format(cpp_type, rust_type))
|
||||
|
||||
if "blacklist_types" in current_target:
|
||||
for ty in current_target["blacklist_types"]:
|
||||
flags.append("--blacklist-type")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue