WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
65537
CSS: Traced outlines (i.e. around images)
https://bugs.webkit.org/show_bug.cgi?id=65537
Summary
CSS: Traced outlines (i.e. around images)
Paul Bakaus
Reported
2011-08-02 07:02:56 PDT
In many games, there's a visually standardized way to highlight objects in a game world: Drawing an outline around them. Current CSS outline property draws an outline around the elements rectangle, but we need outlines around the transparent edges of the element. This is probably easy when native hitmaps are implemented, and a very useful feature to many web developers, not just targeted at games.
Attachments
Add attachment
proposed patch, testcase, etc.
Shane Stephens
Comment 1
2011-11-23 19:47:00 PST
I don't really understand what you're asking for. Are you asking for outlines around images, or around HTML content? If it's HTML content, what are the cases where the bounding rectangle isn't appropriate?
Paul Bakaus
Comment 2
2011-11-24 00:29:01 PST
Actually both - outlines around every non-rectangular object (i.e. a png image of a circle with transparency on the edges). Talking HTML, it's really the same thing - WebKit has outlines, but as far as I know, they aren't smart enough to wrap around things like rounded borders. They are, however, smart enough to take multiple elements and create shape around them. Long story short - I'd be happy having this just for images. In Flash, people use the glow filter to make this happen.
Shane Stephens
Comment 3
2011-11-24 14:25:45 PST
Is this something you could do with canvas, or with an SVG filter? It seems like it'd be non-trivial to make it work in the general case - e.g. for images with complex outlines, but maybe I'm wrong.
Paul Bakaus
Comment 4
2011-11-25 00:54:16 PST
It's completely non-trivial to do this. This is the whole point of abstracting it, so I don't have to deal with it anymore. Today, we're tracing geometry of images in the backend, send it to the frontend along with the images and then use canvas to construct the final outline (we were doing it directly on the frontend before until we discovered cross-domain issues when your images are on a CDN). We've worked on this for several months. A Flash developer works on this for..well, 10 minutes? :)
Brent Fulgham
Comment 5
2022-07-12 15:02:43 PDT
This should be proposed as a CSS feature, and specified before requesting an implementation.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug