Remove remaining uses of FrameMetrics::mIsRoot

RESOLVED INVALID

Status

()

Core
Panning and Zooming
RESOLVED INVALID
4 years ago
3 years ago

People

(Reporter: botond, Unassigned)

Tracking

Trunk
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
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.
Bug 1056427 removes a bunch of this code.
Depends on: 1056427
(Reporter)

Comment 2

3 years ago
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.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.