Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a first bit of unused plug-in code #752

Conversation

darinadler
Copy link
Member

@darinadler darinadler commented May 18, 2022

834b53d

Remove a first bit of unused plug-in code
https://bugs.webkit.org/show_bug.cgi?id=240309

Reviewed by Chris Dumez.

* Source/WebKit/Sources.txt: Removed Plugin.cpp.
Removed unneeded @no-unify for PluginView.cpp and WebPluginInfoProvider.cpp.

* Source/WebKit/UIProcess/WebProcessProxy.cpp: Removed unneeded include
of PDFPlugin.h.

* Source/WebKit/WebKit.xcodeproj/project.pbxproj: Removed Plugin.cpp,
Plugin.h, and PluginController.h, and turned off non-unified building
for PluginView.cpp and WebPluginInfoProvider.cpp.

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameHandlesPageScaleGesture): Deprecate, and always return false.

* Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm:
(WKBundlePageGetPDFDocumentInFrame): Moved code inside #if ENABLE(PDFKIT_PLUGIN)
and also removed some unneeded local variables and includes.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h: Updated includes,
removing uneeeded ones, and adding others that previously were inherited
from Plugin.h. Similarly, added and removed forward declarations.
Changed the class to inherit from ThreadSafeRefCounted directly, eliminating
the Plugin base class. Removed the unneeded WebFrame argument from the create
function. Moved functions here from Plugin. Made handlesPageScalFactor,
convertFromPDFViewToRootView frameForHUD, and ensureDataBufferLength private.
Made isFullFramePlugin public. Added deviceScaleFactor. Made the virtual
function overrides just normal functions. Also tweaked arguments and return
values on some of them so they are the minimum needed to do the job.
Replaced the old weak pointer to the plug-in controller with a weak ponter
to the plug-in view; the two are the same object. Removed the isPDFPlugin
function and the type traits for downcast, since this is no longer derived
from a Plugin base class.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm: Tweaked includes.
Removed the "requestID" since now loading the main resource of the plug-in
is done without using general purpose "stream-loading" machinery.
(WebKit::PDFPlugin::create): Take fewer arguments.
(WebKit::PDFPlugin::PDFPlugin): Use WebFrame::fromCoreFrame to find the
frame so we don't have to pass it in. No need for null checks, though, because
PluginView does all those. Refactor and tweak a bit.
(WebKit::PDFPlugin::getResourceBytesAtPosition): Get URL from m_view.
(WebKit::PDFPlugin::updateScrollbars): Use m_view.
(WebKit::PDFPlugin::pluginView): Deleted.
(WebKit::PDFPlugin::pluginView const): Deleted.
(WebKit::PDFPlugin::createScrollbar): Use m_view.
(WebKit::PDFPlugin::convertFromScrollbarToContainingView const): Ditto.
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar const): Ditto.
(WebKit::PDFPlugin::handleScroll): Deleted.
(WebKit::PDFPlugin::scrollCornerRect const): Use m_view.
(WebKit::PDFPlugin::scrollableAreaBoundingBox const): Ditto.
(WebKit::PDFPlugin::addArchiveResource): Ditto. Also get URL from m_vie
since we no longer have m_sourceURL.
(WebKit::PDFPlugin::streamDidFinishLoading): Merged with
documentDataDidFinishLoading and manualStreamDidFinishLoading, and removed
the streamID argument since we only use one stream, to load PDF document data.
(WebKit::PDFPlugin::installPDFDocument): Use m_view.
(WebKit::PDFPlugin::streamDidReceiveResponse): Merged with setSuggestedFilename
and manualStreamDidReceiveResponse, and removed the streamID argument.
(WebKit::PDFPlugin::streamDidReceiveData): Merged with manualStreamDidReceiveData,
and removed the streamID argument.
(WebKit::PDFPlugin::streamDidFail): Merged with manualStreamDidFail, and removed
the streamID argument.
(WebKit::PDFPlugin::deviceScaleFactor const): Added. Gets the device scale factor
from the WebCore Page, which is something we have to do twice. The old code used
to go through the controller to do this.
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors): Use m_view. This change
looks confusing because what the controller called contentsScaleFactor was the
device scale factor from the WebCore::Page. Better to call that deviceScaleFactor.
(WebKit::PDFPlugin::initialize): Deleted. Moved all this code into
PluginView::initializePlugin.
(WebKit::PDFPlugin::setView): Added. Used to initialize.
(WebKit::PDFPlugin::destroy): Merged with destroyPlugin and with Plugin::destroy.
(WebKit::PDFPlugin::snapshot): Use deviceScaleFactor. See note above.
(WebKit::PDFPlugin::pluginLayer): Use CALayer for the return type.
(WebKit::PDFPlugin::geometryDidChange): Use m_view.
(WebKit::PDFPlugin::frameDidFinishLoading): Deleted.
(WebKit::PDFPlugin::frameDidFail): Deleted.
(WebKit::PDFPlugin::didEvaluateJavaScript): Deleted.
(WebKit::PDFPlugin::handleEditingCommand): Removed unused argument, use StringView.
(WebKit::PDFPlugin::isEditingCommandEnabled): Use StringView.
(WebKit::PDFPlugin::isFullFramePlugin const): Use m_view.
(WebKit::PDFPlugin::notifyContentScaleFactorChanged): Ditto.
(WebKit::PDFPlugin::pluginHandlesContentOffsetForAccessibilityHitTest const): Deleted.
(WebKit::PDFPlugin::openWithNativeApplication): Use isNull.
(WebKit::PDFPlugin::nextMatchForString): Use bool.

* Source/WebKit/WebProcess/Plugins/Plugin.cpp: Removed.
* Source/WebKit/WebProcess/Plugins/Plugin.h: Removed.
* Source/WebKit/WebProcess/Plugins/PluginController.h: Removed.

* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::URLRequest): Deleted.
(WebKit::PluginView::Stream::create): Remove streamID.
(WebKit::PluginView::Stream::streamID const): Deleted.
(WebKit::PluginView::Stream::Stream): Remove streamID.
(WebKit::PluginView::Stream::start): Use PluginView::frame.
(WebKit::PluginView::Stream::continueLoad): Removed unneeded assertion.
(WebKit::buildHTTPHeaders): Deleted.
(WebKit::lastModifiedDateMS): Deleted.
(WebKit::PluginView::Stream::willSendRequest): Removed call to
streamWillSendRequest.
(WebKit::PluginView::Stream::didReceiveResponse): Removed most of the
arguments to streamDidReceiveResponse.
(WebKit::PluginView::Stream::didReceiveData): Removed the streamID
argument to streamDidReceiveData.
(WebKit::PluginView::Stream::didFail): Removed the arguments to
streamDidFail, and the call to removeStream, since we can do that here.
(WebKit::PluginView::Stream::didFinishLoading): Removed the
streamID argument to stringDidFinishLoading, and the call to removeStream,
since we can do that here.
(WebKit::webPage): Deleted.
(WebKit::PluginView::create): Moved the code to map from element to WebPage
in here, changed the arguments to take all the parameters instead of
a Parameters struct, and moved the call to shouldUsePDFPlugin here
from WebPage::createPlugin.
(WebKit::PluginView::PluginView): Take individual parameters instead of
a Parameters struct. Also update for name changes.
(WebKit::PluginView::~PluginView): Removed most of the code, leaving
only call to cancel the stream and destroy the plug-in.
(WebKit::PluginView::destroyPluginAndReset): Deleted.
(WebKit::PluginView::setLayerHostingMode): Deleted.
(WebKit::PluginView::manualLoadDidReceiveResponse): Removed null check
of m_plugin, and most of the arguments to manualStreamDidReceiveResponse,
calling streamDidReceiveResponse instead.
(WebKit::PluginView::manualLoadDidReceiveData): Removed null check
of m_plugin, and call streamDidReceiveData instead of a separate
manualStreamDidReceiveData.
(WebKit::PluginView::manualLoadDidFinishLoading): Removed null check
of m_plugin, and call streamDidFinishLoading instead of a separate
manualStreamDidFinishLoading.
(WebKit::PluginView::manualLoadDidFail): Removed null check
of m_plugin, handling of specific stream errors, and call streamDidFail
without a specific error instead of a separate manualStreamDidFail.
(WebKit::PluginView::setPageScaleFactor): Removed unused IntPoint argument.
(WebKit::PluginView::handlesPageScaleFactor const): Deleted.
(WebKit::PluginView::requiresUnifiedScaleFactor const): Deleted.
(WebKit::PluginView::activityStateDidChange): Deleted.
(WebKit::PluginView::setDeviceScaleFactor): Removed null check of m_plugin.
(WebKit::PluginView::accessibilityAssociatedPluginParentForElement const):
(WebKit::PluginView::windowAndViewFramesChanged): Deleted.
(WebKit::PluginView::accessibilityAssociatedPluginParentForElement const):
Removed null check of m_plugin.
(WebKit::PluginView::accessibilityObject const): Ditto.
(WebKit::PluginView::initializePlugin): Merged with didInitializePlugin
removed null check of m_plugin, code to call addMediaCanStartListener,
code to call addAudioProducer, call Plugin::setView instead of calling
Plugin::initialize, call loadMainResource if needed, which was previously
done by Plugin::initialize. Removed the calls to windowAndViewFramesChanged
Plugin::setFocus. windowVisibilityChanged, windowFocusChanged, and
wantsWheelEvents. Fixed a bug in handling of non-full-frame plug-ins
in the main frame by only sending
MainFramePluginHandlesPageScaleGestureDidChange when it is full frame.
(WebKit::PluginView::platformLayer const): Removed null check of m_plugin.
(WebKit::PluginView::storageBlockingStateChanged): Deleted.
(WebKit::PluginView::scroll): Ditto.
(WebKit::PluginView::horizontalScrollbar): Ditto.
(WebKit::PluginView::verticalScrollbar): Ditto.
(WebKit::PluginView::wantsWheelEvents): Return true.
(WebKit::PluginView::paint): Removed null check of m_plugin and the
call to Plugin::paint.
(WebKit::PluginView::countFindMatches): Removed null check of m_plugin.
(WebKit::PluginView::findString): Ditto.
(WebKit::PluginView::getSelectionString const): Ditto.
(WebKit::PluginView::createWebEvent const): Deleted. Calling this
eventually resulted in calling Plugin::convertToRootView and would then
hit ASSSERT_NOT_REACHED.
(WebKit::PluginView::handleEvent): Removed the call to  createWebEvent.
Updated since m_pluginElement is a Ref instead of RefPtr. Removed the
call to wantsWheelEvents, which is now always true.
(WebKit::PluginView::handleEditingCommand): Removed null check of
m_plugin and stop passing the argument to Plugin::handleEditingCommand.
(WebKit::PluginView::isEditingCommandEnabled): Removed null check of
m_plugin.
(WebKit::PluginView::shouldAllowScripting): Deleted.
(WebKit::PluginView::shouldAllowNavigationFromDrags const): Return true.
(WebKit::PluginView::willDetachRenderer): Removed null check of m_plugin.
(WebKit::PluginView::liveResourceData const): Ditto.
(WebKit::PluginView::performDictionaryLookupAtLocation): Ditto.
(WebKit::PluginView::existingSelectionContainsPoint const): Ditto.
(WebKit::PluginView::viewGeometryDidChange): Ditto.
(WebKit::PluginView::viewVisibilityDidChange): Removed code to calculate
the clip rect and don't pass a clip rect to Plugin::geometryDidChange.
(WebKit::PluginView::clipRectInWindowCoordinates const): Update since
m_pluginElement is a Ref.
(WebKit::PluginView::focusPluginElement): Ditto.
(WebKit::PluginView::pendingResourceRequestTimerFired): Renamed from
pendingURLRequestsTimerFired. Simplified code since we can only have
one pending resource request and we don't want to support JavaScript URLs.
(WebKit::PluginView::performURLRequest): Deleted.
(WebKit::PluginView::performFrameLoadURLRequest): Deleted.
(WebKit::PluginView::performJavaScriptURLRequest): Deleted.
(WebKit::PluginView::addStream): Deleted.
(WebKit::PluginView::removeStream): Deleted.
(WebKit::PluginView::cancelAllStreams): Deleted.
(WebKit::PluginView::redeliverManualStream): Removed error argument
for manualLoadDidFail function.
(WebKit::PluginView::invalidateRect): Removed null check of m_plugin.
(WebKit::PluginView::setFocus): Deleted.
(WebKit::PluginView::mediaCanStart): Deleted.
(WebKit::PluginView::pageMutedStateDidChange): Deleted.
(WebKit::PluginView::loadMainResource): Renamed from loadURL.
Removed all the arguments, since it always loads the same URL in the
same way. Removed most of the code since most arguments are defaults.
(WebKit::PluginView::contentsScaleFactor): Deleted.
(WebKit::PluginView::didFinishLoad): Deleted.
(WebKit::PluginView::didFailLoad): Deleted.
(WebKit::PluginView::shouldCreateTransientPaintingSnapshot const):
Removed null check of m_plugin.
(WebKit::PluginView::isBeingDestroyed const): Moved out of
PluginView.h so it does not have to include PDFPlugin.h.
(WebKit::PluginView::pdfDocumentForPrinting const): Ditto.
(WebKit::PluginView::pdfDocumentSizeForPrinting const): Added.
(WebKit::PluginView::accessibilityHitTest const): Moved out of
PluginView.h so it does not have to include PDFPlugin.h.
(WebKit::PluginView::rectForSelectionInRootView const): Added.
(WebKit::PluginView::contentScaleFactor const): Added.

* Source/WebKit/WebProcess/Plugins/PluginView.h: Wrapped the
entire file in #if ENABLE(PDFKIT_PLUGIN) since this is no longer
a general purpose plug-in view. Removed many includes and an
obsolete comment about moving this whole class to WebCore.
Changed PluginView to no longer derive from PluginController,
MediaCanStartListener, LoadListener, or MediaProducer.
Removed most arguments to PluginView::create and the constructor,
added in the logic about whether to create a PDF view or not, so
it can now return nullptr. Moved isBeingDestroyed out of the header.
Removed the argument to manualLoadDidFail. Removed activityStateDidChange,
setLayerHostingMode, windowAndViewFramesChanged, initialParameters,
handlesPageScaleFactor, requiresUnifiedScaleFactor, shouldAllowScripting,
performURLRequest, performFrameLoadURLRequest, performJavaScriptURLRequest,
addStream, removeStream, cancelAllStreams, mediaCanStart, mediaState,
pageMutedStateDidChange, contentsScaleFactor, didInitializePlugin,
destroyPluginAndReset, didFinishLoad, didFailLoad, createWebEvent,
m_parameters, m_isWaitingUntilMediaCanStart, m_mainResourceURL,
m_mainResourceContentType, m_shouldUseManualLoader, m_pendingFrameLoads,
m_streams, m_manualStreamError, and m_pluginIsPlayingAudio.
Added pdfDocumentSizeForPrinting, mainResourceURL, lookupTextAtLocation,
rectForSelectionInRootView, contentScaleFactor, and m_stream.
Removed unused origin argument to setPageScaleFactor. Renamed
pendingURLRequestsTimerFired to pendingResourceRequestTimerFired,
m_pendingURLRequests to m_pendingResourceRequest,
m_pendingURLRequestsTimer to m_pendingResourceRequestTimer, and
loadURL to loadMainResource. Changed m_pluginElement and m_plugin
from RefPtr to Ref since neither can be null.

* Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp:
Removed most includes.
(WebKit::WebPluginInfoProvider::WebPluginInfoProvider): Deleted.
(WebKit::WebPluginInfoProvider::~WebPluginInfoProvider): Deleted.
(WebKit::pluginInfoVector): Added. Factors out common code.
(WebKit::WebPluginInfoProvider::pluginInfo): Removed everything
except the call to pluginInfoVector.
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo): Ditto.

* Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h:
Removed unnneded include and tweaked coding style a bit.

* Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
Added a missing FrameDestructionObserverInlines.h include.

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print): Call pdfDocumentSizeForPrinting
on the view, not the plug-in. Fixed the #if that was incorrectly
doing PLATFORM(COCOA) when it means ENABLE(PDFKIT_PLUGIN).

* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::hasPlugInView const): Added.
(WebKit::WebFrameLoaderClient::setMainDocumentError): Moved
plug-in-specific code inside ENABLE(PDFKIT_PLUGIN).
(WebKit::WebFrameLoaderClient::committedLoad): Call hasPlugInView
and moved plug-in-specific code inside ENABLE(PDFKIT_PLUGIN).
(WebKit::WebFrameLoaderClient::finishedLoading): Ditto.
(WebKit::WebFrameLoaderClient::createPlugin): Ditto. Also pass in
the arguments individually instead of a Parameters struct.
(WebKit::WebFrameLoaderClient::redirectDataToPlugin): Ditto.
(WebKit::WebFrameLoaderClient::allowScript): Always return false
for frames with plug-in views.

* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Added hasPlugInView. Moved m_pluginView and m_hasSentResponseToPluginView
inside ENABLE(PDFKIT_PLUGIN).

* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Put the plug-in
code inside ENABLE(PDFKIT_PLUGIN) and use mainFramePlugIn.
(WebKit::WebPage::getPDFFirstPageSize): Ditto. Also call the
pdfDocumentSizeForPrinting function on the plug-in view rather than
the plug-in. Also removed unneeded null check of WebCore frame before
calling pluginViewForFrame.

* Source/WebKit/WebProcess/WebPage/FindController.cpp: Added include
needed now that other headers don't pull in as many.
(WebKit::FindController::mainFramePlugIn): Added.
(WebKit::FindController::countStringMatches): Put code inside
(WebKit::FindController::updateFindUIAfterPageScroll): Ditto.
(WebKit::FindController::findString): Ditto.
(WebKit::FindController::hideFindUI): Ditto.

* Source/WebKit/WebProcess/WebPage/FindController.h: Added mainFramePlugIn.

* Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
Update since handlesPageScaleGesture is now a WebPage function rather than a
WebFrame function.
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture): Ditto.

* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handlesPageScaleGesture const): Deleted.
(WebKit::WebFrame::requiresUnifiedScaleFactor const): Deleted.
* Source/WebKit/WebProcess/WebPage/WebFrame.h: Updated for the above.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage): Put plug-in code inside #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::editorState const): Ditto.
(WebKit::WebPage::createPlugin): Deleted.
(WebKit::WebPage::pluginViewForFrame): Use dynamicDowncast.
(WebKit::WebPage::mainFramePlugIn): Added.
(WebKit::WebPage::executeEditingCommand): Put plug-in code inside
 #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::isEditingCommandEnabled): Ditto.
(WebKit::WebPage::textZoomFactor const): Updated since all plug-ins
use "unified scale factor" and all main-frame plug-ins "handle page scale factor".
(WebKit::WebPage::setTextZoomFactor): Ditto.
(WebKit::WebPage::pageZoomFactor const): Ditto.
(WebKit::WebPage::setPageZoomFactor): Ditto.
(WebKit::WebPage::setPageAndTextZoomFactors): Ditto.
(WebKit::WebPage::scalePage): Removed original argument to setPageScaleFactor
and put plug-in code inside #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::totalScaleFactor const): Updated since all main-frame
plug-ins "handle page scale factor" and put code in #if ENABLE.
(WebKit::WebPage::validateCommand): Put code in #if ENABLE.
(WebKit::WebPage::setTopContentInset): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto.
(WebKit::WebPage::mainFrameView const): Ditto.
(WebKit::WebPage::setActivityState): Removed call to PluginView::activityStateDidChange.
(WebKit::WebPage::setLayerHostingMode): Removed call to PluginView::setLayerHostingMode.
(WebKit::WebPage::addPluginView): Removed code to set m_hasSeenPlugin.
(WebKit::WebPage::windowAndViewFramesChanged): Removed call to
PluginView::windowAndViewFramesChanged.
(WebKit::WebPage::handlesPageScaleGesture const): Added. Returns true if
we have a main-frame plug-in.

* Source/WebKit/WebProcess/WebPage/WebPage.h: Removed include of Plugin.h,
createPlugin, and m_hasSeenPlugin. Changed argument to the
dictionaryPopupInfoForSelectionInPDFPlugin from PDFPlugin to PluginView.
Put all members that involve PluginView inside #if statements.
Added handlesPageScaleGesture and mainFramePlugIn functions.

(WebKit::WebPage::accessibilityObjectForMainFramePlugin): Just return nil
since we don't have any plug-ins in iOS at this time.

* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]): Removed call to
pluginHandlesContentOffsetForAccessibilityHitTest, and use mainFramePlugIn.

* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::accessibilityObjectForMainFramePlugin): Use mainFramePlugIn.
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Update since
the plug-in view function is named contentScaleFactor, not just scaleFactor
as the PDF plug-in functino was named.
(WebKit::WebPage::performImmediateActionHitTestAtLocation): Call
lookupTextAtLocation on the plug-in view, not the plug-in.

* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper associatedPluginParent]): Use dynamicDowncast,
and remove some other casts that are not needed any more.

* Source/WebCore/bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginScriptObject): Use dynamicDowncast and removed the plug-in
element argument to DOMTimer::scriptDidInteractWithPlugin.

* Source/WebCore/bindings/js/ScriptController.cpp: Removed include of
PluginViewBase.h.
(WebCore::ScriptController::createScriptInstanceForWidget): Always return
nullptr; this function is only used on platforms that do not support scripting
with widgets at all.

* Source/WebCore/html/HTMLObjectElement.cpp: Removed include of PluginViewBase.h.

* Source/WebCore/html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::pluginWidget const): Return PluginViewBase* instead
of Widget*.
(WebCore::HTMLPlugInElement::isKeyboardFocusable const): Return false.
(WebCore::HTMLPlugInElement::isUserObservable const): Deleted.
(WebCore::HTMLPlugInElement::isBelowSizeThreshold const): Deleted.
* Source/WebCore/html/HTMLPlugInElement.h: Updated for the above.

* Source/WebCore/html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed unneeded
type castss now that pluginWidget returns a PluginViewBase.

* Source/WebCore/html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget): Return PluginViewBase* instead
of Widget*.
* Source/WebCore/html/PluginDocument.h: Updated for the above.

* Source/WebCore/inspector/PageDebugger.cpp:
(WebCore::PageDebugger::setJavaScriptPaused): Removed calls to plug-in views.

* Source/WebCore/loader/FrameLoaderClient.h: Removed forward
declaration of PluginViewBase.

* Source/WebCore/page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidInteractWithPlugin): Removed the plug-in
element argument, because all were always returning true for isUserObservable.
* Source/WebCore/page/DOMTimer.h: Updated for the above.

* Source/WebCore/page/DragController.cpp:
(WebCore::DragController::operationForLoad): Removed unneeded dynamicDowncast.

* Source/WebCore/page/Page.cpp:
(WebCore::Page::pluginViews): Deleted.
(WebCore::Page::storageBlockingStateChanged): Removed calls to plug-in views.
* Source/WebCore/page/Page.h: Updated for the above.

* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::isPDFPlugin const): Deleted.

* Source/WebCore/platform/Widget.h:
(WebCore::Widget::isPluginView const): Deleted.

* Source/WebCore/plugins/PluginViewBase.h: Removed storageBlockingStateChanged,
supportsKeyboardFocus, audioHardwareActivity, setJavaScriptPaused,
and bindingInstance. Made isPluginViewBase private and final.

* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::pluginIsBelowSizeThreshold): Deleted.
* Source/WebCore/testing/Internals.cpp: Updated for the above.
* Source/WebCore/testing/Internals.idl: Ditto. No test was using this.

Canonical link: https://commits.webkit.org/250781@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@darinadler darinadler self-assigned this May 18, 2022
@darinadler darinadler added Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 18, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 18, 2022
@darinadler darinadler removed merging-blocked Applied to prevent a change from being merged Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@darinadler darinadler force-pushed the eng/Remove-a-first-bit-of-unused-plug-in-code branch from 0f01e97 to 51fd535 Compare May 19, 2022 03:00
@darinadler darinadler added Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 19, 2022
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice.

@cdumez
Copy link
Contributor

cdumez commented May 19, 2022

Watch out for iOS / watchOS build failures though.

@darinadler
Copy link
Member Author

Watch out for iOS / watchOS build failures though.

Yes, looks like non-Mac platforms are failing to build, need some fixes to deal with that.

@darinadler darinadler removed merging-blocked Applied to prevent a change from being merged Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@darinadler darinadler force-pushed the eng/Remove-a-first-bit-of-unused-plug-in-code branch from 51fd535 to 27a2511 Compare May 19, 2022 04:17
@darinadler darinadler added Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 19, 2022
@darinadler darinadler removed merging-blocked Applied to prevent a change from being merged Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@darinadler darinadler force-pushed the eng/Remove-a-first-bit-of-unused-plug-in-code branch from 27a2511 to 7200b74 Compare May 19, 2022 14:07
@darinadler darinadler added Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 19, 2022
@darinadler darinadler removed merging-blocked Applied to prevent a change from being merged Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build labels May 19, 2022
@darinadler darinadler force-pushed the eng/Remove-a-first-bit-of-unused-plug-in-code branch from 7200b74 to 998dbef Compare May 19, 2022 14:42
@darinadler darinadler added Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.). WebKit Nightly Build merge-queue Applied to send a pull request to merge-queue labels May 19, 2022
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Remove-a-first-bit-of-unused-plug-in-code branch from 998dbef to 834b53d Compare May 20, 2022 03:39
@webkit-early-warning-system webkit-early-warning-system merged commit 834b53d into WebKit:main May 20, 2022
@webkit-early-warning-system
Copy link
Collaborator

Committed r294526 (250781@main): https://commits.webkit.org/250781@main

Reviewed commits have been landed. Closing PR #752 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system removed the merge-queue Applied to send a pull request to merge-queue label May 20, 2022
@darinadler darinadler deleted the eng/Remove-a-first-bit-of-unused-plug-in-code branch July 10, 2022 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plug-ins For bugs in plug-ins other than Java (e.g., Flash, Quicktime, etc.).
Projects
None yet
3 participants