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 typos in CanvasTextDrawingStyles and remove getter dependencies #7544

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

Kaiido
Copy link
Member

@Kaiido Kaiido commented Jan 29, 2022

This is a follow-up on #7378.
It fixes a couple of typos, and adds the current filter and the current composition operator in the list of saved values from CanvasState, as per #7378 (comment), since these already have their own internal value being defined.
Other attributes would require a lot more work to define (and use) their internal values.


/canvas.html ( diff )

… getters

This is a follow-up on whatwg#7378.
It fixes a couple of typos, and adds the current filter and the current composition operator in the list of saved values from CanvasState, since these already have their own internal value being defined.
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is great! The "global composition operator" is a bit of a strange case (the getter/setter steps are not defined, but somehow the backing concept is defined and used?). But I think this is pretty clear.

@domenic domenic merged commit 318a5e6 into whatwg:main Jan 31, 2022
@Kaiido Kaiido deleted the 7378-follow-up branch February 1, 2022 02:08
@Kaiido
Copy link
Member Author

Kaiido commented Feb 1, 2022

Yes gCO is a bit weird indeed.
I guess it should now link directly to https://drafts.fxtf.org/compositing/#canvascompositingandblending and it should use some kind of "parse as a CSS <blend-mode> or <composite-mode>" algorithm instead of the current wording, but I'm not sure how the case-sensitivity would play there...
Do you want me to try to write some fix around that when I get some time, or just start a new issue about that, or is it "fine-enough" like that?

@domenic
Copy link
Member

domenic commented Feb 1, 2022

A fix would be lovely. My first instinct is that we don't need a particular issue tracking it (as opposed to just a general sense that lots of parts of the canvas spec aren't following modern best-practices), but it might be helpful for discussion or for your tracking, so feel free.

It does seem like we probably can't take the parse/serialize route there, at least not without changes.

Another thing we could do is link to the external definitions for source-over and copy instead of redefining them.

Kaiido added a commit to Kaiido/html that referenced this pull request Feb 10, 2022
While doing whatwg#7544 it was found that the "globalCompositeOperation" was ill-defined, using a backing concept but no actual getter and setter steps.
This PR thus fixes this and tries to update the whole Compositing Section by:
 - Defining a new `global alpha` backing concept, and `globaAlpha` getter and setters.
 - Importing `<composite-mode>` and `<blend-mode>` along with `source-over` and `copy` compositing operators from https://drafts.fxtf.org/compositing/.
 - Defining the `globalCompositeOperation` getter and setter steps.
 - Fixing the links to both `globalAlpha` and `globalCompositeOperation` attributes to their corresponding backing value.
 - Renaming "current composition operator" to "current compositing and blending operator" (as per COMPOSITING wording) and fixing the uses of "composition" vs "compositing".
Kaiido added a commit to Kaiido/html that referenced this pull request Feb 10, 2022
While doing whatwg#7544 it was found that the "globalCompositeOperation" was ill-defined, using a backing concept but no actual getter and setter steps.
This PR thus fixes this and tries to update the whole Compositing Section by:
  - Defining a new `global alpha` backing concept, and `globaAlpha` getter and setters.
  - Importing `<composite-mode>` and `<blend-mode>` along with `source-over` and `copy` compositing operators from https://drafts.fxtf.org/compositing/.
  - Defining the `globalCompositeOperation` getter and setter steps.
  - Fixing the links to both `globalAlpha` and `globalCompositeOperation` attributes to their corresponding backing value.
  - Renaming "current composition operator" to "current compositing and blending operator" (as per COMPOSITING wording) and fixing the uses of "composition" vs "compositing".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants