Closed Bug 1649367 Opened 4 years ago Closed 3 years ago

Explicitly use InProcess version of IsRootContentDocument for frame visibility

Categories

(Core :: Layout, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone M8
Tracking Status
firefox91 --- fixed

People

(Reporter: hiro, Assigned: emilio)

References

Details

Attachments

(1 file)

There are two nsPresContext::GetToplevelContentDocumentPresContext calls in PresShell::AssumeAllFramesVisible and in PresShell::ScheduleApproximateFrameVisibilityUpdateNow, it won't work properly in OOP iframes.

I think this has come up before: bug 1554832. I think it might be working as intended right now, but I'll have to look in detail.

Fission Milestone: --- → M7

Emilio, do you know if this is fixed now?

Flags: needinfo?(emilio)

This doesn't change behavior, and is consistent with the changes made in
bug 1554832 to this code.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Yes, I think this is fixed, but let's be explicit on which document we care about.

Flags: needinfo?(emilio)

Changing the name of the bug, as the original issue has now been fixed.

No longer blocks: rendering-fission
Fission Milestone: M7 → ---
Summary: Make the optimization for invisible animated images (GIF) in fission → Explicitly use InProcess version of IsRootContentDocument for frame visibility

Re-nominating for Fission based on the discussion in bug 1699846 comment 6. (Please let me know if I've misunderstood.)

I'm not super familiar with this code, but it looks like the (only?) consumer of frame visbility info is related to decoding images, so I think the failure mode here is, perhaps, that in OOP iframes, our heuristics to decode images when they enter the iframe's displayport may not kick in, and images may only get decoded once they enter the viewport? (Timothy, you might be able to confirm this.)

Fission Milestone: --- → ?
Flags: needinfo?(tnikkel)
See Also: → 1699846

I guess there is that failure mode, and we could also decide all images are visible and decode them all and use too much memory.

Flags: needinfo?(tnikkel)

Ah, right, in case of an iframe with a large viewport (where we can limit the displayport to be smaller than the viewport). Good point.

I'm not super familiar with this code, but it looks like the (only?) consumer of frame visbility info is related to decoding images, so I think the failure mode here is, perhaps, that in OOP iframes, our heuristics to decode images when they enter the iframe's displayport may not kick in, and images may only get decoded once they enter the viewport?

Emilio, is your patch from six months ago still relevant for the current understanding of the problem, that we're not pre-decoding images in OOP iframes before they enter the viewport?

Tracking for Fission M8 because this could affect perceived page load performance.

Fission Milestone: ? → M8
Flags: needinfo?(emilio)
Priority: -- → P2
Attachment #9190825 - Attachment description: Bug 1649367 - Explicitly use InProcess version of IsRootContentDocument for frame visibility. r=tnikkel,hiro → Bug 1649367 - Fix some usage of IsRootContentDocument in PresShell. r=tnikkel

Yeah. I tweaked the patch as suggested by tim.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6618c16b50f8
Fix some usage of IsRootContentDocument in PresShell. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: