Changeset 237935 in webkit
- Timestamp:
- Nov 7, 2018 12:12:49 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237934 r237935 1 2018-11-07 Daniel Bates <dabates@apple.com> 2 3 Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=190141 5 6 Reviewed by Darin Adler. 7 8 Remove the runtime application check for WebKitTestRunner as we no longer need this 9 now that WebKitTestRunner and DumpRenderTree override +[UIKeyboard isInHardwareKeyboardMode]. 10 11 * platform/RuntimeApplicationChecks.h: 12 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 13 (WebCore::IOSApplication::isWebKitTestRunner): Deleted. 14 1 15 2018-11-07 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r237636 r237935 80 80 WEBCORE_EXPORT bool isMobileSafari(); 81 81 WEBCORE_EXPORT bool isWebBookmarksD(); 82 WEBCORE_EXPORT bool isWebKitTestRunner();83 82 WEBCORE_EXPORT bool isDumpRenderTree(); 84 83 bool isMobileStore(); -
trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r237266 r237935 218 218 } 219 219 220 bool IOSApplication::isWebKitTestRunner()221 {222 // We use a prefix match instead of strict equality since multiple instances of WebKitTestRunner223 // may be launched, where the bundle identifier of each instance has a unique suffix.224 static bool isWebKitTestRunner = applicationBundleIsEqualTo("org.webkit.WebKitTestRunnerApp"_s); // e.g. org.webkit.WebKitTestRunnerApp0225 return isWebKitTestRunner;226 }227 228 220 bool IOSApplication::isMobileStore() 229 221 { -
trunk/Source/WebKit/ChangeLog
r237924 r237935 1 2018-11-07 Daniel Bates <dabates@apple.com> 2 3 Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=190141 5 6 Reviewed by Darin Adler. 7 8 Directly use +[UIKeyboard isInHardwareKeyboardMode]. We will override this class method 9 in DumpRenderTree and WebKitTestRunner to always return NO so as to make test runs 10 deterministic regardless of whether a hardware keyboard is attached. 11 12 * Shared/NativeWebKeyboardEvent.h: 13 * Shared/ios/NativeWebKeyboardEventIOS.mm: 14 (WebKit::isInHardwareKeyboardMode): Deleted. 15 * UIProcess/ios/WKContentViewInteraction.mm: 16 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): 17 * WebProcess/WebPage/ios/WebPageIOS.mm: 18 (WebKit::WebPage::platformEditorState const): 19 1 20 2018-11-07 Zamiul Haque <zhaque@apple.com> 2 21 -
trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h
r237266 r237935 106 106 }; 107 107 108 // FIXME: Find a better place for this.109 #if PLATFORM(IOS_FAMILY)110 bool isInHardwareKeyboardMode();111 #endif112 113 108 } // namespace WebKit 114 109 -
trunk/Source/WebKit/Shared/ios/NativeWebKeyboardEventIOS.mm
r237266 r237935 35 35 namespace WebKit { 36 36 37 bool isInHardwareKeyboardMode()38 {39 return !WebCore::IOSApplication::isDumpRenderTree() && !WebCore::IOSApplication::isWebKitTestRunner() && [UIKeyboard isInHardwareKeyboardMode];40 }41 42 37 NativeWebKeyboardEvent::NativeWebKeyboardEvent(::WebEvent *event) 43 38 : WebKeyboardEvent(WebIOSEventFactory::createWebKeyboardEvent(event)) -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r237924 r237935 4217 4217 #else 4218 4218 || _isChangingFocus 4219 || isInHardwareKeyboardMode()4219 || [UIKeyboard isInHardwareKeyboardMode] 4220 4220 #endif 4221 4221 #if ENABLE(DRAG_SUPPORT) -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r237266 r237935 43 43 #import "RemoteLayerTreeDrawingArea.h" 44 44 #import "SandboxUtilities.h" 45 #import "UIKitSPI.h" 45 46 #import "UserData.h" 46 47 #import "VisibleContentRectUpdateInfo.h" … … 198 199 // immediately so that the UIProcess can update UI, including the position of the caret. 199 200 bool needsLayout = !frame.view() || frame.view()->needsLayout(); 200 if (shouldIncludePostLayoutData == IncludePostLayoutDataHint::No && needsLayout && ! isInHardwareKeyboardMode()&& !frame.editor().hasComposition()) {201 if (shouldIncludePostLayoutData == IncludePostLayoutDataHint::No && needsLayout && ![UIKeyboard isInHardwareKeyboardMode] && !frame.editor().hasComposition()) { 201 202 result.isMissingPostLayoutData = true; 202 203 return; -
trunk/Tools/ChangeLog
r237931 r237935 1 2018-11-07 Daniel Bates <dabates@apple.com> 2 3 Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=190141 5 6 Reviewed by Darin Adler. 7 8 Override +[UIKeyboard isInHardwareKeyboardMode] to always return NO so as to make test 9 runs deterministic regardless of whether a hardware keyboard is attached. 10 11 * DumpRenderTree/mac/DumpRenderTree.mm: 12 (overrideIsInHardwareKeyboardMode): Added. 13 (prepareConsistentTestingEnvironment): 14 * TestRunnerShared/spi/UIKitTestSPI.h: Forward declare SPI. 15 * WebKitTestRunner/ios/TestControllerIOS.mm: 16 (overrideIsInHardwareKeyboardMode): Added. 17 (WTR::TestController::platformInitialize): 18 1 19 2018-11-07 Jonathan Bedard <jbedard@apple.com> 2 20 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r237266 r237935 1202 1202 } 1203 1203 1204 #if PLATFORM(IOS_FAMILY) 1205 static BOOL overrideIsInHardwareKeyboardMode() 1206 { 1207 return NO; 1208 } 1209 #endif 1210 1204 1211 static void prepareConsistentTestingEnvironment() 1205 1212 { … … 1209 1216 #else 1210 1217 poseAsClass("DumpRenderTreeEvent", "GSEvent"); 1218 1219 // Override the implementation of +[UIKeyboard isInHardwareKeyboardMode] to ensure that test runs are deterministic 1220 // regardless of whether a hardware keyboard is attached. We intentionally never restore the original implementation. 1221 method_setImplementation(class_getClassMethod([UIKeyboard class], @selector(isInHardwareKeyboardMode)), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); 1211 1222 #endif 1212 1223 -
trunk/Tools/TestRunnerShared/spi/UIKitTestSPI.h
r237266 r237935 64 64 @interface UIKeyboard () 65 65 + (void)removeAllDynamicDictionaries; 66 + (BOOL)isInHardwareKeyboardMode; 66 67 @end 67 68 -
trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm
r237893 r237935 43 43 #import <WebKit/WKWebViewConfigurationPrivate.h> 44 44 #import <WebKit/WKWebViewPrivate.h> 45 #import <objc/runtime.h> 45 46 #import <wtf/MainThread.h> 47 48 static BOOL overrideIsInHardwareKeyboardMode() 49 { 50 return NO; 51 } 46 52 47 53 namespace WTR { … … 74 80 CFNotificationCenterAddObserver(center, this, handleKeyboardWillHideNotification, (CFStringRef)UIKeyboardWillHideNotification, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately); 75 81 CFNotificationCenterAddObserver(center, this, handleKeyboardDidHideNotification, (CFStringRef)UIKeyboardDidHideNotification, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately); 82 83 // Override the implementation of +[UIKeyboard isInHardwareKeyboardMode] to ensure that test runs are deterministic 84 // regardless of whether a hardware keyboard is attached. We intentionally never restore the original implementation. 85 method_setImplementation(class_getClassMethod([UIKeyboard class], @selector(isInHardwareKeyboardMode)), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); 76 86 } 77 87
Note: See TracChangeset
for help on using the changeset viewer.