Skip to content

[css-paint-api] Try and find a way to access images w/o using a custom property #24

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
bfgeek opened this issue Aug 31, 2015 · 5 comments

Comments

@bfgeek
Copy link
Contributor

bfgeek commented Aug 31, 2015

It might be desirable to have images loaded implicitly in a paint function, without having them loaded via. a custom property.

For example performing a network request, or a pull from the main execution context, to receive an image to use.

Thought: Are there any existing properties today which do this?

@tabatkins
Copy link
Member

The only thing that's kinda close to this is that, theoretically, things like list-style: bullet can render the bullet with an image. There's nothing else in CSS that creates something image-like without the user explicitly asking for a URL.

@FremyCompany
Copy link
Contributor

Aren't bullets & co just unicode glyphs?
(in which case you can draw them using drawText)

@bfgeek
Copy link
Contributor Author

bfgeek commented Jan 4, 2016

For us these are just paths painted onto the canvas.
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp&l=22

I can't think of anything which magically accesses a resource on the network magically.

@tabatkins
Copy link
Member

Yeah, my point is that they're allowed to be that. In actual browsers they're either text or manually-drawn stuff, but there's nothing preventing them from being a network-fetched url. (It would just be a terrible idea.)

That's the only place where it's even possible, tho. Nowhere else does a built-in CSS property even have a chance of fetching anything.

@bfgeek
Copy link
Contributor Author

bfgeek commented Jan 30, 2016

Moved to LVL 2

majido pushed a commit to majido/css-houdini-drafts that referenced this issue Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants