Closed
Bug 1420362
Opened 7 years ago
Closed 6 years ago
<iframe> is causing a flash of unstyled content (FOUC) issue
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
DUPLICATE
of bug 687441
People
(Reporter: bmo, Unassigned)
References
Details
Attachments
(1 file, 2 obsolete files)
202 bytes,
text/html
|
Details |
This is a follow-up from bug 1404468 comment 18.
STR: Load https://codepen.io/pen/ and sometimes FOUC happens.
To make it easier to reproduce, you can add the pref `nglayout.initialpaint.delay` to `0` and throttle network speed to GPRS.
Expected Result: No FOUC before external stylesheet is loaded.
I'll submit a simplified test case later.
Reporter | ||
Comment 1•7 years ago
|
||
As there is an external stylesheet with <head> and followed by a <script> tag, content should not be rendered before stylesheet is loaded.
By inserting an iframe in <body>, it will change the render flow and cause FOUC.
Reporter | ||
Comment 2•7 years ago
|
||
update mime
Reporter | ||
Comment 3•7 years ago
|
||
Attachment #8931611 -
Attachment is obsolete: true
Attachment #8931612 -
Attachment is obsolete: true
Reporter | ||
Updated•7 years ago
|
status-firefox57:
--- → affected
status-firefox58:
--- → affected
status-firefox59:
--- → affected
Priority: -- → P3
Comment 4•7 years ago
|
||
Boris told me he *loves* FOUC bugs and wants to CC'd on all of them.
Flags: needinfo?(bzbarsky)
Comment 5•7 years ago
|
||
So this is rather annoying. The rlevant stack looks like this:
frame #1: 0x0000000102e3e107 XUL`nsContentSink::StartLayout(this=0x0000000122c68800, aIgnorePendingSheets=true) at nsContentSink.cpp:1288
frame #2: 0x00000001021e06b5 XUL`nsHtml5TreeOpExecutor::FlushPendingNotifications(this=0x0000000122c68800, aType=Layout) at nsHtml5TreeOpExecutor.cpp:245
frame #3: 0x00000001021e06e6 XUL`non-virtual thunk to nsHtml5TreeOpExecutor::FlushPendingNotifications(this=0x0000000122c68800, aType=Layout) at nsHtml5TreeOpExecutor.cpp:0
frame #4: 0x0000000102e9b3de XUL`nsDocument::FlushPendingNotifications(this=0x000000011fb04000, aType=Layout, aTarget=Normal) at nsDocument.cpp:8530
frame #5: 0x0000000102e9b4e7 XUL`nsDocument::FlushPendingNotifications(this=0x00000001248ff000, aType=Style, aTarget=Normal) at nsDocument.cpp:8554
frame #6: 0x00000001020ce598 XUL`nsDocLoader::DocLoaderIsEmpty(this=0x0000000140c8d800, aFlushLayout=true) at nsDocLoader.cpp:704
frame #7: 0x00000001020cf90f XUL`nsDocLoader::OnStopRequest(this=0x0000000140c8d800, aRequest=0x000000011fb4fea0, aCtxt=0x0000000000000000, aStatus=NS_OK) at nsDocLoader.cpp:633
So we go to maybe fire the load event on the subframe, that means we need to get styles up to date so we know the various background images and whatnot, but due to media queries that means we need up-to-date layout in the parent, so we flush layout on the parent and that kicks off layout even if there are pending sheets.
One option here would be to bail out of DocLoaderIsEmpty if our parent is not ready to start layout, then have it notify us when it is so we can fire the load event. Another option is to just give up on all this and go back to having stylesheets block the parser...
Flags: needinfo?(bzbarsky)
status-firefox65:
--- → affected
Comment 7•6 years ago
|
||
Looks like I filed this long ago, with some possible thoughts on fixing...
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•