[webkit-changes] [WebKit/WebKit] 226a1a: Include elements with background images in `-[WKTa...

Wenson Hsieh noreply at github.com
Fri May 17 16:38:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 226a1a0f209e945a3443dee265d44e28ba2810aa
      https://github.com/WebKit/WebKit/commit/226a1a0f209e945a3443dee265d44e28ba2810aa
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-05-17 (Fri, 17 May 2024)

  Changed paths:
    A LayoutTests/fast/element-targeting/target-rendered-text-with-background-image-expected.txt
    A LayoutTests/fast/element-targeting/target-rendered-text-with-background-image.html
    M Source/WebCore/page/ElementTargetingController.cpp
    M Source/WebCore/page/text-extraction/TextExtraction.cpp
    M Source/WebCore/page/text-extraction/TextExtraction.h

  Log Message:
  -----------
  Include elements with background images in `-[WKTargetedElementInfo renderedText]`
https://bugs.webkit.org/show_bug.cgi?id=274313
rdar://127515119

Reviewed by Aditya Keerthi.

Indicate CSS background images in rendered text strings for targeted elements, in the same way as
replaced renderers.

* LayoutTests/fast/element-targeting/target-rendered-text-with-background-image-expected.txt: Added.
* LayoutTests/fast/element-targeting/target-rendered-text-with-background-image.html: Added.

Add a new test to exercise the change.

* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::targetedElementInfo):

Also rename `IncludeGeometryText` to `OnlyIncludeTextContent` and flip values in each call site from
`Yes` ⇆ `No`, since "geometry text" is a somewhat-vague term.

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::extractRenderedText):
* Source/WebCore/page/text-extraction/TextExtraction.h:

Canonical link: https://commits.webkit.org/278934@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