Fix #5877 (ebook-viewer not rendering ordered lists as ordered)

This commit is contained in:
Kovid Goyal 2010-06-24 22:41:46 -06:00
parent 9db27591d4
commit 247dd0cb77

View File

@ -380,10 +380,9 @@ class EPUBOutput(OutputFormatPlugin):
sel = '.'+lb.get('class') sel = '.'+lb.get('class')
for rule in stylesheet.data.cssRules.rulesOfType(CSSRule.STYLE_RULE): for rule in stylesheet.data.cssRules.rulesOfType(CSSRule.STYLE_RULE):
if sel == rule.selectorList.selectorText: if sel == rule.selectorList.selectorText:
val = rule.style.removeProperty('margin-left') rule.style.removeProperty('margin-left')
pval = rule.style.getProperty('padding-left') # padding-left breaks rendering in webkit and gecko
if val and not pval: rule.style.removeProperty('padding-left')
rule.style.setProperty('padding-left', val)
# }}} # }}}