Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 219438e733d3c323fa7ce3eee04d0685c933835f
      
https://github.com/WebKit/WebKit/commit/219438e733d3c323fa7ce3eee04d0685c933835f
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2024-06-26 (Wed, 26 Jun 2024)

  Changed paths:
    M Source/WebCore/page/ChromeClient.h
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] Implement a strategy to dynamically adjust the fixed-position viewport 
height
https://bugs.webkit.org/show_bug.cgi?id=275910
rdar://130606240

Reviewed by Aditya Keerthi.

Refactor `m_allowsLayoutViewportHeightExpansion` to be an `OptionSet` of reason 
flags instead, which
encompasses the existing `ElementFullScreen` logic as well as a new codepath 
for checking whether
there is a large fixed-position element in the page.

* Source/WebCore/page/ChromeClient.h:
(WebCore::ChromeClient::didAddOrRemoveViewportConstrainedObjects):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::addViewportConstrainedObject):
(WebCore::LocalFrameView::removeViewportConstrainedObject):

Add a client hook to start a one-shot timer when the set of viewport 
constrained renderers updates.

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didAddOrRemoveViewportConstrainedObjects):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::closeFullScreen):
(WebKit::WebPage::prepareToEnterElementFullScreen):
(WebKit::WebPage::prepareToExitElementFullScreen):
(WebKit::WebPage::didCommitLoad):

Refactor these to use the new reason flags.

(WebKit::WebPage::didAddOrRemoveViewportConstrainedObjects):
(WebKit::WebPage::addReasonsToDisallowLayoutViewportHeightExpansion):
(WebKit::WebPage::removeReasonsToDisallowLayoutViewportHeightExpansion):
(WebKit::WebPage::setAllowsLayoutViewportHeightExpansion): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateLayoutViewportHeightExpansionTimerFired):

Implement the main heuristic here, which checks for a fixed-position container 
that both:
1. Covers the fixed-position viewport rect, and…
2. Can be found by hit-testing the center of the fixed-position viewport rect.

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



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

Reply via email to