Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9c12a46edfdbced04906e74a337d6fe7bdb7e525
      
https://github.com/WebKit/WebKit/commit/9c12a46edfdbced04906e74a337d6fe7bdb7e525
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-01-02 (Fri, 02 Jan 2026)

  Changed paths:
    A 
LayoutTests/fast/text-extraction/extract-text-with-empty-body-expected.html
    A LayoutTests/fast/text-extraction/extract-text-with-empty-body.html
    M Source/WebCore/page/text-extraction/TextExtraction.cpp

  Log Message:
  -----------
  [UIIntelligenceSupport] youtube.com: unable to retrieve context entities from 
video pages
https://bugs.webkit.org/show_bug.cgi?id=304853
rdar://160218812

Reviewed by Abrar Rahman Protyasha.

UIIntelligenceSupport automatically prunes the extracted IntelligenceSupport 
element tree by
filtering out all items whose bounding rects lie outside the bounds of its 
parent item's bounds. On
YouTube, this currently causes the entire page content to get filtered out, due 
to the fact that the
`body` element (represented by the `root` item) has `height: 0;`, and so the 
bounding rect is empty.
To fix this, use the mainframe `contentsSize()` instead of the `body`'s 
bounding rect for the root
item's `rectInRootView`.

Test: fast/text-extraction/extract-text-with-empty-body.html

* LayoutTests/fast/text-extraction/extract-text-with-empty-body-expected.html: 
Added.
* LayoutTests/fast/text-extraction/extract-text-with-empty-body.html: Added.

Add a ref test to verify that the presence of `height: 0;` on `html` and/or 
`body` does not change
the extracted item tree.

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

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to