Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f9de3d7d20770fedf23d17e2471795515914eb9
      
https://github.com/WebKit/WebKit/commit/5f9de3d7d20770fedf23d17e2471795515914eb9
  Author: Wenson Hsieh <[email protected]>
  Date:   2025-07-09 (Wed, 09 Jul 2025)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/QuirksData.h
    M Source/WebKit/Shared/FocusedElementInformation.h
    M Source/WebKit/Shared/FocusedElementInformation.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/ios/UIKitUtilities.h
    M Source/WebKit/UIProcess/ios/UIKitUtilities.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [Liquid Glass] theguardian.com: scroll edge effect makes crossword puzzle 
hints unreadable on some iPhone models
https://bugs.webkit.org/show_bug.cgi?id=295613
rdar://153818837

Reviewed by Aditya Keerthi.

Add a site-specific quirk on `theguardian.*` to hide the top scroll edge effect 
when focusing on
input fields in a crossword puzzle. On smaller phones, this prevents the top 
scroll edge effect's
variable blur from extending down and overlapping the top hint text.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldHideSoftTopScrollEdgeEffectDuringFocus const):
(WebCore::handleGuardianQuirks):

Add support for the new quirk, based on the ID of the focused element.

(WebCore::Quirks::determineRelevantQuirks):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
* Source/WebKit/Shared/FocusedElementInformation.h:
* Source/WebKit/Shared/FocusedElementInformation.serialization.in:

Add a flag that stores whether or not the top scroll pocket should be hidden 
when focusing this
element.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:

Add a new reason to hide the top scroll pocket — `SiteSpecificQuirk`. One flag 
should suffice for
now, assuming we don't end up with multiple site-specific quirks that need to 
be active at the same
time, on the same site.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _updateNeedsTopScrollPocketDueToVisibleContentInset]):
* Source/WebKit/UIProcess/ios/UIKitUtilities.h:
* Source/WebKit/UIProcess/ios/UIKitUtilities.mm:
(-[UIScrollView _wk_usesHardTopScrollEdgeEffect]):

Add a helper method to return whether or not the top scroll edge effect uses 
the hard scroll edge
effect style.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView 
_continueElementDidFocus:requiresStrongPasswordAssistance:focusedElementInfo:activityStateChanges:restoreValues:]):
(-[WKContentView _elementDidBlur]):

Implement the main fix here, by adding or removing the new `SiteSpecificQuirk` 
reason based on the
value of `shouldHideSoftTopScrollEdgeEffect` from the incoming focused element 
info. We only remove
the hiding reason here if `!_isChangingFocus`, to prevent the reason flag from 
being thrashed
(removed and immediately re-introduced) in the case where we're moving from one 
quirked text input
to another.

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to