Open Bug 1597479 Opened 2 months ago Updated 2 months ago

Fix uses of nsLayoutUtils::GetDeviceContextForScreenInfo in layout/base/nsLayoutUtils.cpp

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

Fission Milestone M6

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [rm-docshell-tree-item:hard])

In file layout/base/nsLayoutUtils.cpp

Called from nsScreen exclusively

  • nsScreen seems to be the “screen” script object.
  • GetPixelDepth, GetRect, GetAvailRect

These are all rare APIs that should not need to be fast.

The implementation walks up the docshell tree, stopping if a window-less docshell is found.

For windowed docshells, it calls EnsureSizeAndPositionUpToDate, and if a PresContext->DeviceContext is found, returns it (breaking the walk up the tree).

Change to use BrowsingContext.

At users (GetPixelDepth, GetRect, GetAvailRect on nsScreen), detect walk out of process and issue IPC to chrome to retrieve the value.

Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).

Fission Milestone: --- → M6
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.