Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f5dc68f8b169e8057d1c3a4c594c84d4b03f8f7f
https://github.com/WebKit/WebKit/commit/f5dc68f8b169e8057d1c3a4c594c84d4b03f8f7f
Author: Wenson Hsieh <[email protected]>
Date: 2026-02-02 (Mon, 02 Feb 2026)
Changed paths:
A
LayoutTests/fast/text-extraction/debug-text-extraction-scrolling-expected.txt
A LayoutTests/fast/text-extraction/debug-text-extraction-scrolling.html
M LayoutTests/resources/ui-helper.js
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Source/WebCore/page/text-extraction/TextExtractionTypes.h
M Source/WebKit/Shared/TextExtractionToStringConversion.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm
Log Message:
-----------
[AutoFill Debugging] Include scroll position in text extraction output for
scrollable containers
https://bugs.webkit.org/show_bug.cgi?id=306795
rdar://169219513
Reviewed by Patrick Angle and Abrar Rahman Protyasha.
Add more information about scrollable containers, for both JSON and text tree
text extraction output
formats. See below for more details.
Test: fast/text-extraction/debug-text-extraction-scrolling.html
*
LayoutTests/fast/text-extraction/debug-text-extraction-scrolling-expected.txt:
Added.
* LayoutTests/fast/text-extraction/debug-text-extraction-scrolling.html: Added.
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.prototype.async requestDebugText):
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
Remove `ContainerType::Root`, and instead represent the root node using a
`ScrollableItemData`
with `isRoot := true`.
(WebCore::TextExtraction::extractItemData):
(WebCore::TextExtraction::shouldIncludeNodeIdentifier):
(WebCore::TextExtraction::extractRecursive):
(WebCore::TextExtraction::extractItem):
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
Add some more information to `ScrollableItemData`: the current
`scrollPosition`, a flag indicating
whether the scrollable container represents the root node, and lastly, whether
or not there are any
text extraction items underneath the scrollable container, that were excluded
from the extraction
output due to being outside of the target collection rect.
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::containerTypeString):
(WebKit::jsonTypeStringForItem):
(WebKit::populateJSONForItem):
(WebKit::partsForItem):
(WebKit::addPartsForItem):
(WebKit::addTextRepresentationRecursive):
Add `scrollPosition` and `contentSize` only if there are items underneath the
scroll container that
can potentially be accessed by scrolling the container.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm:
(WebKit::containerType):
(WebKit::createItemWithChildren):
(WebKit::createItem):
Canonical link: https://commits.webkit.org/306665@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications