In file layout/base/PresShell.cpp
Gets the DocShell for the context, gets the TreeOwner, and returns the Document from the PrimaryContent DocShell associated with that.
Used for retargeting events (needs IPC as above).
Used by PresShell::Paint to get URI from Document (and then URL).
The use by PresShell::Paint is simply to pass around the URL to the layer managers, which sometimes bundle it up in various places for reporting purposes as the transaction URL (e.g. in the profiler).
- Talked to :mstange, and he said that it's OK to pass some relevant URL.
- For example, passing the URL associated with the most ancestral in-process document, not exactly the root, should be ok.
The reporting is all crash reporting and info reporting, not performance sensitive at all.
IIRC, the whole point of electrolysis was that paint was on independent content processes.
- Change retargeting uses to invoke IPC, use BrowsingContext to discover out-of-process tree-owner.
- Change paint use by passing around a different URL - talk to graphics folks (mstange) to decide on specific URI to pass around.