mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Appease tidy.
This commit is contained in:
parent
58d51b1e8c
commit
2ff7cb5a37
1 changed files with 15 additions and 15 deletions
|
@ -591,7 +591,7 @@ class PropertiesData(object):
|
||||||
shorthand.alias = list(map(lambda xp: Alias(xp[0], shorthand, xp[1]), shorthand.alias))
|
shorthand.alias = list(map(lambda xp: Alias(xp[0], shorthand, xp[1]), shorthand.alias))
|
||||||
self.shorthand_aliases += shorthand.alias
|
self.shorthand_aliases += shorthand.alias
|
||||||
self.shorthands.append(shorthand)
|
self.shorthands.append(shorthand)
|
||||||
self.shorthands_by_name[name] = shorthand;
|
self.shorthands_by_name[name] = shorthand
|
||||||
return shorthand
|
return shorthand
|
||||||
|
|
||||||
def shorthands_except_all(self):
|
def shorthands_except_all(self):
|
||||||
|
@ -604,7 +604,7 @@ class PropertiesData(object):
|
||||||
def _add_logical_props(data, props):
|
def _add_logical_props(data, props):
|
||||||
groups = set()
|
groups = set()
|
||||||
for prop in props:
|
for prop in props:
|
||||||
if not prop in data.longhands_by_name:
|
if prop not in data.longhands_by_name:
|
||||||
assert data.product == "servo"
|
assert data.product == "servo"
|
||||||
continue
|
continue
|
||||||
prop = data.longhands_by_name[prop]
|
prop = data.longhands_by_name[prop]
|
||||||
|
@ -614,6 +614,7 @@ def _add_logical_props(data, props):
|
||||||
for prop in data.longhands_by_logical_group[group]:
|
for prop in data.longhands_by_logical_group[group]:
|
||||||
props.add(prop.name)
|
props.add(prop.name)
|
||||||
|
|
||||||
|
|
||||||
# These are probably Gecko bugs and should be supported per spec.
|
# These are probably Gecko bugs and should be supported per spec.
|
||||||
def _remove_common_first_line_and_first_letter_properties(props, product):
|
def _remove_common_first_line_and_first_letter_properties(props, product):
|
||||||
if product == "gecko":
|
if product == "gecko":
|
||||||
|
@ -669,12 +670,12 @@ class PropertyRestrictions:
|
||||||
|
|
||||||
# Kinda like css-backgrounds?
|
# Kinda like css-backgrounds?
|
||||||
"background-blend-mode",
|
"background-blend-mode",
|
||||||
] + PropertyRestrictions.shorthand(data, "padding") \
|
] + PropertyRestrictions.shorthand(data, "padding")
|
||||||
+ PropertyRestrictions.shorthand(data, "margin") \
|
+ PropertyRestrictions.shorthand(data, "margin")
|
||||||
+ PropertyRestrictions.spec(data, "css-fonts") \
|
+ PropertyRestrictions.spec(data, "css-fonts")
|
||||||
+ PropertyRestrictions.spec(data, "css-backgrounds") \
|
+ PropertyRestrictions.spec(data, "css-backgrounds")
|
||||||
+ PropertyRestrictions.spec(data, "css-text") \
|
+ PropertyRestrictions.spec(data, "css-text")
|
||||||
+ PropertyRestrictions.spec(data, "css-shapes") \
|
+ PropertyRestrictions.spec(data, "css-shapes")
|
||||||
+ PropertyRestrictions.spec(data, "css-text-decor"))
|
+ PropertyRestrictions.spec(data, "css-text-decor"))
|
||||||
|
|
||||||
_add_logical_props(data, props)
|
_add_logical_props(data, props)
|
||||||
|
@ -682,7 +683,6 @@ class PropertyRestrictions:
|
||||||
_remove_common_first_line_and_first_letter_properties(props, data.product)
|
_remove_common_first_line_and_first_letter_properties(props, data.product)
|
||||||
return props
|
return props
|
||||||
|
|
||||||
|
|
||||||
# https://drafts.csswg.org/css-pseudo/#first-line-styling
|
# https://drafts.csswg.org/css-pseudo/#first-line-styling
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def first_line(data):
|
def first_line(data):
|
||||||
|
@ -702,9 +702,9 @@ class PropertyRestrictions:
|
||||||
|
|
||||||
# Kinda like css-backgrounds?
|
# Kinda like css-backgrounds?
|
||||||
"background-blend-mode",
|
"background-blend-mode",
|
||||||
] + PropertyRestrictions.spec(data, "css-fonts") \
|
] + PropertyRestrictions.spec(data, "css-fonts")
|
||||||
+ PropertyRestrictions.spec(data, "css-backgrounds") \
|
+ PropertyRestrictions.spec(data, "css-backgrounds")
|
||||||
+ PropertyRestrictions.spec(data, "css-text") \
|
+ PropertyRestrictions.spec(data, "css-text")
|
||||||
+ PropertyRestrictions.spec(data, "css-text-decor"))
|
+ PropertyRestrictions.spec(data, "css-text-decor"))
|
||||||
|
|
||||||
# These are probably Gecko bugs and should be supported per spec.
|
# These are probably Gecko bugs and should be supported per spec.
|
||||||
|
@ -764,7 +764,7 @@ class PropertyRestrictions:
|
||||||
# background shorthand, and get reset, per
|
# background shorthand, and get reset, per
|
||||||
# https://drafts.fxtf.org/compositing/#background-blend-mode
|
# https://drafts.fxtf.org/compositing/#background-blend-mode
|
||||||
"background-blend-mode",
|
"background-blend-mode",
|
||||||
] + PropertyRestrictions.shorthand(data, "text-decoration") \
|
] + PropertyRestrictions.shorthand(data, "text-decoration")
|
||||||
+ PropertyRestrictions.shorthand(data, "background") \
|
+ PropertyRestrictions.shorthand(data, "background")
|
||||||
+ PropertyRestrictions.shorthand(data, "outline") \
|
+ PropertyRestrictions.shorthand(data, "outline")
|
||||||
+ PropertyRestrictions.shorthand(data, "font"))
|
+ PropertyRestrictions.shorthand(data, "font"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue