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

Fix accidental settings differences between CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D #10904

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ccameron-chromium
Copy link
Contributor

@ccameron-chromium ccameron-chromium commented Jan 8, 2025

There is a lot of duplicated spec text for CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D, especially related to how CanvasRenderingContext2DSettings is handled.

As with all things that are duplicated, there are accidental divergences. In particular, several members of CanvasRenderingContext2DSettings are accidentally ignored in the OffscreenCanvasRenderingContext2D spec text. Additionally, the getContextAttributes method was accidentally not added to OffscreenCanvasRenderingContext2D when it was added to CanvasRenderingContext2D.

This creates a new mixin interface CanvasSettings. This will unify the accidentally diverged paths, and also prevent this from happening in the future. See details here.

An archeology of where the accidental divergence came from is in this issue. To the extent that original authors are still contact-able, they have confirmed that the divergences were indeed accidental oversights.


/canvas.html ( diff )
/index.html ( diff )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants