-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
… 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.
There was a problem hiding this 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.
Yes gCO is a bit weird indeed. |
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. |
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".
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".
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.
fillStyle
andstrokeStyle
)(See WHATWG Working Mode: Changes for more details.)
/canvas.html ( diff )