Skip to content

Commit

Permalink
Fix some unified sources issues, mainly in PDF code
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=273983
rdar://127848229

Reviewed by Wenson Hsieh and Aditya Keerthi.

Fix some missing WebCore:: prefixes in PDFDataDetectorOverlayController.h and
remove some `using namespace WebCore` from headers.

* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h:
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.mm:

Canonical link: https://commits.webkit.org/278598@main
  • Loading branch information
smfr committed May 10, 2024
1 parent 7208a15 commit 8648d79
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ OBJC_CLASS WKLinearMediaPlayerDelegate;

namespace WebKit {

using namespace WebCore;

class PlaybackSessionInterfaceLMK final : public PlaybackSessionInterfaceIOS {
WTF_MAKE_FAST_ALLOCATED;
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(PlaybackSessionInterfaceLMK);
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class PlaybackSessionInterfaceIOS;

namespace WebKit {

using namespace WebCore;

class VideoPresentationInterfaceLMK final : public VideoPresentationInterfaceIOS {
WTF_MAKE_FAST_ALLOCATED;
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(VideoPresentationInterfaceLMK);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ class PDFDataDetectorItem;
class UnifiedPDFPlugin;
class WebMouseEvent;

class PDFDataDetectorOverlayController final : private PageOverlayClient, WebCore::DataDetectorHighlightClient {
class PDFDataDetectorOverlayController final : private WebCore::PageOverlayClient, WebCore::DataDetectorHighlightClient {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(PDFDataDetectorOverlayController);
public:
explicit PDFDataDetectorOverlayController(UnifiedPDFPlugin&);
virtual ~PDFDataDetectorOverlayController() = default;
virtual ~PDFDataDetectorOverlayController();
void teardown();

bool handleMouseEvent(const WebMouseEvent&, PDFDocumentLayout::PageIndex);
RefPtr<PageOverlay> protectedOverlay() const { return m_overlay; }
RefPtr<WebCore::PageOverlay> protectedOverlay() const { return m_overlay; }

enum class ShouldUpdatePlatformHighlightData : bool { No, Yes };
enum class ActiveHighlightChanged : bool { No, Yes };
void didInvalidateHighlightOverlayRects(std::optional<PDFDocumentLayout::PageIndex> = { }, ShouldUpdatePlatformHighlightData = ShouldUpdatePlatformHighlightData::Yes, ActiveHighlightChanged = ActiveHighlightChanged::No);

private:
// PageOverlayClient
void willMoveToPage(WebCore::PageOverlay&, Page*) final;
void didMoveToPage(WebCore::PageOverlay&, Page*) final { }
void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) final;
void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) final { }
void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect&) final { }
bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) final { return false; }
void didScrollFrame(WebCore::PageOverlay&, WebCore::LocalFrame&) final { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
{
}

PDFDataDetectorOverlayController::~PDFDataDetectorOverlayController() = default;

RefPtr<UnifiedPDFPlugin> PDFDataDetectorOverlayController::protectedPlugin() const
{
return m_plugin.get();
Expand Down

0 comments on commit 8648d79

Please sign in to comment.