[webkit-changes] [WebKit/WebKit] 8c684c: Label elements should get InteractionRegions when ...

Commit Queue noreply at github.com
Tue May 2 22:03:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c684cfbe8afa5cb7eea0e46408cbdd31e920ba1
      https://github.com/WebKit/WebKit/commit/8c684cfbe8afa5cb7eea0e46408cbdd31e920ba1
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

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

  Log Message:
  -----------
  Label elements should get InteractionRegions when associated to a control
https://bugs.webkit.org/show_bug.cgi?id=256234
<rdar://108739137>

Reviewed by Tim Horton.

Add support for `<label>` elements in the InteractionRegion generation
code.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::interactionRegionForRenderedRegion):
When an element is "labelable", look for label ancestors when doing
element matching.
When a label has a control associated, remove the `cursor: pointer`
requirement, like we do for the control itself.
Group label and control together by using the control's
`elementIndentifier` for both regions.

* LayoutTests/interaction-region/labels-expected.txt: Added.
* LayoutTests/interaction-region/labels.html: Added.
Add a new test file for labels.

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




More information about the webkit-changes mailing list