Automatic update from web-platform-tests [highlights] Paint custom highlight backgrounds over replaced elements Build on the replaced-element tracking added by the parent CL to actually paint custom ::highlight() background tints over replaced elements such as <img>. - ReplacedPainter::PaintCustomHighlights() fills the area the replaced content occupies (the content box, or the replaced object's rect when it overflows the content box) with the active custom-highlight backgrounds, in the foreground phase, after the replaced content and below the existing ::selection tint in the highlight overlay order. - Stacked highlights resolve background-color: currentColor against the previous highlight layer, mirroring HighlightOverlay:: ComputeParts() for text, so a higher-priority layer's currentColor reflects the lower layer's resolved color rather than the host element's color. - The cached drawing is consulted before resolving any colors, so cache hits skip the stacking sort and per-layer color resolution. Bug: 357946492 Change-Id: I5b9b4e9a4189c90c45c81690d2d734b5dbea2683 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7830521 Commit-Queue: Fernando Fiori <ffiori@microsoft.com> Reviewed-by: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/main@{#1656173} -- wpt-commits: 1d2752ae73c88ec922c0112843ef4f5732a2a4d6 wpt-pr: 61044
13 lines
398 B
HTML
13 lines
398 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Reference: object element rendering fallback content, fallback text highlighted directly.</title>
|
|
<style>
|
|
object { display: block; width: 100px; height: 50px; }
|
|
#fallback { background-color: rgb(200, 0, 0); color: green; }
|
|
</style>
|
|
</head>
|
|
<body><object><span id="fallback">fallback</span></object></body>
|
|
</html>
|