WebKit Bugzilla
Attachment 349766 Details for
Bug 189621
: It should be possible to get the mouse event modifiers from an injected bundle.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189621-20180914093019.patch (text/plain), 4.29 KB, created by
Per Arne Vollan
on 2018-09-14 09:30:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-09-14 09:30:20 PDT
Size:
4.29 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 236006) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-09-14 Per Arne Vollan <pvollan@apple.com> >+ >+ It should be possible to get the mouse event modifiers for a page overlay client. >+ https://bugs.webkit.org/show_bug.cgi?id=189621 >+ <rdar://problem/44437279> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add the function WKBundlePageOverlayGetModifiersForLastEvent to the C API. >+ >+ * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: >+ (PageOverlayClientImpl::modifiers const): >+ (WKBundlePageOverlayGetModifiersForLastEvent): >+ * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: >+ > 2018-09-14 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Make script dialogs modal to the current web view only >Index: Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (revision 235868) >+++ Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (working copy) >@@ -39,6 +39,7 @@ > #include "WebPageOverlay.h" > #include <WebCore/GraphicsContext.h> > #include <WebCore/PageOverlay.h> >+#include <WebCore/PlatformEvent.h> > #include <WebCore/PlatformMouseEvent.h> > > namespace API { >@@ -68,6 +69,22 @@ public: > m_accessibilityClient.initialize(client); > } > >+ unsigned modifiers() const >+ { >+ WKEventModifiers wkModifiers = 0; >+ if (m_modifiers & PlatformEvent::Modifier::ShiftKey) >+ wkModifiers |= kWKEventModifiersShiftKey; >+ if (m_modifiers & PlatformEvent::Modifier::CtrlKey) >+ wkModifiers |= kWKEventModifiersControlKey; >+ if (m_modifiers & PlatformEvent::Modifier::AltKey) >+ wkModifiers |= kWKEventModifiersAltKey; >+ if (m_modifiers & PlatformEvent::Modifier::MetaKey) >+ wkModifiers |= kWKEventModifiersMetaKey; >+ if (m_modifiers & PlatformEvent::Modifier::CapsLockKey) >+ wkModifiers |= kWKEventModifiersCapsLockKey; >+ return wkModifiers; >+ } >+ > private: > // WebPageOverlay::Client. > void willMoveToPage(WebPageOverlay& pageOverlay, WebPage* page) override >@@ -96,6 +113,8 @@ private: > > bool mouseEvent(WebPageOverlay& pageOverlay, const PlatformMouseEvent& event) override > { >+ m_modifiers = event.modifiers(); >+ > switch (event.type()) { > case PlatformMouseEvent::Type::MousePressed: { > if (!m_client.mouseDown) >@@ -210,6 +229,7 @@ private: > } > > API::Client<WKBundlePageOverlayAccessibilityClientBase> m_accessibilityClient; >+ OptionSet<PlatformEvent::Modifier> m_modifiers; > }; > > WKTypeID WKBundlePageOverlayGetTypeID() >@@ -246,3 +266,8 @@ void WKBundlePageOverlayClear(WKBundlePa > { > toImpl(bundlePageOverlayRef)->clear(); > } >+ >+WKEventModifiers WKBundlePageOverlayGetModifiersForLastEvent(WKBundlePageOverlayRef bundlePageOverlayRef) >+{ >+ return static_cast<PageOverlayClientImpl&>(toImpl(bundlePageOverlayRef)->client()).modifiers(); >+} >Index: Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h (revision 235868) >+++ Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h (working copy) >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * Copyright (C) 2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -111,7 +111,8 @@ WK_EXPORT void WKBundlePageOverlaySetNee > WK_EXPORT float WKBundlePageOverlayFractionFadedIn(WKBundlePageOverlayRef bundlePageOverlay); > WK_EXPORT void WKBundlePageOverlaySetAccessibilityClient(WKBundlePageOverlayRef bundlePageOverlay, WKBundlePageOverlayAccessibilityClientBase* client); > WK_EXPORT void WKBundlePageOverlayClear(WKBundlePageOverlayRef bundlePageOverlay); >- >+WK_EXPORT WKEventModifiers WKBundlePageOverlayGetModifiersForLastEvent(WKBundlePageOverlayRef bundlePageOverlay); >+ > #ifdef __cplusplus > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189621
:
349766
|
350029
|
358441
|
362309