Bug 233670 - Adjust a Live Text quirk so that it applies to YouTube image thumbnails
Summary: Adjust a Live Text quirk so that it applies to YouTube image thumbnails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks: 254973
  Show dependency treegraph
 
Reported: 2021-11-30 16:32 PST by Wenson Hsieh
Modified: 2023-04-03 23:02 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.39 KB, patch)
2021-11-30 16:45 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for landing (3.43 KB, patch)
2021-12-01 08:21 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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..