Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7afef90df3f32c1437185b66b016ff220c280eb
      
https://github.com/WebKit/WebKit/commit/a7afef90df3f32c1437185b66b016ff220c280eb
  Author: Jintian Wang <[email protected]>
  Date:   2026-10-08 (Thu, 08 Oct 2026)

  Changed paths:
    A LayoutTests/interaction-region/regions-filling-rectangle-expected.txt
    A LayoutTests/interaction-region/regions-filling-rectangle.html
    M Source/WebCore/rendering/EventRegion.cpp

  Log Message:
  -----------
  Gaze glow for the apple.com leadership card has a jagged, stepped shape
https://bugs.webkit.org/show_bug.cgi?id=325686
rdar://188336639

Reviewed by Etienne Segonzac.

Each apple.com leadership card is a link whose regions (the photo, the caption,
the name and the title) glow together. shrinkWrapInteractionRegions() merges
them into a single rect that covers the card, but then adds the name, the title
and their lines of text back as regions of their own, inside that rect. The glow
is stacked on those rows, which makes it look stepped.

Fix this in two steps:
1. Decide whether the regions can use a single rect by checking that their
rects, slightly inflated, cover their bounds. This no longer depends on the
order the regions were painted in, and small gaps between them don't prevent 
using a single rect.
2. When the regions use a single rect, don't add back the ones that have the
same content hint as that rect, since it already covers them. Regions with 
another content hint, like a photo in a card, still get their own region.

Test: interaction-region/regions-filling-rectangle.html
* LayoutTests/interaction-region/regions-filling-rectangle-expected.txt: Added.
* LayoutTests/interaction-region/regions-filling-rectangle.html: Added.
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::EventRegionContext::shrinkWrapInteractionRegions):

Canonical link: https://commits.webkit.org/323107@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to