Skip to content

Commit

Permalink
Exclude Transparent Texts From Being Eligible LCP Candidate (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
haoliuk authored Oct 28, 2024
1 parent 06358fd commit 6eb2d04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ Report Largest Contentful Paint {#sec-report-largest-contentful-paint}
1. <a>Potentially add a LargestContentfulPaint entry</a> with |candidate|, |intersectionRect|, |now|, |record|'s [=pending image record/loadTime=] and |document|.
1. [=list/For each=] |textNode| of |paintedTextNodes|,
1. If |textNode| is not [=exposed for paint timing=], given |document|, continue.
1. If |textNode| has [=alpha channel=] value <=0 or [=opacity=] value <=0:
1. If |textNode|'s <a property>text-shadow</a> value is none, |textNode|'s 'stroke-color' value is [=transparent=] and |textNode|'s 'stroke-image' value is none, continue.
1. Let |candidate| be (|textNode|, null)
1. Let |intersectionRect| be an empty rectangle.
1. [=set/For each=] {{Text}} <a>node</a> |text| of |textNode|'s <a>set of owned text nodes</a>:
Expand Down

0 comments on commit 6eb2d04

Please sign in to comment.