mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Tidy
This commit is contained in:
parent
bf8edd1596
commit
515c5ef540
3 changed files with 5 additions and 7 deletions
|
@ -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"))
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue