tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 99c202a9e50e44f9cc8115680d151ef3492c3c1e
parent 9eddd6cafcab999967709d9ec3e5a6e4e40b8397
Author: Timothy Nikkel <tnikkel@gmail.com>
Date:   Mon, 15 Dec 2025 18:28:20 +0000

Bug 2006110. Skip processing images for LargestContentfulPaint is nothing is going to be done with them. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D276472

Diffstat:
Mdom/performance/LargestContentfulPaint.cpp | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dom/performance/LargestContentfulPaint.cpp b/dom/performance/LargestContentfulPaint.cpp @@ -13,6 +13,7 @@ #include "mozilla/dom/BrowsingContext.h" #include "mozilla/dom/DOMIntersectionObserver.h" #include "mozilla/dom/Document.h" +#include "mozilla/dom/DocumentInlines.h" #include "mozilla/dom/Element.h" #include "mozilla/nsVideoFrame.h" #include "nsContentUtils.h" @@ -151,9 +152,8 @@ void LargestContentfulPaint::MaybeProcessImageForElementTiming( return; } - nsPresContext* pc = - aElement->GetPresContext(Element::PresContextFor::eForComposedDoc); - if (!pc) { + nsPresContext* pc = document->GetPresContext(); + if (!pc || pc->HasStoppedGeneratingLCP()) { return; }