[webkit-changes] [WebKit/WebKit] c49066: Add an optional target rect to WebPageProxy::reque...
Wenson Hsieh
noreply at github.com
Mon Feb 5 21:23:36 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c49066ba93c18e4e5c824533cc7717d11992a524
https://github.com/WebKit/WebKit/commit/c49066ba93c18e4e5c824533cc7717d11992a524
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-02-05 (Mon, 05 Feb 2024)
Changed paths:
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Source/WebCore/page/text-extraction/TextExtraction.h
M Source/WebCore/page/text-extraction/TextExtractionTypes.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Log Message:
-----------
Add an optional target rect to WebPageProxy::requestTextExtraction()
https://bugs.webkit.org/show_bug.cgi?id=268793
Reviewed by Megan Gardner, Tim Horton and Richard Robinson.
Add an optional bounding rect argument to `requestTextExtraction`; if specified, this limits the
extraction results to only nodes that intersect with the given rect.
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::collectText):
Also, use the whitespace-trimmed text instead of the raw text from `TextIterator`.
(WebCore::TextExtraction::extractItemData):
(WebCore::TextExtraction::extractRecursive):
(WebCore::TextExtraction::extractItem):
* Source/WebCore/page/text-extraction/TextExtraction.h:
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
Add several new container extraction types.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestTextExtraction):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::requestTextExtraction):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/274127@main
More information about the webkit-changes
mailing list