frame reflow

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

frame reflow

Neil Deakin
Right now I have a situation in popup code where I need to make the
popup's view visible. However, in some cases, there will be pending
layout changes on the popup, typically new frames that need to be
constructed, but in other cases no reflows are going to happen. To avoid
  flickering, I need to know whether any reflows are pending, and wait
to show the view until afterwards, but if none are pending, show the
view immediately. What is the best way to determine whether there are
any pending changes?

/ Neil
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: frame reflow

Boris Zbarsky
Neil Deakin wrote:
> However, in some cases, there will be pending
> layout changes on the popup, typically new frames that need to be
> constructed

That's not a layout change; it's a frame model change...

> but in other cases no reflows are going to happen. To avoid
> flickering, I need to know whether any reflows are pending, and wait to
> show the view until afterwards, but if none are pending, show the view
> immediately. What is the best way to determine whether there are any
> pending changes?

On the reflow branch you could check the DIRTY and DIRTY_CHILDREN framestate
flags.  That won't help with pending style changes, but it'll work to detect
cases when the popup or something in it needs to be reflown.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout