[webkit-changes] [WebKit/WebKit] 0a5b0a: Dynamic viewport expansion heuristic does not work...

Wenson Hsieh noreply at github.com
Fri Jul 26 08:25:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a5b0aa9a91f97e7a2e2d4e308356b7f7b3520d3
      https://github.com/WebKit/WebKit/commit/0a5b0aa9a91f97e7a2e2d4e308356b7f7b3520d3
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-07-26 (Fri, 26 Jul 2024)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  Dynamic viewport expansion heuristic does not work on bigfishgames.com
https://bugs.webkit.org/show_bug.cgi?id=277113
rdar://128572358

Reviewed by Richard Robinson.

Adjust the viewport height expansion heuristic once again, so that we trigger an update whenever a
fixed-position container finishes animating. Additionally, add logic to throttle these updates to
a maximum of one every ~200 ms, to prevent websites with constantly-running animations from either
(1) indefinitely deferring updates, or (2) triggering constant and frequent updates.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didAddOrRemoveViewportConstrainedObjects):

Move this logic into a common helper method, `scheduleLayoutViewportHeightExpansionUpdate`.

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

Also, schedule an update whenever synthetic click events are dispatched (i.e. user taps the screen).

(WebKit::WebPage::scheduleLayoutViewportHeightExpansionUpdate):
(WebKit::WebPage::updateLayoutViewportHeightExpansionTimerFired):
(WebKit::WebPage::animationDidFinishForElement):
(WebKit::WebPage::scheduleEditorStateUpdateAfterAnimationIfNeeded):

Pull this existing logic for scheduling an EditorState update after completing an animation out into
a separate helper method.

Canonical link: https://commits.webkit.org/281403@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