[webkit-changes] [WebKit/WebKit] 5dce17: [UnifiedPDF] Can't click-drag the scrollbar

Simon Fraser noreply at github.com
Sat Mar 16 16:14:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5dce1764e0a3228c2260c1797276d4ac1fba2158
      https://github.com/WebKit/WebKit/commit/5dce1764e0a3228c2260c1797276d4ac1fba2158
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-03-16 (Sat, 16 Mar 2024)

  Changed paths:
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/plugins/PluginViewBase.h
    M Source/WebCore/rendering/RenderEmbeddedObject.cpp
    M Source/WebCore/rendering/RenderEmbeddedObject.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h

  Log Message:
  -----------
  [UnifiedPDF] Can't click-drag the scrollbar
https://bugs.webkit.org/show_bug.cgi?id=271115
rdar://124785551

Reviewed by Abrar Rahman Protyasha.

For mouse interaction with the PDFPlugin's scrollbars to work, `EventHandler::enclosingScrollableArea()`
has to be able to find the plugin node's ScrollableArea. Add an easy way to get to the ScrollableArea
from RenderEmbeddedObject, which calls through the PluginView. Replace the odd code in `startKeyboardScrollAnimationOnPlugin()`
with this cleaner code.

Oddly that broke keyboard scrolling, which is fixed by implementing `scrollAnimatorEnabled()` in
PDFPluginBase to return true.

Also implement `PDFPluginBase::enclosingScrollableArea()`; this isn't called on macOS at this point, but
is implemented for completeness.

* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::enclosingScrollableArea):
(WebCore::EventHandler::startKeyboardScrollAnimationOnPlugin):
* Source/WebCore/plugins/PluginViewBase.h:
(WebCore::PluginViewBase::scrollableArea const):
* Source/WebCore/rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::scrollableArea const):
(WebCore::RenderEmbeddedObject::usesAsyncScrolling const):
(WebCore::RenderEmbeddedObject::scrollingNodeID const):
(WebCore::RenderEmbeddedObject::willAttachScrollingNode):
(WebCore::RenderEmbeddedObject::didAttachScrollingNode):
* Source/WebCore/rendering/RenderEmbeddedObject.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::enclosingScrollableArea const):
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::scrollableArea const):
* Source/WebKit/WebProcess/Plugins/PluginView.h:

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