Bug 233670

Summary: Adjust a Live Text quirk so that it applies to YouTube image thumbnails
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, esprehn+autocc, ews-watchlist, hi, kangil.han, karlcow, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 254973    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Wenson Hsieh 2021-11-30 16:32:31 PST
.
Comment 1 Wenson Hsieh 2021-11-30 16:45:54 PST
Created attachment 445489 [details]
Patch
Comment 2 Devin Rousso 2021-11-30 17:20:20 PST
Comment on attachment 445489 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445489&action=review

rs=me

> Source/WebCore/page/Quirks.cpp:1461
> +    if (host.endsWith(".youtube.com") || host == "youtube.com")

I think we normally use `equalLettersIgnoringASCIICase` and `endsWithIgnoringASCIICase` (or `convertToASCIILowercase` beforehand).
Comment 3 Wenson Hsieh 2021-12-01 08:20:11 PST
Comment on attachment 445489 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445489&action=review

>> Source/WebCore/page/Quirks.cpp:1461
>> +    if (host.endsWith(".youtube.com") || host == "youtube.com")
> 
> I think we normally use `equalLettersIgnoringASCIICase` and `endsWithIgnoringASCIICase` (or `convertToASCIILowercase` beforehand).

Fixed — thanks for the review!
Comment 4 Wenson Hsieh 2021-12-01 08:21:12 PST
Created attachment 445575 [details]
Patch for landing
Comment 5 EWS 2021-12-01 09:09:50 PST
Committed r286366 (244725@main): <https://commits.webkit.org/244725@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445575 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-01 09:10:26 PST
<rdar://problem/85924733>
Comment 7 Karl Dubost 2023-03-27 21:19:10 PDT
Wenson Hsieh, do you remember the steps to reproduce here?
Comment 8 Wenson Hsieh 2023-03-28 08:02:21 PDT
(In reply to Karl Dubost from comment #7)
> Wenson Hsieh, do you remember the steps to reproduce here?

The steps to reproduce, as I previously recalled, are:
1. Navigate to a YouTube video.
2. Hover over related video thumbnails that have recognizable text.
3. Drag to select the text.

At some point, (3) wouldn't work and you would end up not selecting text. That said, I just tried this out on YouTube with site-specific hacks disabled, and it now appears to work. Perhaps we don't need this quirk anymore..