Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7630c1e345cce01b7e56dc6fc512d416f68cadd4
      
https://github.com/WebKit/WebKit/commit/7630c1e345cce01b7e56dc6fc512d416f68cadd4
  Author: Simon Fraser <[email protected]>
  Date:   2025-10-11 (Sat, 11 Oct 2025)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/page/LargestContentfulPaintData.cpp
    M Source/WebCore/page/LargestContentfulPaintData.h

  Log Message:
  -----------
  [LCP] Various minor LargestContentfulPaint optimizations
https://bugs.webkit.org/show_bug.cgi?id=300554
rdar://162440439

Reviewed by Tim Nguyen.

Cache the value of visualViewportRect().size() for each call to 
`LargestContentfulPaintData::takePendingEntry()`,
since computing this is somewhat expensive.

Move `isExposedForPaintTiming()` checks to after the cheaper tests for set 
membership.

Bail from `didPaintText` when the rect is empty, which is quite common in 
Speedo.

`Document::enqueuePaintTimingEntryIfNeeded()` should only emit the log when 
there is an LCP entry.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::enqueuePaintTimingEntryIfNeeded):
* Source/WebCore/page/LargestContentfulPaintData.cpp:
(WebCore::LargestContentfulPaintData::effectiveVisualArea):
(WebCore::LargestContentfulPaintData::potentiallyAddLargestContentfulPaintEntry):
(WebCore::LargestContentfulPaintData::takePendingEntry):
(WebCore::LargestContentfulPaintData::computeViewportIntersectionRect):
(WebCore::LargestContentfulPaintData::didLoadImage):
(WebCore::LargestContentfulPaintData::didPaintImage):
(WebCore::LargestContentfulPaintData::didPaintText):
* Source/WebCore/page/LargestContentfulPaintData.h:

Canonical link: https://commits.webkit.org/301363@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

Reply via email to