[webkit-reviews] review granted: [Bug 119437] Remove SimplePDFPlugin : [Attachment 207996] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 2 10:06:46 PDT 2013


Alexey Proskuryakov <ap at webkit.org> has granted Tim Horton
<thorton at apple.com>'s request for review:
Bug 119437: Remove SimplePDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=119437

Attachment 207996: patch
https://bugs.webkit.org/attachment.cgi?id=207996&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=207996&action=review


It's sad how huge the class has become. Does it have any responsibilities that
can be logically separated?

> Source/WebKit2/UIProcess/WebProcessProxy.cpp:51
> +#if PLATFORM(MAC) && ENABLE(PDFKIT_PLUGIN)
>  #include "PDFPlugin.h"

I think that at least the ENABLE check should be in the header. It's so ugly
and fragile to have ifdefs around every include site.

Also, I don't understand why we need a PLATFORM check. ENABLE should only be
enabled on appropriate platforms.

> Source/WebKit2/UIProcess/WebProcessProxy.cpp:318
> +#if PLATFORM(MAC) && ENABLE(PDFKIT_PLUGIN)

Same concern about ENABLE.

> Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h:66
> +class PDFPlugin FINAL : public Plugin, protected WebCore::ScrollableArea {

Protected base class doesn't make sense in a FINAL class. It should just be
private (and clang should have a warning).

> Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h:157
> +    // In-process PDFViews don't support asynchronous initialization.
> +    virtual bool isBeingAsynchronouslyInitialized() const OVERRIDE { return
false; }

Not sure what this comment means.

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:166
>  #if PLATFORM(MAC)
> -#include "SimplePDFPlugin.h"
>  #if ENABLE(PDFKIT_PLUGIN)

Same concerns about ifdefs.

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:570
> -#if PLATFORM(MAC)
> +#if PLATFORM(MAC) && ENABLE(PDFKIT_PLUGIN)

Ditto.


More information about the webkit-reviews mailing list