Open Bug 1378203 Opened 2 years ago Updated 2 years ago

Expose a property nsITabParent.canPresent, to indicate when a tab has set up enough to paint something

Categories

(Core :: DOM: Content Processes, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 2 obsolete files)

We currently use this hack in tabbrowser.xml where we check to see if a tab has presented before in order to know if we can force paint and do an async tab switch. If it's not presented (and is still showing the tab throbber) we assume that we can show a blank content area and do a very fast tab switch.

This works in a few cases, but falls over when a background tab is showing the throbber for a while and the user clicks on it - this shows a brief but annoying white flash.

What I think we should do instead is have a new TabChild inform the parent when it has set itself up, and when the underlying top-level PresShell has enough information to potentially paint were it required.

We can then expose that value in nsITabParent as canPresent, and we can use that instead of the hasPresented / throbber hack.
Assignee: nobody → mconley
Summary: Expose a propery nsITabParent.canPresent, to indicate when a tab has set up enough to paint something → Expose a property nsITabParent.canPresent, to indicate when a tab has set up enough to paint something
Attachment #8883611 - Flags: review?(wmccloskey)
Attachment #8883612 - Flags: review?(wmccloskey)
Pretty solid orange streak on try. Will try to clear that up and will then re-request review.
Comment on attachment 8883612 [details]
Bug 1378203 - Use canPresent in tabbrowser.xml to determine if we can blank out a tab before switching to it.

https://reviewboard.mozilla.org/r/154552/#review175078

Going to cancel review here since I think we're waiting on Mike. I just want to get this out of my queue for now.
Attachment #8883612 - Flags: review?(wmccloskey)
Hey Mike, is P3 good for this bug?
Flags: needinfo?(mconley)
Priority: -- → P3
Yep. I do plan on getting back to this, though.
Flags: needinfo?(mconley)
You need to log in before you can comment on or make changes to this bug.