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

WIP fix svg with no width height #3018

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jan 12, 2023

  1. Added test of external svg with no width/height attribute

    Sebastien Ponce committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    007a732 View commit details
    Browse the repository at this point in the history
  2. Fixed handling of svg images with no width/height attributes

    Such images were not appearing in resulting canvas when using firefox.
    The details of the problem are explained in https://bugzilla.mozilla.org/show_bug.cgi?id=700533 and https://webcompat.com/issues/64352
    but a rough summary is that firefox won't render svg with no width/height attribute via drawImage.
    This fix thus recreates the missing attributes from the viewport one when they are missing
    Sebastien Ponce committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    9bc852f View commit details
    Browse the repository at this point in the history
  3. DO NOT MERGE : bad workaroud to remaning bug

    This adds a sleep in renderReplacedElement so that drawimage works properly when the fix to svg files is used.
    Without that, it looks like drawImage fires too fast and the fix is not yet done (code is async here)
    So far I did not find out where I messed up with async code. Any help would be welcome !
    Sebastien Ponce committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    f7a3566 View commit details
    Browse the repository at this point in the history