Changeset 295290 in webkit
- Timestamp:
- Jun 6, 2022, 10:36:12 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
- 1 copied
-
Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h (modified) (1 diff)
-
Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm (modified) (1 diff)
-
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (modified) (5 diffs)
-
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebView/WebHTMLViewForTestingMac.h (copied) (copied from trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h ) (2 diffs)
-
Tools/DumpRenderTree/TestRunner.cpp (modified) (2 diffs)
-
Tools/DumpRenderTree/TestRunner.h (modified) (1 diff)
-
Tools/DumpRenderTree/mac/Configurations/Base.xcconfig (modified) (1 diff)
-
Tools/DumpRenderTree/mac/TestRunnerMac.mm (modified) (2 diffs)
-
Tools/WebKitTestRunner/PlatformWebView.h (modified) (2 diffs)
-
Tools/WebKitTestRunner/TestInvocation.cpp (modified) (1 diff)
-
Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp (modified) (1 diff)
-
Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (modified) (1 diff)
-
Tools/WebKitTestRunner/libwpe/PlatformWebViewLibWPE.cpp (modified) (1 diff)
-
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (modified) (2 diffs)
-
Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h
r294285 r295290 56 56 - (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler; 57 57 58 @property (nonatomic, readonly) BOOL _secureEventInputEnabledForTesting; 59 58 60 @end 59 61 -
trunk/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm
r294285 r295290 134 134 } 135 135 136 - (BOOL)_secureEventInputEnabledForTesting 137 { 138 return _impl->inSecureInputState(); 139 } 140 136 141 @end 137 142 -
trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
r292959 r295290 4 4 classes = { 5 5 }; 6 objectVersion = 5 1;6 objectVersion = 52; 7 7 objects = { 8 8 … … 670 670 ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */; }; 671 671 ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 672 F439B1A1284D8C39003DE041 /* WebHTMLViewForTestingMac.h in Headers */ = {isa = PBXBuildFile; fileRef = F439B1A0284D8C39003DE041 /* WebHTMLViewForTestingMac.h */; }; 672 673 F4C98E5D1DD6476F0012FDEC /* DOMHTMLElementPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F4C98E5C1DD6476F0012FDEC /* DOMHTMLElementPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 673 674 F4F665C21DD67672007714B4 /* WebAutocapitalizeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F4F665C11DD67672007714B4 /* WebAutocapitalizeTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1531 1532 EDD1A5C705C83987008E3150 /* WebNSPrintOperationExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSPrintOperationExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 1532 1533 EDE850CD06ECC79E005FAB05 /* WebPreferenceKeysPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferenceKeysPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 1534 F439B1A0284D8C39003DE041 /* WebHTMLViewForTestingMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebHTMLViewForTestingMac.h; sourceTree = "<group>"; }; 1533 1535 F4C98E5C1DD6476F0012FDEC /* DOMHTMLElementPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLElementPrivate.h; sourceTree = "<group>"; }; 1534 1536 F4F665C11DD67672007714B4 /* WebAutocapitalizeTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutocapitalizeTypes.h; sourceTree = "<group>"; }; … … 2205 2207 35081D9402B6D4D80ACA2ACA /* WebHTMLView.h */, 2206 2208 35081D9502B6D4D80ACA2ACA /* WebHTMLView.mm */, 2209 F439B1A0284D8C39003DE041 /* WebHTMLViewForTestingMac.h */, 2207 2210 93185DB506679F42005D5E7E /* WebHTMLViewInternal.h */, 2208 2211 35081D9602B6D4D80ACA2ACA /* WebHTMLViewPrivate.h */, … … 3025 3028 939810560824BF01008DF038 /* WebHTMLRepresentationPrivate.h in Headers */, 3026 3029 939810570824BF01008DF038 /* WebHTMLView.h in Headers */, 3030 F439B1A1284D8C39003DE041 /* WebHTMLViewForTestingMac.h in Headers */, 3027 3031 939810A10824BF01008DF038 /* WebHTMLViewInternal.h in Headers */, 3028 3032 939810580824BF01008DF038 /* WebHTMLViewPrivate.h in Headers */, -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
r295270 r295290 7104 7104 @end 7105 7105 7106 #if PLATFORM(MAC) 7107 7108 @implementation WebHTMLView (TestingSupportMac) 7109 7110 - (BOOL)_secureEventInputEnabledForTesting 7111 { 7112 return _private->isInSecureInputState; 7113 } 7114 7115 @end 7116 7117 #endif // PLATFORM(MAC) 7118 7106 7119 // This is used by AppKit/TextKit. It should be possible to remove this once 7107 7120 // -[NSAttributedString _documentFromRange:document:documentAttributes:subresources:] is removed. -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewForTestingMac.h
r295289 r295290 1 1 /* 2 * Copyright (C) 20 14-2019Apple Inc. All rights reserved.2 * Copyright (C) 2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit/WKBase.h> 27 #import <WebKit/WKWebView.h> 26 #pragma once 28 27 29 #if !TARGET_OS_IPHONE28 #if PLATFORM(MAC) 30 29 31 @class _WKFrameHandle; 30 #import <WebKit/WebHTMLView.h> 32 31 33 @interface WKWebView (WKTestingMac) 34 35 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager; 36 @property (nonatomic, readonly) BOOL _shouldRequestCandidates; 37 @property (nonatomic, readonly) NSMenu *_activeMenu; 38 39 - (void)_requestControlledElementID; 40 - (void)_handleControlledElementIDResponse:(NSString *)identifier; 41 42 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate; 43 - (void)_didHandleAcceptedCandidate; 44 45 - (void)_forceRequestCandidates; 46 - (void)_didUpdateCandidateListVisibility:(BOOL)visible; 47 48 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange; 49 - (NSRect)_candidateRect; 50 51 - (void)_setHeaderBannerHeight:(int)height; 52 - (void)_setFooterBannerHeight:(int)height; 53 - (NSSet<NSView *> *)_pdfHUDs; 54 55 - (void)_simulateMouseMove:(NSEvent *)event; 56 - (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler; 57 32 @interface WebHTMLView (TestingSupportMac) 33 @property (nonatomic, readonly) BOOL _secureEventInputEnabledForTesting; 58 34 @end 59 35 60 #endif // !TARGET_OS_IPHONE36 #endif // PLATFORM(MAC) -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r292929 r295290 1635 1635 { 1636 1636 #if PLATFORM(MAC) && !PLATFORM(IOS_FAMILY) 1637 return JSValueMakeBoolean(context, IsSecureEventInputEnabled());1637 return JSValueMakeBoolean(context, static_cast<TestRunner*>(JSObjectGetPrivate(thisObject))->isSecureEventInputEnabled()); 1638 1638 #else 1639 1639 return JSValueMakeBoolean(context, false); … … 2373 2373 } 2374 2374 } 2375 2376 #if !PLATFORM(MAC) 2377 2378 bool TestRunner::isSecureEventInputEnabled() const 2379 { 2380 return false; 2381 } 2382 2383 #endif -
trunk/Tools/DumpRenderTree/TestRunner.h
r290098 r295290 386 386 void setDidCancelClientRedirect(bool value) { m_didCancelClientRedirect = value; } 387 387 388 bool isSecureEventInputEnabled() const; 389 388 390 private: 389 391 TestRunner(const std::string& testURL, const std::string& expectedPixelHash); -
trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
r293043 r295290 152 152 153 153 HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport ForwardingHeaders $(HEADER_SEARCH_PATHS_$(WK_COCOA_TOUCH)); 154 HEADER_SEARCH_PATHS_ = mac/InternalHeaders $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport ;154 HEADER_SEARCH_PATHS_ = mac/InternalHeaders $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport $(SRCROOT)/../../Source/WebKitLegacy/mac/WebView; 155 155 HEADER_SEARCH_PATHS_cocoatouch = $(SDKROOT)/usr/local/include $(SDKROOT)/usr/local/include/WebCoreTestSupport $(SRCROOT)/../../Source/WebKit/Platform/spi/ios; -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r290098 r295290 86 86 #endif 87 87 88 #if PLATFORM(MAC) 89 #import "WebHTMLViewForTestingMac.h" 90 #endif 91 88 92 #if !PLATFORM(IOS_FAMILY) 89 93 … … 1198 1202 return imagesArray.count; 1199 1203 } 1204 1205 #if PLATFORM(MAC) 1206 1207 bool TestRunner::isSecureEventInputEnabled() const 1208 { 1209 return dynamic_objc_cast<WebHTMLView>(mainFrame.frameView.documentView)._secureEventInputEnabledForTesting; 1210 } 1211 1212 #endif // PLATFORM(MAC) -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r289887 r295290 77 77 78 78 WKPageRef page(); 79 PlatformWKView platformView() { return m_view; }80 PlatformWindow platformWindow() { return m_window; }79 PlatformWKView platformView() const { return m_view; } 80 PlatformWindow platformWindow() const { return m_window; } 81 81 static PlatformWindow keyWindow(); 82 82 … … 103 103 void selectChromeInputField(); 104 104 String getSelectedTextInChromeInputField(); 105 106 bool isSecureEventInputEnabled() const; 105 107 106 108 bool drawsBackground() const; -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r294852 r295290 909 909 } 910 910 911 if (WKStringIsEqualToUTF8CString(messageName, "SecureEventInputIsEnabled")) { 912 #if PLATFORM(MAC) 913 return adoptWK(WKBooleanCreate(IsSecureEventInputEnabled())); 914 #else 915 return adoptWK(WKBooleanCreate(false)); 916 #endif 917 } 911 if (WKStringIsEqualToUTF8CString(messageName, "SecureEventInputIsEnabled")) 912 return adoptWK(WKBooleanCreate(TestController::singleton().mainWebView()->isSecureEventInputEnabled())); 918 913 919 914 if (WKStringIsEqualToUTF8CString(messageName, "SetCustomUserAgent")) { -
trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
r280288 r295290 300 300 } 301 301 302 bool PlatformWebView::isSecureEventInputEnabled() const 303 { 304 return false; 305 } 306 302 307 } // namespace WTR 303 308 -
trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm
r280288 r295290 439 439 } 440 440 441 bool PlatformWebView::isSecureEventInputEnabled() const 442 { 443 return false; 444 } 445 441 446 } // namespace WTR -
trunk/Tools/WebKitTestRunner/libwpe/PlatformWebViewLibWPE.cpp
r289887 r295290 158 158 } 159 159 160 bool PlatformWebView::isSecureEventInputEnabled() const 161 { 162 return false; 163 } 164 160 165 } // namespace WTR -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r281461 r295290 35 35 #import <WebKit/WKWebViewConfiguration.h> 36 36 #import <WebKit/WKWebViewPrivate.h> 37 #import <WebKit/WKWebViewPrivateForTesting.h> 37 38 #import <wtf/RetainPtr.h> 38 39 #import <wtf/text/WTFString.h> … … 255 256 } 256 257 258 bool PlatformWebView::isSecureEventInputEnabled() const 259 { 260 return platformView()._secureEventInputEnabledForTesting; 261 } 262 257 263 } // namespace WTR -
trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
r288784 r295290 279 279 } 280 280 281 bool PlatformWebView::isSecureEventInputEnabled() const 282 { 283 return false; 284 } 285 281 286 } // namespace WTR
Note:
See TracChangeset
for help on using the changeset viewer.