Title: [287247] trunk/Source
Revision
287247
Author
[email protected]
Date
2021-12-19 12:43:24 -0800 (Sun, 19 Dec 2021)

Log Message

Add client layer plumbing for classifying modal container controls
https://bugs.webkit.org/show_bug.cgi?id=234320

Reviewed by Dean Jackson.

Source/WebCore:

Add a chrome client method to asynchronously classify text inside modal container controls as one of { Neutral,
Positive, Negative or Other }. While currently unimplemented, the next patch will add support for a singleton
ModalContainerControlClassifier in WebKit2, and use it to implement this client hook.

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::classifyModalContainerControls):
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/ModalContainerControlType.h: Added.

Source/WebKit:

See WebCore/ChangeLog for more details.

* Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::classifyModalContainerControls):

Add a method stub with a comment for now. The next patch in the sequence will implement this method hook on
Cocoa platforms.

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::requestCookieConsent):

Drive-by fix: remove an unnecessary WebCore:: prefix.

(WebKit::WebChromeClient::classifyModalContainerControls):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more details.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::classifyModalContainerControls):

Source/WebKitLegacy/win:

See WebCore/ChangeLog for more details.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::classifyModalContainerControls):
* WebCoreSupport/WebChromeClient.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287246 => 287247)


--- trunk/Source/WebCore/ChangeLog	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/ChangeLog	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1,5 +1,24 @@
 2021-12-19  Wenson Hsieh  <[email protected]>
 
+        Add client layer plumbing for classifying modal container controls
+        https://bugs.webkit.org/show_bug.cgi?id=234320
+
+        Reviewed by Dean Jackson.
+
+        Add a chrome client method to asynchronously classify text inside modal container controls as one of { Neutral,
+        Positive, Negative or Other }. While currently unimplemented, the next patch will add support for a singleton
+        ModalContainerControlClassifier in WebKit2, and use it to implement this client hook.
+
+        * Headers.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/EmptyClients.cpp:
+        (WebCore::EmptyChromeClient::classifyModalContainerControls):
+        * loader/EmptyClients.h:
+        * page/ChromeClient.h:
+        * page/ModalContainerControlType.h: Added.
+
+2021-12-19  Wenson Hsieh  <[email protected]>
+
         Add a basic heuristic for collecting and extracting text from controls in ModalContainerObserver
         https://bugs.webkit.org/show_bug.cgi?id=234299
 

Modified: trunk/Source/WebCore/Headers.cmake (287246 => 287247)


--- trunk/Source/WebCore/Headers.cmake	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/Headers.cmake	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1109,6 +1109,7 @@
     page/MediaControlsContextMenuItem.h
     page/MediaProducer.h
     page/MemoryRelease.h
+    page/ModalContainerControlType.h
     page/NavigatorIsLoggedIn.h
     page/PDFImageCachingPolicy.h
     page/Page.h

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (287246 => 287247)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-12-19 20:43:24 UTC (rev 287247)
@@ -5501,6 +5501,7 @@
 		F48D2A6C215623B400C6752B /* FontShadow.h in Headers */ = {isa = PBXBuildFile; fileRef = F48D2A6A215623B400C6752B /* FontShadow.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F48D2A7E2157182600C6752B /* FontAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = F48D2A712156DC0A00C6752B /* FontAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F48D2AA52159740D00C6752B /* ColorCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = F48D2AA32159740D00C6752B /* ColorCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		F49328832769041B003E20F8 /* ModalContainerControlType.h in Headers */ = {isa = PBXBuildFile; fileRef = F49328822769041B003E20F8 /* ModalContainerControlType.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F49786881FF45FA500E060AB /* PasteboardItemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = F49786871FF45FA500E060AB /* PasteboardItemInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F4B0018926E7F21F006EAABE /* HTMLAtomStringCache.h in Headers */ = {isa = PBXBuildFile; fileRef = F4B0018726E7F21F006EAABE /* HTMLAtomStringCache.h */; };
 		F4B2A909265030BA009E7286 /* DataDetectorHighlight.h in Headers */ = {isa = PBXBuildFile; fileRef = F4B2A90626502BA0009E7286 /* DataDetectorHighlight.h */; };
@@ -17714,6 +17715,7 @@
 		F48D2A7A2157051E00C6752B /* FontShadowCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FontShadowCocoa.mm; sourceTree = "<group>"; };
 		F48D2AA32159740D00C6752B /* ColorCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ColorCocoa.h; sourceTree = "<group>"; };
 		F48D2AA42159740D00C6752B /* ColorCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorCocoa.mm; sourceTree = "<group>"; };
+		F49328822769041B003E20F8 /* ModalContainerControlType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ModalContainerControlType.h; sourceTree = "<group>"; };
 		F49786871FF45FA500E060AB /* PasteboardItemInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PasteboardItemInfo.h; sourceTree = "<group>"; };
 		F49E98E421DEE6C1009AE55E /* EditAction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = EditAction.cpp; sourceTree = "<group>"; };
 		F4B0018726E7F21F006EAABE /* HTMLAtomStringCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLAtomStringCache.h; sourceTree = "<group>"; };
@@ -23950,6 +23952,7 @@
 				52E2CAFB19FF0207001EEB4F /* MediaProducer.h */,
 				413E00771DB0E4DE002341D2 /* MemoryRelease.cpp */,
 				413E00781DB0E4DE002341D2 /* MemoryRelease.h */,
+				F49328822769041B003E20F8 /* ModalContainerControlType.h */,
 				A10F7C7127310073008FA9AF /* ModalContainerObserver.cpp */,
 				A10F7C7027310073008FA9AF /* ModalContainerObserver.h */,
 				93EB355E09E37FD600F43799 /* MouseEventWithHitTestResults.cpp */,
@@ -36097,6 +36100,7 @@
 				CDF2B0171820540700F2B424 /* MockSourceBufferPrivate.h in Headers */,
 				CDF2B0191820540700F2B424 /* MockTracks.h in Headers */,
 				5715610C234C1CA1008FC7AB /* MockWebAuthenticationConfiguration.h in Headers */,
+				F49328832769041B003E20F8 /* ModalContainerControlType.h in Headers */,
 				A10F7C73273100D0008FA9AF /* ModalContainerObserver.h in Headers */,
 				2DC8D39825F2FE9700CFCBAB /* Model.h in Headers */,
 				313E79EA273C86B80097F905 /* ModelDocument.h in Headers */,

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (287246 => 287247)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2021-12-19 20:43:24 UTC (rev 287247)
@@ -63,6 +63,7 @@
 #include "LibWebRTCProvider.h"
 #include "MediaRecorderPrivate.h"
 #include "MediaRecorderProvider.h"
+#include "ModalContainerControlType.h"
 #include "NetworkStorageSession.h"
 #include "Page.h"
 #include "PageConfiguration.h"
@@ -590,6 +591,11 @@
     completion(CookieConsentDecisionResult::NotSupported);
 }
 
+void EmptyChromeClient::classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&& completion)
+{
+    completion({ });
+}
+
 void EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, FormState*, const String&, PolicyCheckIdentifier, FramePolicyFunction&&)
 {
 }

Modified: trunk/Source/WebCore/loader/EmptyClients.h (287246 => 287247)


--- trunk/Source/WebCore/loader/EmptyClients.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/loader/EmptyClients.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -220,6 +220,7 @@
     RefPtr<Icon> createIconForFiles(const Vector<String>& /* filenames */) final { return nullptr; }
 
     void requestCookieConsent(CompletionHandler<void(CookieConsentDecisionResult)>&&) final;
+    void classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&&) final;
 };
 
 DiagnosticLoggingClient& emptyDiagnosticLoggingClient();

Modified: trunk/Source/WebCore/page/ChromeClient.h (287246 => 287247)


--- trunk/Source/WebCore/page/ChromeClient.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebCore/page/ChromeClient.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -143,6 +143,7 @@
 struct WindowFeatures;
 
 enum class CookieConsentDecisionResult : uint8_t;
+enum class ModalContainerControlType : uint8_t;
 enum class RouteSharingPolicy : uint8_t;
 
 class ChromeClient {
@@ -624,6 +625,7 @@
     virtual void requestCookieConsent(CompletionHandler<void(CookieConsentDecisionResult)>&&) = 0;
 
     virtual const AtomString& searchStringForModalContainerObserver() const { return nullAtom(); }
+    virtual void classifyModalContainerControls(Vector<String>&& texts, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&&) = 0;
 
 protected:
     virtual ~ChromeClient() = default;

Added: trunk/Source/WebCore/page/ModalContainerControlType.h (0 => 287247)


--- trunk/Source/WebCore/page/ModalContainerControlType.h	                        (rev 0)
+++ trunk/Source/WebCore/page/ModalContainerControlType.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/EnumTraits.h>
+
+namespace WebCore {
+
+enum class ModalContainerControlType : uint8_t {
+    Neutral,
+    Positive,
+    Negative,
+    Other,
+};
+
+} // namespace WebCore
+
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::ModalContainerControlType> {
+    using values = EnumValues<
+        WebCore::ModalContainerControlType,
+        WebCore::ModalContainerControlType::Neutral,
+        WebCore::ModalContainerControlType::Positive,
+        WebCore::ModalContainerControlType::Negative,
+        WebCore::ModalContainerControlType::Other
+    >;
+};
+
+} // namespace WTF

Modified: trunk/Source/WebKit/ChangeLog (287246 => 287247)


--- trunk/Source/WebKit/ChangeLog	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/ChangeLog	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1,3 +1,30 @@
+2021-12-19  Wenson Hsieh  <[email protected]>
+
+        Add client layer plumbing for classifying modal container controls
+        https://bugs.webkit.org/show_bug.cgi?id=234320
+
+        Reviewed by Dean Jackson.
+
+        See WebCore/ChangeLog for more details.
+
+        * Scripts/webkit/messages.py:
+        (types_that_cannot_be_forward_declared):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::classifyModalContainerControls):
+
+        Add a method stub with a comment for now. The next patch in the sequence will implement this method hook on
+        Cocoa platforms.
+
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::requestCookieConsent):
+
+        Drive-by fix: remove an unnecessary WebCore:: prefix.
+
+        (WebKit::WebChromeClient::classifyModalContainerControls):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2021-12-18  Darin Adler  <[email protected]>
 
         Hash tables, read/write, and heap memory are used unnecessarily, which may hurt performance

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (287246 => 287247)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2021-12-19 20:43:24 UTC (rev 287247)
@@ -291,6 +291,7 @@
         'WebCore::MediaKeySystemRequestIdentifier',
         'WebCore::MediaPlayerIdentifier',
         'WebCore::MediaSessionIdentifier',
+        'WebCore::ModalContainerControlType',
         'WebCore::NativeImageReference',
         'WebCore::PageIdentifier',
         'WebCore::PlaybackTargetClientContextIdentifier',

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (287246 => 287247)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-19 20:43:24 UTC (rev 287247)
@@ -169,6 +169,7 @@
 #include <WebCore/LengthBox.h>
 #include <WebCore/MIMETypeRegistry.h>
 #include <WebCore/MediaStreamRequest.h>
+#include <WebCore/ModalContainerControlType.h>
 #include <WebCore/PerformanceLoggingClient.h>
 #include <WebCore/PermissionState.h>
 #include <WebCore/PlatformEvent.h>
@@ -11051,6 +11052,13 @@
     m_uiClient->requestCookieConsent(WTFMove(completion));
 }
 
+void WebPageProxy::classifyModalContainerControls(Vector<String>&& texts, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&& completion)
+{
+    // FIXME: Not implemented yet.
+    UNUSED_PARAM(texts);
+    completion({ });
+}
+
 } // namespace WebKit
 
 #undef WEBPAGEPROXY_RELEASE_LOG

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (287246 => 287247)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -274,6 +274,7 @@
 enum class HasInsecureContent : bool;
 enum class HighlightRequestOriginatedInApp : bool;
 enum class HighlightVisibility : bool;
+enum class ModalContainerControlType : uint8_t;
 enum class MouseEventPolicy : uint8_t;
 enum class NotificationDirection : uint8_t;
 enum class RouteSharingPolicy : uint8_t;
@@ -2036,6 +2037,7 @@
     void didDestroyNotification(uint64_t notificationID);
 
     void requestCookieConsent(CompletionHandler<void(WebCore::CookieConsentDecisionResult)>&&);
+    void classifyModalContainerControls(Vector<String>&& texts, CompletionHandler<void(Vector<WebCore::ModalContainerControlType>&&)>&&);
 
 private:
     WebPageProxy(PageClient&, WebProcessProxy&, Ref<API::PageConfiguration>&&);

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (287246 => 287247)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2021-12-19 20:43:24 UTC (rev 287247)
@@ -615,4 +615,5 @@
 #endif
 
     RequestCookieConsent() -> (enum:uint8_t WebCore::CookieConsentDecisionResult result) Async
+    ClassifyModalContainerControls(Vector<String> texts) -> (Vector<WebCore::ModalContainerControlType> types) Async
 }

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (287246 => 287247)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1563,11 +1563,16 @@
 
 #endif // ENABLE(APPLE_PAY_AMS_UI)
 
-void WebChromeClient::requestCookieConsent(CompletionHandler<void(WebCore::CookieConsentDecisionResult)>&& completion)
+void WebChromeClient::requestCookieConsent(CompletionHandler<void(CookieConsentDecisionResult)>&& completion)
 {
     m_page.sendWithAsyncReply(Messages::WebPageProxy::RequestCookieConsent(), WTFMove(completion));
 }
 
+void WebChromeClient::classifyModalContainerControls(Vector<String>&& strings, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&& completion)
+{
+    m_page.sendWithAsyncReply(Messages::WebPageProxy::ClassifyModalContainerControls(WTFMove(strings)), WTFMove(completion));
+}
+
 #if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebChromeClientAdditions.cpp>
 #else

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (287246 => 287247)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -466,6 +466,8 @@
 
     void requestCookieConsent(CompletionHandler<void(WebCore::CookieConsentDecisionResult)>&&) final;
 
+    void classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<WebCore::ModalContainerControlType>&&)>&&) final;
+
     const AtomString& searchStringForModalContainerObserver() const final;
 
     mutable bool m_cachedMainFrameHasHorizontalScrollbar { false };

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (287246 => 287247)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1,3 +1,16 @@
+2021-12-19  Wenson Hsieh  <[email protected]>
+
+        Add client layer plumbing for classifying modal container controls
+        https://bugs.webkit.org/show_bug.cgi?id=234320
+
+        Reviewed by Dean Jackson.
+
+        See WebCore/ChangeLog for more details.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::classifyModalContainerControls):
+
 2021-12-17  Simon Fraser  <[email protected]>
 
         Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h (287246 => 287247)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -259,6 +259,8 @@
 
     void requestCookieConsent(CompletionHandler<void(WebCore::CookieConsentDecisionResult)>&&) final;
 
+    void classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<WebCore::ModalContainerControlType>&&)>&&) final;
+
 #if ENABLE(VIDEO_PRESENTATION_MODE)
     bool m_mockVideoPresentationModeEnabled { false };
 #endif

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (287246 => 287247)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2021-12-19 20:43:24 UTC (rev 287247)
@@ -78,6 +78,7 @@
 #import <WebCore/Icon.h>
 #import <WebCore/IntPoint.h>
 #import <WebCore/IntRect.h>
+#import <WebCore/ModalContainerControlType.h>
 #import <WebCore/NavigationAction.h>
 #import <WebCore/NotImplemented.h>
 #import <WebCore/Page.h>
@@ -1172,3 +1173,8 @@
 {
     completion(CookieConsentDecisionResult::NotSupported);
 }
+
+void WebChromeClient::classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&& completion)
+{
+    completion({ });
+}

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (287246 => 287247)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2021-12-19 20:43:24 UTC (rev 287247)
@@ -1,3 +1,16 @@
+2021-12-19  Wenson Hsieh  <[email protected]>
+
+        Add client layer plumbing for classifying modal container controls
+        https://bugs.webkit.org/show_bug.cgi?id=234320
+
+        Reviewed by Dean Jackson.
+
+        See WebCore/ChangeLog for more details.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::classifyModalContainerControls):
+        * WebCoreSupport/WebChromeClient.h:
+
 2021-12-18  Chris Dumez  <[email protected]>
 
         Convert ProtectionSpace enums into enum classes

Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.cpp (287246 => 287247)


--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.cpp	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.cpp	2021-12-19 20:43:24 UTC (rev 287247)
@@ -53,6 +53,7 @@
 #include <WebCore/Icon.h>
 #include <WebCore/LocalWindowsContext.h>
 #include <WebCore/LocalizedStrings.h>
+#include <WebCore/ModalContainerControlType.h>
 #include <WebCore/NavigationAction.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/Page.h>
@@ -881,3 +882,8 @@
 {
     completion(CookieConsentDecisionResult::NotSupported);
 }
+
+void WebChromeClient::classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<ModalContainerControlType>&&)>&& completion)
+{
+    completion({ });
+}

Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h (287246 => 287247)


--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h	2021-12-19 20:34:07 UTC (rev 287246)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h	2021-12-19 20:43:24 UTC (rev 287247)
@@ -185,6 +185,8 @@
 
     void requestCookieConsent(CompletionHandler<void(WebCore::CookieConsentDecisionResult)>&&);
 
+    void classifyModalContainerControls(Vector<String>&&, CompletionHandler<void(Vector<WebCore::ModalContainerControlType>&&)>&&) final;
+
 private:
     COMPtr<IWebUIDelegate> uiDelegate();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to