Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The size of fixed boxes in fixed boxes are not calculated on second pages #234

Closed
liZe opened this issue Jan 29, 2015 · 2 comments
Closed
Labels
bug Existing features not working as expected crash Problems preventing documents from being rendered

Comments

@liZe
Copy link
Member

liZe commented Jan 29, 2015

Example:

<html>
  <head>
    <style>
      div {position:fixed}
      div::before {content:'test'; position:fixed}
      p {height:200000cm}
    </style>
  </head>
  <body>
    <div></div>
    <p><p>
  </body>
<html>

crashes with

Traceback (most recent call last):
  File "./weasyprint.py", line 5, in <module>
    main()
  File "/home/lize/Informatique/weasyprint/weasyprint/__main__.py", line 141, in main
    getattr(html, 'write_' + format_)(output, **kwargs)
  File "/home/lize/Informatique/weasyprint/weasyprint/__init__.py", line 160, in write_pdf
    return self.render(stylesheets).write_pdf(target, zoom)
  File "/home/lize/Informatique/weasyprint/weasyprint/__init__.py", line 132, in render
    return Document._render(self, stylesheets, enable_hinting)
  File "/home/lize/Informatique/weasyprint/weasyprint/document.py", line 308, in _render
    return cls([Page(p, enable_hinting) for p in page_boxes],
  File "/home/lize/Informatique/weasyprint/weasyprint/document.py", line 308, in <listcomp>
    return cls([Page(p, enable_hinting) for p in page_boxes],
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/__init__.py", line 62, in layout_document
    layout_backgrounds(page, get_image_from_uri)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/backgrounds.py", line 213, in layout_backgrounds
    layout_box_backgrounds(page, page, get_image_from_uri)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/backgrounds.py", line 59, in layout_box_backgrounds
    layout_box_backgrounds(page, child, get_image_from_uri)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/backgrounds.py", line 59, in layout_box_backgrounds
    layout_box_backgrounds(page, child, get_image_from_uri)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/backgrounds.py", line 59, in layout_box_backgrounds
    layout_box_backgrounds(page, child, get_image_from_uri)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/backgrounds.py", line 56, in layout_box_backgrounds
    resolve_radii_percentages(box)
  File "/home/lize/Informatique/weasyprint/weasyprint/layout/percentages.py", line 125, in resolve_radii_percentages
    ry = _percentage(ry, box.border_height())
  File "/home/lize/Informatique/weasyprint/weasyprint/formatting_structure/boxes.py", line 151, in border_height
    return self.padding_height() + self.border_top_width + \
  File "/home/lize/Informatique/weasyprint/weasyprint/formatting_structure/boxes.py", line 142, in padding_height
    return self.height + self.padding_top + self.padding_bottom
TypeError: Can't convert 'int' object to str implicitly

It's not related to border-radius, even if it crashes when calculating it: it crashes later even if this code is removed.

@liZe liZe added crash Problems preventing documents from being rendered bug Existing features not working as expected labels Jan 29, 2015
@SimonSapin
Copy link
Member

something something static typing something

@liZe
Copy link
Member Author

liZe commented Sep 12, 2016

Duplicates #171.

@liZe liZe closed this as completed Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

2 participants