Closed Bug 1635597 Opened 5 years ago Closed 5 years ago

onFirstContentfulPaint() fails to fire if the parent document does not paint any content.

Categories

(Core :: Web Painting, defect)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

Details

(Whiteboard: [fxr:p1] [geckoview:p1])

Attachments

(1 file)

GeckoSession.ContentDelegate.onFirstContentfulPaint() should be called after the very first paint in a new GeckoSession. However if the parent page does not actually paint anything it is never called. For example the following page will not generate the call back:

<!doctype html>
<html>
<body>
<iframe src='fixed.html' >
</iframe>
</body>
</html>

While this page does:

<!doctype html>
<html>
<body>
<div>Hello</div>
<iframe src='fixed.html' >
</iframe>
</body>
</html>
Whiteboard: [fxr:p1]

Hsin-Yi, can someone look at this? This is causing problems for FxR and the relevant GeckoView API.

Component: General → DOM: Events
Flags: needinfo?(htsai)
Product: GeckoView → Core
Whiteboard: [fxr:p1] → [fxr:p1] [geckoview]
Assignee: nobody → rbarker

The patch I've posted fixes the issue for Firefox Reality. I don't know that this is the correct fix however.

(nothing to do with DOM Events implementation, but about layout dispatching some event)

Component: DOM: Events → Layout
Flags: needinfo?(htsai)
Whiteboard: [fxr:p1] [geckoview] → [fxr:p1] [geckoview:p1]
Severity: -- → S3

:svoisin could someone please case an eye over the patch :rbarker has attached to give some guidance as to whether this is a correct fix for this issue? Or, if this is not your team, can you help us direct the review to the right people?

Flags: needinfo?(svoisen)

Looks like this is changing some stuff around the mFirstContentfulPaintTransactionId and mHadContentfulPaint member vars. Looking at the history of the first of those vars, it looks like bug 1506976 is one related bug, and that lives in Web Painting, so that's probably where this bug really belongs.

mstange, looks like you wrote at least some of this code -- maybe you would be a suitable reviewer (or guidance-giver, per comment 6) here? (Or if not you, maybe Bas since he reviewed bug 1506976)

Component: Layout → Web Painting
Flags: needinfo?(svoisen) → needinfo?(mstange)

Yes, the patch looks good.

Flags: needinfo?(mstange.moz)
Pushed by rbarker@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/247803526b3f Send MozFirstContentfulPaint any document and not just the root r=mstange
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: