Skip to content

Added a test for LCP text fragment union. - #61873

Merged
noamr merged 1 commit into
web-platform-tests:masterfrom
shubhamg13:lcp_text_union
Aug 13, 2026
Merged

noamr merged 1 commit into
web-platform-tests:masterfrom
shubhamg13:lcp_text_union

Conversation

@shubhamg13

Copy link
Copy Markdown
Contributor

Added a new test for LCP text fragment union.

Create a text element narrow enough to force line wrapping across
multiple fragments. Without correct union, only a single line's
bounding box would be reported instead of all lines combined.

Signed-off-by: Shubham Gupta <shubhamg13.work@gmail.com>
@shubhamg13 shubhamg13 changed the title Added a new test for LCP text fragment union. Added a test for LCP text fragment union. Aug 12, 2026
@shubhamg13

Copy link
Copy Markdown
Contributor Author

Please help me in merging this as well.

@noamr
noamr merged commit 38460ad into web-platform-tests:master Aug 13, 2026
26 checks passed
markafoltz pushed a commit to markafoltz/web-platform-tests that referenced this pull request Aug 17, 2026
Signed-off-by: Shubham Gupta <shubhamg13.work@gmail.com>
mrobinson pushed a commit to mrobinson/servo that referenced this pull request Aug 18, 2026
Since the spec says, for text nodes we need to do union of border box
per element.

-  Adding `containing_element_tag` for making this union.
 - Adding `TextRecord` to store `TextNodes` related to an `Element`.
 

> Note: Please view using `Hide whitespace` option.

Testing: More WPT Passed
- Added a specific test to verify union logic of rect - size calculation
is correct in WPT
- `tests/wpt/tests/largest-contentful-paint/text-fragment-union.html`-
web-platform-tests/wpt#61873
- (_TODO: set loadTime to zero for text, other failing tests will also
pass #47315_)



Fixes: Part of servo#42000

---------

Signed-off-by: Shubham Gupta <shubhamg13.work@gmail.com>
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
Since the spec says, for text nodes we need to do union of border box
per element.

-  Adding `containing_element_tag` for making this union.
 - Adding `TextRecord` to store `TextNodes` related to an `Element`.
 

> Note: Please view using `Hide whitespace` option.

Testing: More WPT Passed
- Added a specific test to verify union logic of rect - size calculation
is correct in WPT
- `tests/wpt/tests/largest-contentful-paint/text-fragment-union.html`-
web-platform-tests/wpt#61873
- (_TODO: set loadTime to zero for text, other failing tests will also
pass #47315_)



Fixes: Part of servo#42000

---------

Signed-off-by: Shubham Gupta <shubhamg13.work@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants