aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/properties/build.py5
-rw-r--r--components/style/properties/data.py4
-rw-r--r--components/style/properties/properties.mako.rs3
3 files changed, 5 insertions, 7 deletions
diff --git a/components/style/properties/build.py b/components/style/properties/build.py
index be2e372a240..a8472a1a55d 100644
--- a/components/style/properties/build.py
+++ b/components/style/properties/build.py
@@ -4,7 +4,6 @@
import json
import os.path
-import re
import sys
BASE = os.path.dirname(__file__)
@@ -49,11 +48,11 @@ def render(filename, **context):
strict_undefined=True,
filename=filename)
# Uncomment to debug generated Python code:
- #write("/tmp", "mako_%s.py" % os.path.basename(filename), template.code)
+ # write("/tmp", "mako_%s.py" % os.path.basename(filename), template.code)
return template.render(**context).encode("utf8")
except:
# Uncomment to see a traceback in generated Python code:
- #raise
+ # raise
abort(exceptions.text_error_template().render().encode("utf8"))
diff --git a/components/style/properties/data.py b/components/style/properties/data.py
index 7724114dfe7..a54bd6c25ae 100644
--- a/components/style/properties/data.py
+++ b/components/style/properties/data.py
@@ -124,11 +124,9 @@ class PropertiesData(object):
self.style_structs.append(style_struct)
self.current_style_struct = style_struct
-
def active_style_structs(self):
return [s for s in self.style_structs if s.additional_methods or s.longhands]
-
def switch_to_style_struct(self, name):
for style_struct in self.style_structs:
if style_struct.trait_name == name:
@@ -138,7 +136,7 @@ class PropertiesData(object):
def declare_longhand(self, name, products="gecko servo", **kwargs):
products = products.split()
- if not self.product in products:
+ if self.product not in products:
return
longand = Longhand(self.current_style_struct, name, **kwargs)
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 109597119cf..519e3e3dc1a 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -114,7 +114,8 @@ pub mod longhands {
//
// FIXME: is it still?
*cacheable = false;
- let inherited_struct = inherited_style.get_${data.current_style_struct.trait_name_lower}();
+ let inherited_struct =
+ inherited_style.get_${data.current_style_struct.trait_name_lower}();
context.mutate_style().mutate_${data.current_style_struct.trait_name_lower}()
.copy_${property.ident}_from(inherited_struct);
}