Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint Differential Revision: https://phabricator.services.mozilla.com/D151079
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include "Units.h"
|
||||
#include "mozilla/dom/FontFaceSet.h"
|
||||
#include "mozilla/dom/ElementBinding.h"
|
||||
#include "mozilla/dom/LargestContentfulPaint.h"
|
||||
#include "mozilla/dom/PerformanceMainThread.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
@@ -11839,6 +11841,13 @@ void PresShell::EndPaint() {
|
||||
}
|
||||
return CallState::Continue;
|
||||
});
|
||||
|
||||
if (nsPresContext* presContext = GetPresContext()) {
|
||||
if (PerformanceMainThread* perf =
|
||||
presContext->GetPerformanceMainThread()) {
|
||||
perf->FinalizeLCPEntriesForText();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user