[webkit-changes] [WebKit/WebKit] 97ea7b: Consider hover styles when generating InteractionR...

Commit Queue noreply at github.com
Thu Apr 27 12:41:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 97ea7bcbcccbf097a83ebb9416d3c12767796384
      https://github.com/WebKit/WebKit/commit/97ea7bcbcccbf097a83ebb9416d3c12767796384
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    A LayoutTests/interaction-region/hover-style-expected.txt
    A LayoutTests/interaction-region/hover-style.html
    M Source/WebCore/page/InteractionRegion.cpp

  Log Message:
  -----------
  Consider hover styles when generating InteractionRegions
https://bugs.webkit.org/show_bug.cgi?id=255940
<rdar://107265123>

Reviewed by Tim Horton.

Use the presence of `:hover` styles as a signal when generating
InteractionRegions.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::elementMatchesHoverRules):
Add a function to detect if an element potentially matches hover rules.
(WebCore::interactionRegionForRenderedRegion):
When an element looks like a likely InteractionRegion candidate, but
doesn't have `cursor: pointer`, check to see if it matches hover rules.

* LayoutTests/interaction-region/hover-style-expected.txt: Added.
* LayoutTests/interaction-region/hover-style.html: Added.
Add test covering this logic.

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




More information about the webkit-changes mailing list