-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add HTML-in-Canvas APIs #11588
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
Open
foolip
wants to merge
27
commits into
main
Choose a base branch
from
foolip/html-in-canvas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add HTML-in-Canvas APIs #11588
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e181de1
Stub out canvas.drawElement()
foolip 8634ebe
Fix typ: y->h
foolip afc4a4d
Modernize the style somewhat
foolip f151c83
Replace handwavy check with real check and drop "update the rendering"
foolip 74d67ae
Add the layoutsubtree attribute
foolip f7d320a
Rename to drawHTMLElement()
foolip 3cad6d4
Fix the layoutsubtree UA style sheet
foolip 4367aac
Rename to drawElementImage()
foolip 84ec8e6
Define sensitive information
foolip f351c3d
Expose children to AT
foolip aed994e
grammar
foolip 8c3ce46
Use containment to make children containing blocks
foolip ff066c9
Define setHitTestRegions()
foolip 5e3c3d0
Merge remote-tracking branch 'origin/main' into foolip/html-in-canvas
foolip f8f119a
Wrap algorithms
foolip 202adae
Fix typo and reserved word
foolip be22310
Add a note about not using CTM
foolip 9866034
Fix reference to hit test regions
foolip 4e559a9
Skip non-positive width/height regions
foolip 4838669
Use CSS border box
foolip 9fa39e9
Replace hit testing API with a simpler model
foolip f79ed95
Add a hit testing example
foolip 0a243be
Add getElementTransform() and related algorithms
foolip 1f71b9a
Update drawElementImage() to return matrix
foolip 5aeb03b
Express the transformations in a more approachable way
foolip 951bdee
Address progers feedback
foolip ba5c560
<data> -> <code>
foolip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I worry this example may be considered an anti-pattern because the purple area isn't hit testable. We could use canvas 2d drawing apis to draw an interesting path that includes both boxes and is painted as the background and which is hard to do with regular css?
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.
Right, something like a peanut shape behind both elements would be hard to do with CSS even if we have border shaping, I'm guessing. I haven't done this just yet, but let me know if peanuts or peas in a pod or something along those lines makes sense to you.
Uh oh!
There was an error while loading. Please reload this page.
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.
WDYT of this example? This draws a simple pie chart and uses
drawElementImagefor the labels.