Skip to content
Permalink
Browse files

Don't crash when properties needing base URL use var functions

  • Loading branch information...
liZe committed Sep 10, 2019
1 parent f66df06 commit c790ff209418480c8aad9f7a4da22b3549cc38c6
Showing with 5 additions and 1 deletion.
  1. +5 −1 weasyprint/css/computed_values.py
@@ -225,7 +225,11 @@ def compute(element, pseudo_type, specified, computed, parent_style,
if computed_value is None:
new_value = None
else:
new_value = PROPERTIES[name.replace('_', '-')](computed_value)
prop = PROPERTIES[name.replace('_', '-')]
if prop.wants_base_url:
new_value = prop(computed_value, base_url)
else:
new_value = prop(computed_value)

# See https://drafts.csswg.org/css-variables/#invalid-variables
if new_value is None:

0 comments on commit c790ff2

Please sign in to comment.
You can’t perform that action at this time.