[webkit-changes] [WebKit/WebKit] 17bb2c: [UIIntelligenceSupport] beckta.com: Siri fails to ...
Wenson Hsieh
noreply at github.com
Thu Jan 30 22:00:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 17bb2c1ed7680330e1e28f4afe756151d688c064
https://github.com/WebKit/WebKit/commit/17bb2c1ed7680330e1e28f4afe756151d688c064
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2025-01-30 (Thu, 30 Jan 2025)
Changed paths:
A LayoutTests/fast/text-extraction/text-extraction-visible-overflow-expected.html
A LayoutTests/fast/text-extraction/text-extraction-visible-overflow.html
M Source/WebCore/page/text-extraction/TextExtraction.cpp
Log Message:
-----------
[UIIntelligenceSupport] beckta.com: Siri fails to find text after scrolling to the bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=286748
rdar://141776975
Reviewed by Megan Gardner and Abrar Rahman Protyasha.
Adjust our approach when extracting bounding rects for context retrieval via UIIntelligenceSupport.
IntelligenceFlow currently ignores all items, whose bounding rect is entirely outside of the bounds
of its parent container.
However, in WebKit, we simply use `absoluteBoundingBoxRect` to extract element bounds, which
ignores all visible layout overflow. On beckta.com, where the `body` and `html` elements are both
`width: 100%;` and `height: 100%;` (the initial containing block size), this means that any content
that visually overflows the body is effectively invisible to context retrieval, and thus invisible
to Siri.
To fix this, we use `absoluteClippedOverflowRectForRepaint` instead for all renderers with children,
which includes visible overflow. Note that for leaves in the render tree, we continue to use
`absoluteBoundingBoxRect`, such that bounding rects around rendered text, images and other widgets
like form controls will still tightly fit around the rendered content, instead of stretching to the
repaint rect.
* LayoutTests/fast/text-extraction/text-extraction-visible-overflow-expected.html: Added.
* LayoutTests/fast/text-extraction/text-extraction-visible-overflow.html: Added.
Add a layout test to exercise this change; before this fix, the `height: 100%;` on the `body` causes
its bounding rect to only be as tall as the initial containing block. After this fix, it correctly
expands to fill the height of the page.
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::rootViewBounds):
Canonical link: https://commits.webkit.org/289594@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