[webkit-changes] [WebKit/WebKit] 3fd531: [Unified PDF] After tab switching away and back, s...

Tim Horton noreply at github.com
Wed Aug 28 09:25:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3fd53169dbb51f646fb3a68f28b949bff751628a
      https://github.com/WebKit/WebKit/commit/3fd53169dbb51f646fb3a68f28b949bff751628a
  Author: Tim Horton <thorton at apple.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingCoordinator.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  [Unified PDF] After tab switching away and back, scrolled <iframe> PDF is blank until you scroll
https://bugs.webkit.org/show_bug.cgi?id=278771
rdar://133987979

Reviewed by Abrar Rahman Protyasha.

Like subframes, save our scroll position when moving out of window so that
it can correctly be restored when coming back.

* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewWillBeDetached):
(WebCore::AsyncScrollingCoordinator::scrollableAreaWillBeDetached):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
Factor scrollableAreaWillBeDetached out of frameViewWillBeDetached.

* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::scrollableAreaWillBeDetached):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
(WebKit::PDFPluginBase::didChangeIsInWindow):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::didChangeIsInWindow):
Call scrollableAreaWillBeDetached when we move out of the window.

* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didChangeIsInWindow):
* Source/WebKit/WebProcess/Plugins/PluginView.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateIsInWindow):
Propagate in-window changes to the plugin.

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