WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
310264
LCP in shadow DOM is not reported
https://bugs.webkit.org/show_bug.cgi?id=310264
Summary
LCP in shadow DOM is not reported
smrtnyk
Reported
2026-03-19 01:35:18 PDT
Created
attachment 478720
[details]
you will need to install playwright test for this Both chrome and firefox report LCP coming from shadow dom but webkit doesn't. Given a scenario if image is loaded from shadow dom and is the best LCP candidate, chrome and firefox will report it as an lcp where webkit will ignore it and take only candidates from regular DOM. I am not really sure if webkit is more behaving to spec or not. It could be that firefox aligned to Chrome and webkit decided to follow the spec more closely. Relevant links: • LCP spec:
https://w3c.github.io/largest-contentful-paint/
(section 4.2) • Paint Timing spec:
https://w3c.github.io/paint-timing/
(section 5.4.1 "Exposed for paint timing") The LCP spec section 4.2 step 5.2 says If imageElement is not exposed for paint timing, given document, continue. in Paint timing spec seciton 5.4.1 step 4 If element’s root is not equal to document, return false. I am not sure how to interpret it. I have attached a test script you can run via node It uses @playwright/test in order to run all 3 browsers.
Attachments
you will need to install playwright test for this
(4.01 KB, text/javascript)
2026-03-19 01:35 PDT
,
smrtnyk
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2026-03-23 17:40:28 PDT
I thought there was a web platform test for this that we passed.
Radar WebKit Bug Importer
Comment 2
2026-03-23 17:40:48 PDT
<
rdar://problem/173197678
>
Simon Fraser (smfr)
Comment 3
2026-04-03 17:16:19 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62008
EWS
Comment 4
2026-04-04 08:35:43 PDT
Committed
310575@main
(0b5c61add5d5): <
https://commits.webkit.org/310575@main
> Reviewed commits have been landed. Closing PR #62008 and removing active labels.
EWS
Comment 5
2026-04-04 21:13:00 PDT
Committed
305413.615@safari-7624-branch
(c1f3664d9ebb): <
https://commits.webkit.org/305413.615@safari-7624-branch
> Reviewed commits have been landed. Closing PR #4896 and removing active labels.
WebKit Commit Bot
Comment 6
2026-04-06 11:27:19 PDT
Re-opened since this is blocked by
bug 311575
Simon Fraser (smfr)
Comment 7
2026-04-06 11:29:16 PDT
It's not clear from specs about whether this is correct, so reverted.
Simon Fraser (smfr)
Comment 8
2026-04-06 11:38:23 PDT
https://github.com/w3c/largest-contentful-paint/issues/152
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug