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

LibWeb/HTML: Fix crash creating canvas pattern without context #3223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shannonbooth
Copy link
Contributor

@shannonbooth shannonbooth commented Jan 11, 2025

This isn't a full fix, as the paint function does not handle this
either. But instead of getting the bitmap from the image source
immediately, follow the spec a bit more closely by creating the
CanvasPatern object with the ImageSource directly.

Fixes a crash for the 5 included WPT tests.

@shannonbooth shannonbooth force-pushed the canvas-crash branch 2 times, most recently from 06ad751 to 819015d Compare January 11, 2025 04:12
This isn't a full fix, as the paint function does not handle this
either. But instead of getting the bitmap from the image source
immediately, follow the spec a bit more closely by creating the
CanvasPatern object with the ImageSource directly.

Fixes a crash for the 5 included WPT tests.
@shannonbooth shannonbooth changed the title LibWeb/HTML: Fix crash calling setTransform on canvas without context LibWeb/HTML: Fix crash creating canvas pattern without context Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant