[webkit-changes] [WebKit/WebKit] b4ec9b: [UnifiedPDF] Revert back to the fixed-size plugin

Simon Fraser noreply at github.com
Sat Oct 7 14:51:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4ec9b506ed23138c3b7dc1afad8767fc1ef0074
      https://github.com/WebKit/WebKit/commit/b4ec9b506ed23138c3b7dc1afad8767fc1ef0074
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-10-07 (Sat, 07 Oct 2023)

  Changed paths:
    M Source/WebCore/html/PluginDocument.cpp
    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

  Log Message:
  -----------
  [UnifiedPDF] Revert back to the fixed-size plugin
https://bugs.webkit.org/show_bug.cgi?id=262831
rdar://116609170

Reviewed by Tim Horton and Chris Dumez.

Undo some of 268697 at main so that the UnifiedPDFPlugin once again is a fixed size; in future, it will
scroll internally as the PDFPlugin does.

So simplify the style in `PluginDocumentParser::createStyleElement()` to have the html, body and
embed all be width and height 100%, and make the document non-scrollable. Remove
`pluginFillsViewport()`. Resize the layers when we get `geometryDidChange()`.

Also ensure that the layer tree is updated when the plugin loads the PDF via a call to
`invalidateStyleAndLayerComposition()` in `PluginView::manualLoadDidFinishLoading()`.

Fix a spelling error in "udpateLayerHierarchy".

* Source/WebCore/html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createStyleElement):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
(WebKit::PDFPluginBase::pluginFillsViewport const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::installPDFDocument):
(WebKit::UnifiedPDFPlugin::updateLayerHierarchy):
(WebKit::UnifiedPDFPlugin::deviceScaleFactor const):
(WebKit::UnifiedPDFPlugin::geometryDidChange):
(WebKit::UnifiedPDFPlugin::sizeToFitContents): Deleted.
(WebKit::UnifiedPDFPlugin::udpateLayerHierarchy): Deleted.
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
(WebKit::PluginView::manualLoadDidFinishLoading):
(WebKit::PluginView::updateDocumentForPluginSizingBehavior): Deleted.

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




More information about the webkit-changes mailing list