Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: be4064807ce44c56388dc871908f7ed158b2b6a5
https://github.com/WebKit/WebKit/commit/be4064807ce44c56388dc871908f7ed158b2b6a5
Author: Simon Fraser <[email protected]>
Date: 2025-10-12 (Sun, 12 Oct 2025)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/Node.h
M Source/WebCore/page/LargestContentfulPaintData.cpp
M Source/WebCore/page/LargestContentfulPaintData.h
M Source/WebCore/page/Performance.cpp
M Source/WebCore/page/Performance.h
Log Message:
-----------
[LCP] Use a bit on Element to store LCP's "in content set" state
https://bugs.webkit.org/show_bug.cgi?id=300570
rdar://162451937
Reviewed by Tim Nguyen.
LCP only counts each element once for having text content (in spec terms,
elements get
added to the "content set"). This is currently tracked by adding elements to a
`WeakHashSet<Element>`
but it's cheaper to just use a bit on Node instead.
Also rename `takePendingEntry()` to `generateLargestContentfulPaintEntry()` and
`reportLargestContentfulPaint()`
to `enqueueLargestContentfulPaint()`.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::enqueuePaintTimingEntryIfNeeded):
* Source/WebCore/dom/Element.h:
(WebCore::Element::isInLargestContentfulPaintTextContentSet const):
(WebCore::Element::setInLargestContentfulPaintTextContentSet):
* Source/WebCore/dom/Node.h:
* Source/WebCore/page/LargestContentfulPaintData.cpp:
(WebCore::LargestContentfulPaintData::potentiallyAddLargestContentfulPaintEntry):
(WebCore::LargestContentfulPaintData::generateLargestContentfulPaintEntry):
(WebCore::LargestContentfulPaintData::didPaintText):
(WebCore::LargestContentfulPaintData::takePendingEntry): Deleted.
* Source/WebCore/page/LargestContentfulPaintData.h:
* Source/WebCore/page/Performance.cpp:
(WebCore::Performance::enqueueLargestContentfulPaint):
(WebCore::Performance::reportLargestContentfulPaint): Deleted.
* Source/WebCore/page/Performance.h:
Canonical link: https://commits.webkit.org/301382@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes