[webkit-changes] [WebKit/WebKit] 6e10fc: [InteractionRegions] Extend the SVG color luminanc...

Etienne Segonzac noreply at github.com
Sun Aug 11 00:43:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e10fc2af54142db16d02f54e8040f5e2d59bdd9
      https://github.com/WebKit/WebKit/commit/6e10fc2af54142db16d02f54e8040f5e2d59bdd9
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2024-08-11 (Sun, 11 Aug 2024)

  Changed paths:
    M LayoutTests/interaction-region/svg-luminance-expected.txt
    M LayoutTests/interaction-region/svg-luminance.html
    M Source/WebCore/page/InteractionRegion.cpp

  Log Message:
  -----------
  [InteractionRegions] Extend the SVG color luminance check
https://bugs.webkit.org/show_bug.cgi?id=277685
<rdar://132908848>

Reviewed by Simon Fraser.

In 279859 at main, we started detecting "small shapes with extreme
luminance" that would be challenging to highlight. This check needs to
account for SVGs using only a stroke.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::colorIsChallengingToHighlight):
Extract the luminance check.

(WebCore::usesFillColorWithExtremeLuminance): Deleted.
(WebCore::interactionRegionForRenderedRegion):
(WebCore::styleIsChallengingToHighlight):
Rename the function.
When the fill paint type is none, check the stroke color instead of the
fill color.

* LayoutTests/interaction-region/svg-luminance-expected.txt:
* LayoutTests/interaction-region/svg-luminance.html:
Add stroke based tests.

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



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


More information about the webkit-changes mailing list