As a follow-up to bug 900092, I'd like to investigate the possibility of removing the remaining uses of FrameMetrics::mIsRoot. Currently this flag is set in layout on the FrameMetrics of a container layer built for the root scroll frame of a root content document. The flag is only read on B2G, in the following places: - so TabChild knows whether to call APZCCallbackHelper::UpdateRootFrame or APZCCallbackHelper::UpdateSubframe - note: Metro makes this decision by examining the content returned by FindContentFor(scrollId) - so RenderFrameParent knows whether to fire a 'mozbrowserasyncscroll' event - so BuildViewMap() in RenderFrameParent.cpp knows what to pass as the 'aIsRoot' parameter when constructing an nsContentView - this is turn is used by a bunch of other code in RenderFrameParent.cpp and nsFrameLoader.cpp - in TransformShadowTree() in RenderFrameParent.cpp I don't understand the latter two uses very well. If anyone has suggestions for how some of these remaining uses could be removed, please let me know.
I think the remaining uses of mIsRoot are sensible - it tracks whether a scrollable frame is the root scroll frame of the root content document. This scroll frame gets special handling (for example, it can be zoomed, while other scroll frames cannot), so it makes sense to identify it with a flag.