Skip to content

Commit d1caa96

Browse files
committed
Bug 1471114 part 1 - Move CSSPropFlags prefix generation into GenerateServoCSSPropList.py. r=emilio
MozReview-Commit-ID: E5dl9V2B2dq --HG-- extra : source : 6e2448ce3f4d9965749298a575795dfab926b9cb
1 parent 46cae3d commit d1caa96

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

dom/bindings/GenerateCSS2PropertiesWebIDL.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def generate(output, idlFilename, dataFile):
1717
propList = runpy.run_path(dataFile)["data"]
1818
props = ""
1919
for p in propList:
20-
if "CSSPropFlags::Internal" in p.flags:
20+
if "Internal" in p.flags:
2121
continue
2222
# Unfortunately, even some of the getters here are fallible
2323
# (e.g. on nsComputedDOMStyle).

layout/style/GenerateCSSPropsGenerated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class PropertyWrapper(object):
1313
def __init__(self, index, prop):
1414
self.index = index
1515
self.prop = prop
16-
if "CSSPropFlags::Internal" in prop.flags:
16+
if "Internal" in prop.flags:
1717
self.idlname = None
1818
else:
1919
idl_name = prop.method

layout/style/GenerateServoCSSPropList.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def generate_header(output, data):
6969
"alias": "CSS_PROP_ALIAS",
7070
}
7171
for prop in data:
72-
is_internal = "CSSPropFlags::Internal" in prop.flags
72+
is_internal = "Internal" in prop.flags
7373
pref = '"' + prop.pref + '"'
7474
if prop.type() == "alias":
7575
params = [prop.name, prop.alias_id, prop.prop_id, prop.method, pref]
@@ -80,7 +80,8 @@ def generate_header(output, data):
8080
elif method.startswith("Moz"):
8181
method = "CSS_PROP_DOMPROP_PREFIXED({})".format(method[3:])
8282
if prop.flags:
83-
flags = " | ".join(prop.flags)
83+
flags = " | ".join("CSSPropFlags::{}".format(flag)
84+
for flag in prop.flags)
8485
else:
8586
flags = "CSSPropFlags(0)"
8687
params = [prop.name, prop.id, method, flags, pref]

layout/style/ServoCSSPropList.mako.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def flags(prop):
113113
result.append("CanAnimateOnCompositor")
114114
if serialized_by_servo(prop):
115115
result.append("SerializedByServo")
116-
return ", ".join('"CSSPropFlags::{}"'.format(flag) for flag in result)
116+
return ", ".join('"{}"'.format(flag) for flag in result)
117117

118118
def pref(prop):
119119
if prop.gecko_pref:

0 commit comments

Comments
 (0)