Closed
Bug 1396097
Opened 7 years ago
Closed 4 years ago
Add a console warning for calls to synchronous layout flushes which may result in FOUC
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 1623968
People
(Reporter: ehsan.akhgari, Assigned: bradwerth)
References
(Blocks 1 open bug)
Details
Attachments
(2 obsolete files)
We should add a console warning here <http://searchfox.org/mozilla-central/rev/51b3d67a5ec1758bd2fe7d7b6e75ad6b6b5da223/dom/base/nsContentSink.cpp#1252> if aIgnorePendingSheets && WaitForPendingSheets() to catch the cases where the content calls APIs which perform synchronous layout flushes with pending stylesheet loads which can result in FOUC. Ideally we would tell the developer which API call resulted in the warning as well.
Comment 1•7 years ago
|
||
So just to be clear, this would warn somewhat racily, based on whether the API call happens at the point before the sheets finish loading or not. Actually, we should probably warn any time aIgnorePendingSheets is true there, even if there are no pending sheets: we haven't started layout yet (because mLayoutStarted is false), and someone is asking for layout info, so it's FOUC. In particular, that would catch script asking for layout info before <body> has been seen...
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
Now working on a test.
Comment 5•7 years ago
|
||
Would it be possible to include a script stack trace with the console warning? That would make it easier to diagnose and suggest fixes for issues.
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Thomas Wisniewski from comment #5) > Would it be possible to include a script stack trace with the console > warning? That would make it easier to diagnose and suggest fixes for issues. I agree that would be valuable. As I get the test working, I'll update the part 1 patch to also output a stack strace.
Comment 7•7 years ago
|
||
P3 isn't meant to demean the great boon this will be to people experiencing it!
Priority: -- → P3
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Still working on an effective test.
Assignee | ||
Updated•5 years ago
|
Attachment #8903830 -
Attachment is obsolete: true
Assignee | ||
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Updated•4 years ago
|
Attachment #9051177 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•