Re: Adding a paint event to HTMLElement to support Web Components / Shadow DOM

He's talking about running a clip() method on the component.

Effective for Canvas but relatively minor in the scope of all that goes on in a page.

I think the bigger issue is about sizing components and meeting the scale. Clipping is a nice area for high efficiency but less of an issue in practice.

Look at the audio tag when making controls have a smaller and smaller width. WebKit neglects to hide the volume bar but they do shrink the progress bar fairly well. That's the big issue.





On May 8, 2012, at 10:42 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 5/9/12 1:20 AM, Gregg Tavares (勤) wrote:
>> I don't think I understand how requestAnimationFrame would work here.
>> Maybe my example was poor. I'm not suggesting a live constantly updating
>> audio wave. Instead I'm suggesting a static WebComponent that is heavy
>> to render. For example the wave display in an audio editing tool. Let's
>> say I had an app that displayed several audio tracks, some of those
>> tracks are scrolled off the page. (like this
>> http://www.newfreedownloads.com/imgs/17189-w520.jpg) The tracks
>> components are set to 100% width so that sizing the window ends up
>> re-sizing all the components
> 
> Then their resize handlers do requestAnimationFrame(rerender_me, this_element).  If the element is visible, rerender_me is called.  If not, it's queued up by the browser until the element becomes visible, no?
> 
> That's assuming support for the element argument to requestAnimationFrame, of course.
> 
> -Boris
> 

Received on Wednesday, 9 May 2012 06:34:38 UTC