Unreviewed, rolling out r238047.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2018 01:40:18 +0000 (01:40 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2018 01:40:18 +0000 (01:40 +0000)
Introduced layout test failures on iOS simulator.

Reverted changeset:

"[iOS] Draw caps lock indicator in password fields"
https://bugs.webkit.org/show_bug.cgi?id=190565
https://trac.webkit.org/changeset/238047

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/ios/GraphicsServicesSPI.h
Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/platform/cocoa/KeyEventCocoa.mm
Source/WebCore/platform/ios/KeyEventIOS.mm
Source/WebCore/platform/ios/WebEvent.h
Source/WebCore/platform/ios/WebEvent.mm
Source/WebCore/platform/mac/KeyEventMac.mm
Source/WebCore/rendering/RenderThemeCocoa.h
Source/WebCore/rendering/RenderThemeCocoa.mm
Source/WebCore/rendering/RenderThemeIOS.h
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd

index 6c917e9..aa2d1a8 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238047.
+
+        Introduced layout test failures on iOS simulator.
+
+        Reverted changeset:
+
+        "[iOS] Draw caps lock indicator in password fields"
+        https://bugs.webkit.org/show_bug.cgi?id=190565
+        https://trac.webkit.org/changeset/238047
+
 2018-11-09  Tim Horton  <timothy_horton@apple.com>
 
         Normal-flow-only flex items don't correctly respect z-index
index acd8f0a..3dd51b4 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238047.
+
+        Introduced layout test failures on iOS simulator.
+
+        Reverted changeset:
+
+        "[iOS] Draw caps lock indicator in password fields"
+        https://bugs.webkit.org/show_bug.cgi?id=190565
+        https://trac.webkit.org/changeset/238047
+
 2018-11-09  Daniel Bates  <dabates@apple.com>
 
         [iOS] Draw caps lock indicator in password fields
index 1b5bd97..1cc8b31 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,12 +43,6 @@ CFStringRef GSSystemRootDirectory(void);
 void GSFontInitialize(void);
 void GSFontPurgeFontCache(void);
 
-typedef struct __GSKeyboard* GSKeyboardRef;
-uint32_t GSKeyboardGetModifierState(GSKeyboardRef);
-Boolean GSEventIsHardwareKeyboardAttached();
-
-extern const char *kGSEventHardwareKeyboardAvailabilityChangedNotification;
-
 WTF_EXTERN_C_END
 
 #endif
index 1a87af5..7c94714 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-WTF_EXTERN_C_BEGIN
-typedef struct __GSKeyboard* GSKeyboardRef;
-WTF_EXTERN_C_END
-
 #if USE(APPLE_INTERNAL_SDK)
 
 #import <UIKit/NSParagraphStyle_Private.h>
@@ -48,7 +44,6 @@ WTF_EXTERN_C_END
 
 @interface UIApplication ()
 + (UIApplicationSceneClassicMode)_classicMode;
-- (GSKeyboardRef)_hardwareKeyboard;
 @end
 
 #else
@@ -80,9 +75,10 @@ typedef NS_ENUM(NSInteger, UIApplicationSceneClassicMode) {
 @end
 
 @interface UIApplication ()
+
 - (BOOL)_isClassic;
 + (UIApplicationSceneClassicMode)_classicMode;
-- (GSKeyboardRef)_hardwareKeyboard;
+
 @end
 
 @interface UIColor ()
index 91b9ec2..cb0917a 100644 (file)
                CE2849881CA3614600B4A57F /* ContentSecurityPolicyDirectiveNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContentSecurityPolicyDirectiveNames.cpp; path = csp/ContentSecurityPolicyDirectiveNames.cpp; sourceTree = "<group>"; };
                CE5CB1B314EDAB6F00BB2795 /* EventSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSender.h; sourceTree = "<group>"; };
                CE5FA253209E48C50051D700 /* ContentSecurityPolicyClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ContentSecurityPolicyClient.h; path = csp/ContentSecurityPolicyClient.h; sourceTree = "<group>"; };
-               CE68C8FF21924EE5001230B3 /* PlatformKeyboardEvent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformKeyboardEvent.cpp; sourceTree = "<group>"; };
                CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLMencloseElement.h; sourceTree = "<group>"; };
                CE6DADF71C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContentSecurityPolicyResponseHeaders.cpp; path = csp/ContentSecurityPolicyResponseHeaders.cpp; sourceTree = "<group>"; };
                CE6DADF81C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContentSecurityPolicyResponseHeaders.h; path = csp/ContentSecurityPolicyResponseHeaders.h; sourceTree = "<group>"; };
                                A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */,
                                BC5C76291497FE1400BC4775 /* PlatformEvent.h */,
                                A723F77A1484CA4C008C6DBE /* PlatformExportMacros.h */,
-                               CE68C8FF21924EE5001230B3 /* PlatformKeyboardEvent.cpp */,
                                935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */,
                                935C476709AC4D4300A6AAB4 /* PlatformMouseEvent.h */,
                                C5BAC16F14E30E4700008837 /* PlatformPasteboard.h */,
index ffd4607..b80b768 100644 (file)
@@ -3162,14 +3162,6 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& keyEvent)
     return wasHandled;
 }
 
-void EventHandler::capsLockStateMayHaveChanged() const
-{
-    auto* focusedElement = m_frame.document()->focusedElement();
-    if (!is<HTMLInputElement>(focusedElement))
-        return;
-    downcast<HTMLInputElement>(*focusedElement).capsLockStateMayHaveChanged();
-}
-
 bool EventHandler::internalKeyEvent(const PlatformKeyboardEvent& initialKeyEvent)
 {
     Ref<Frame> protectedFrame(m_frame);
@@ -3202,8 +3194,12 @@ bool EventHandler::internalKeyEvent(const PlatformKeyboardEvent& initialKeyEvent
     }
 #endif
 
-    if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL)
-        capsLockStateMayHaveChanged();
+    if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) {
+        if (auto* element = m_frame.document()->focusedElement()) {
+            if (is<HTMLInputElement>(*element))
+                downcast<HTMLInputElement>(*element).capsLockStateMayHaveChanged();
+        }
+    }
 
 #if ENABLE(PAN_SCROLLING)
     if (m_frame.mainFrame().eventHandler().panScrollInProgress()) {
index 92fbc5a..f5fe08f 100644 (file)
@@ -256,7 +256,6 @@ public:
     WEBCORE_EXPORT bool handleAccessKey(const PlatformKeyboardEvent&);
     WEBCORE_EXPORT bool keyEvent(const PlatformKeyboardEvent&);
     void defaultKeyboardEventHandler(KeyboardEvent&);
-    WEBCORE_EXPORT void capsLockStateMayHaveChanged() const;
 
     bool accessibilityPreventsEventPropagation(KeyboardEvent&);
     WEBCORE_EXPORT void handleKeyboardSelectionMovementForAccessibility(KeyboardEvent&);
index b3e04f2..631dd14 100644 (file)
@@ -27,7 +27,6 @@
 #import "KeyEventCocoa.h"
 
 #import "Logging.h"
-#import "PlatformKeyboardEvent.h"
 #import "WindowsKeyboardCodes.h"
 #import <wtf/ASCIICType.h>
 #import <wtf/text/WTFString.h>
@@ -40,20 +39,6 @@ using namespace WTF;
 
 namespace WebCore {
 
-bool PlatformKeyboardEvent::currentCapsLockState()
-{
-    return currentStateOfModifierKeys().contains(PlatformEvent::Modifier::CapsLockKey);
-}
-
-void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey)
-{
-    auto currentModifiers = currentStateOfModifierKeys();
-    shiftKey = currentModifiers.contains(PlatformEvent::Modifier::ShiftKey);
-    ctrlKey = currentModifiers.contains(PlatformEvent::Modifier::CtrlKey);
-    altKey = currentModifiers.contains(PlatformEvent::Modifier::AltKey);
-    metaKey = currentModifiers.contains(PlatformEvent::Modifier::MetaKey);
-}
-
 // https://w3c.github.io/uievents-key/
 String keyForCharCode(unichar charCode)
 {
index 9bd57e7..19ca9bf 100644 (file)
 #import "KeyEventCocoa.h"
 #import "KeyEventCodesIOS.h"
 #import "NotImplemented.h"
-#import "WebEvent.h"
 #import "WindowsKeyboardCodes.h"
 #import <pal/spi/cocoa/IOKitSPI.h>
-#import <wtf/MainThread.h>
 
 using namespace WTF;
 
@@ -314,29 +312,19 @@ void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCom
     }
 }
 
-OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
+bool PlatformKeyboardEvent::currentCapsLockState()
 {
-    // s_currentModifiers is only set in the WebContent process, not in the UI process.
-    if (s_currentModifiers) {
-        ASSERT(isMainThread());
-        return *s_currentModifiers;
-    }
-
-    ::WebEventFlags currentModifiers = [::WebEvent modifierFlags];
-
-    OptionSet<PlatformEvent::Modifier> modifiers;
-    if (currentModifiers & ::WebEventFlagMaskShiftKey)
-        modifiers.add(PlatformEvent::Modifier::ShiftKey);
-    if (currentModifiers & ::WebEventFlagMaskControlKey)
-        modifiers.add(PlatformEvent::Modifier::CtrlKey);
-    if (currentModifiers & ::WebEventFlagMaskOptionKey)
-        modifiers.add(PlatformEvent::Modifier::AltKey);
-    if (currentModifiers & ::WebEventFlagMaskCommandKey)
-        modifiers.add(PlatformEvent::Modifier::MetaKey);
-    if (currentModifiers & ::WebEventFlagMaskLeftCapsLockKey)
-        modifiers.add(PlatformEvent::Modifier::CapsLockKey);
+    notImplemented();
+    return false;
+}
 
-    return modifiers;
+void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey)
+{
+    notImplemented();
+    shiftKey = false;
+    ctrlKey = false;
+    altKey = false;
+    metaKey = false;
 }
 
 }
index 224a07e..3bd36bf 100644 (file)
@@ -216,8 +216,6 @@ WEBCORE_EXPORT @interface WebEvent : NSObject {
 
 @property(nonatomic) BOOL wasHandled;
 
-@property (class, readonly) WebEventFlags modifierFlags;
-
 @end
 
 #endif // TARGET_OS_IPHONE
index a6bd733..e678e9e 100644 (file)
 #import "KeyEventCodesIOS.h"
 #import "WAKAppKitStubs.h"
 #import <pal/spi/cocoa/IOKitSPI.h>
-#import <pal/spi/ios/GraphicsServicesSPI.h>
-#import <pal/spi/ios/UIKitSPI.h>
-#import <wtf/SoftLinking.h>
-
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication);
-
-#define UIApplication getUIApplicationClass()
 
 using WebCore::windowsKeyCodeForKeyCode;
 using WebCore::windowsKeyCodeForCharCode;
@@ -499,11 +491,6 @@ static NSString *normalizedStringWithAppKitCompatibilityMapping(NSString *charac
     return _gestureRotation;
 }
 
-+ (WebEventFlags)modifierFlags
-{
-    return GSEventIsHardwareKeyboardAttached() ? GSKeyboardGetModifierState([UIApplication sharedApplication]._hardwareKeyboard) : 0;
-}
-
 @end
 
 #endif // PLATFORM(IOS_FAMILY)
index 2bcb510..b08a53e 100644 (file)
@@ -258,6 +258,21 @@ void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCom
     }
 }
 
+bool PlatformKeyboardEvent::currentCapsLockState()
+{
+    auto currentModifiers = currentStateOfModifierKeys();
+    return currentModifiers.contains(PlatformEvent::Modifier::CapsLockKey);
+}
+
+void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey)
+{
+    auto currentModifiers = currentStateOfModifierKeys();
+    shiftKey = currentModifiers.contains(PlatformEvent::Modifier::ShiftKey);
+    ctrlKey = currentModifiers.contains(PlatformEvent::Modifier::CtrlKey);
+    altKey = currentModifiers.contains(PlatformEvent::Modifier::AltKey);
+    metaKey = currentModifiers.contains(PlatformEvent::Modifier::MetaKey);
+}
+
 OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
 {
 #if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
index f188742..a464c10 100644 (file)
@@ -36,8 +36,6 @@ namespace WebCore {
 
 class RenderThemeCocoa : public RenderTheme {
 private:
-    bool shouldHaveCapsLockIndicator(const HTMLInputElement&) const final;
-
 #if ENABLE(APPLE_PAY)
     void adjustApplePayButtonStyle(StyleResolver&, RenderStyle&, const Element*) const override;
     bool paintApplePayButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
index b4aaf64..feacfc5 100644 (file)
@@ -27,7 +27,6 @@
 #import "RenderThemeCocoa.h"
 
 #import "GraphicsContextCG.h"
-#import "HTMLInputElement.h"
 #import "RenderText.h"
 
 #if ENABLE(APPLE_PAY)
@@ -52,11 +51,6 @@ SOFT_LINK_MAY_FAIL(PassKit, PKDrawApplePayButton, void, (CGContextRef context, C
 
 namespace WebCore {
 
-bool RenderThemeCocoa::shouldHaveCapsLockIndicator(const HTMLInputElement& element) const
-{
-    return element.isPasswordField();
-}
-
 #if ENABLE(APPLE_PAY)
 
 static const auto applePayButtonMinimumWidth = 140;
index a5a30ac..ca8c0ba 100644 (file)
@@ -117,6 +117,7 @@ protected:
 #endif
 
     bool shouldHaveSpinButton(const HTMLInputElement&) const override;
+    bool shouldHaveCapsLockIndicator(const HTMLInputElement&) const override;
 
 #if ENABLE(VIDEO)
     String mediaControlsStyleSheet() override;
index 52b4d74..1d17aea 100644 (file)
@@ -1135,6 +1135,11 @@ bool RenderThemeIOS::shouldHaveSpinButton(const HTMLInputElement&) const
     return false;
 }
 
+bool RenderThemeIOS::shouldHaveCapsLockIndicator(const HTMLInputElement&) const
+{
+    return false;
+}
+
 FontCascadeDescription& RenderThemeIOS::cachedSystemFontDescription(CSSValueID valueID) const
 {
     static NeverDestroyed<FontCascadeDescription> systemFont;
index b74344c..1dd2b1f 100644 (file)
@@ -164,6 +164,8 @@ private:
     bool supportsClosedCaptioning() const final { return true; }
 #endif
 
+    bool shouldHaveCapsLockIndicator(const HTMLInputElement&) const final;
+
     bool paintSnapshottedPluginOverlay(const RenderObject&, const PaintInfo&, const IntRect&) final;
 
 #if ENABLE(ATTACHMENT_ELEMENT)
index 94d4ded..d550e5b 100644 (file)
@@ -2342,6 +2342,11 @@ void RenderThemeMac::adjustSliderThumbSize(RenderStyle& style, const Element*) c
     }
 }
 
+bool RenderThemeMac::shouldHaveCapsLockIndicator(const HTMLInputElement& element) const
+{
+    return element.isPasswordField();
+}
+
 NSPopUpButtonCell* RenderThemeMac::popupButton() const
 {
     if (!m_popupButton) {
index fca5ade..597ba28 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238047.
+
+        Introduced layout test failures on iOS simulator.
+
+        Reverted changeset:
+
+        "[iOS] Draw caps lock indicator in password fields"
+        https://bugs.webkit.org/show_bug.cgi?id=190565
+        https://trac.webkit.org/changeset/238047
+
 2018-11-09  Chris Dumez  <cdumez@apple.com>
 
         Suspended page persists even after back/forward list item is gone
index 4db7ef5..92f455f 100644 (file)
 #import <WebCore/WebSQLiteDatabaseTrackerClient.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
-#import <pal/spi/ios/GraphicsServicesSPI.h>
 #import <wtf/cocoa/Entitlements.h>
 
 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(_page && _page->isAlwaysOnLoggingAllowed(), ViewState, __VA_ARGS__)
@@ -713,8 +712,6 @@ static void validate(WKWebViewConfiguration *configuration)
 
     [[_configuration _contentProviderRegistry] addPage:*_page];
     _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]);
-
-    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), hardwareKeyboardAvailabilityChangedCallback, (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr, CFNotificationSuspensionBehaviorCoalesce);
 #endif
 
 #if PLATFORM(MAC)
@@ -852,8 +849,6 @@ static void validate(WKWebViewConfiguration *configuration)
     [[_configuration _contentProviderRegistry] removePage:*_page];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [_scrollView setInternalDelegate:nil];
-
-    CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr);
 #endif
 
 #if ENABLE(ACCESSIBILITY_EVENTS)
@@ -3112,13 +3107,6 @@ static int32_t activeOrientation(WKWebView *webView)
     [self _keyboardChangedWithInfo:notification.userInfo adjustScrollView:YES];
 }
 
-static void hardwareKeyboardAvailabilityChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
-{
-    ASSERT(observer);
-    WKWebView *webView = (__bridge WKWebView *)observer;
-    webView._page->hardwareKeyboardAvailabilityChanged();
-}
-
 - (void)_windowDidRotate:(NSNotification *)notification
 {
     if (!_overridesInterfaceOrientation)
index f6fda75..7bc6c32 100644 (file)
@@ -8150,7 +8150,7 @@ void WebPageProxy::getIsViewVisible(bool& result)
 
 void WebPageProxy::updateCurrentModifierState()
 {
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) || PLATFORM(IOS_FAMILY)
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     auto modifiers = PlatformKeyboardEvent::currentStateOfModifierKeys();
     m_process->send(Messages::WebPage::UpdateCurrentModifierState(modifiers), m_pageID);
 #endif
index f10d615..a4ea91f 100644 (file)
@@ -649,7 +649,6 @@ public:
     void storeSelectionForAccessibility(bool);
     void startAutoscrollAtPosition(const WebCore::FloatPoint& positionInWindow);
     void cancelAutoscroll();
-    void hardwareKeyboardAvailabilityChanged();
 #if ENABLE(DATA_INTERACTION)
     void didHandleStartDataInteractionRequest(bool started);
     void didHandleAdditionalDragItemsRequest(bool added);
@@ -1370,8 +1369,6 @@ public:
     void didCloseSuggestions();
 #endif
 
-    void updateCurrentModifierState();
-
 private:
     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
     void platformInitialize();
@@ -1854,6 +1851,8 @@ private:
     void stopDisplayLink(unsigned observerID);
 #endif
 
+    void updateCurrentModifierState();
+
     void reportPageLoadResult(const WebCore::ResourceError& = { });
 
     void continueNavigationInNewProcess(API::Navigation&, Ref<WebProcessProxy>&&);
index 70c8836..7e71a22 100644 (file)
@@ -3797,13 +3797,9 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
 
 - (void)_handleKeyUIEvent:(::UIEvent *)event
 {
-    bool isHardwareKeyboardEvent = !!event._hidEvent;
-    if (isHardwareKeyboardEvent && ((UIPhysicalKeyboardEvent *)event)._inputFlags & kUIKeyboardInputModifierFlagsChanged)
-        _page->updateCurrentModifierState();
-
     // We only want to handle key event from the hardware keyboard when we are
     // first responder and we are not interacting with editable content.
-    if ([self isFirstResponder] && isHardwareKeyboardEvent && !_page->editorState().isContentEditable) {
+    if ([self isFirstResponder] && event._hidEvent && !_page->editorState().isContentEditable) {
         [self handleKeyEvent:event];
         return;
     }
index dc80283..434f425 100644 (file)
@@ -1089,12 +1089,6 @@ void WebPageProxy::setIsScrollingOrZooming(bool isScrollingOrZooming)
         m_validationBubble->show();
 }
 
-void WebPageProxy::hardwareKeyboardAvailabilityChanged()
-{
-    updateCurrentModifierState();
-    m_process->send(Messages::WebPage::HardwareKeyboardAvailabilityChanged(), m_pageID);
-}
-
 #if ENABLE(DATA_INTERACTION)
 
 void WebPageProxy::didHandleStartDataInteractionRequest(bool started)
index 650a752..2fbc66b 100644 (file)
@@ -913,8 +913,6 @@ public:
 
     bool platformPrefersTextLegibilityBasedZoomScaling() const;
     const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
-
-    void hardwareKeyboardAvailabilityChanged();
 #endif
 
 #if ENABLE(IOS_TOUCH_EVENTS)
index dbc6812..fe4430c 100644 (file)
@@ -106,7 +106,6 @@ messages -> WebPage LegacyReceiver {
     StartAutoscrollAtPosition(WebCore::FloatPoint positionInWindow)
     CancelAutoscroll()
     RequestAssistedNodeInformation(WebKit::CallbackID callbackID)
-    HardwareKeyboardAvailabilityChanged()
 #endif
 
     SetControlledByAutomation(bool controlled)
index ef3a5f3..3ad9ace 100644 (file)
@@ -3087,12 +3087,6 @@ String WebPage::platformUserAgent(const URL&) const
     return String();
 }
 
-void WebPage::hardwareKeyboardAvailabilityChanged()
-{
-    if (auto* focusedFrame = m_page->focusController().focusedFrame())
-        focusedFrame->eventHandler().capsLockStateMayHaveChanged();
-}
-
 #if USE(QUICK_LOOK)
 void WebPage::didReceivePasswordForQuickLookDocument(const String& password)
 {
index ccc586e..3c4e7cf 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238047.
+
+        Introduced layout test failures on iOS simulator.
+
+        Reverted changeset:
+
+        "[iOS] Draw caps lock indicator in password fields"
+        https://bugs.webkit.org/show_bug.cgi?id=190565
+        https://trac.webkit.org/changeset/238047
+
 2018-11-09  Antti Koivisto  <antti@apple.com>
 
         Use OptionSet for layout milestones
index c4e2d41..734fd02 100644 (file)
 #import <WebCore/WAKScrollView.h>
 #import <WebCore/WAKWindow.h>
 #import <WebCore/WKGraphics.h>
-#import <WebCore/WebCoreThreadRun.h>
 #import <WebCore/WebEvent.h>
-#import <pal/spi/ios/GraphicsServicesSPI.h>
 #endif
 
 using namespace WebCore;
@@ -816,16 +814,6 @@ static CachedImageClient& promisedDataClient()
 
 #if PLATFORM(IOS_FAMILY)
 static NSString * const WebMarkedTextUpdatedNotification = @"WebMarkedTextUpdated";
-
-static void hardwareKeyboardAvailabilityChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
-{
-    ASSERT(observer);
-    WebThreadRun(^{
-        WebHTMLView *webView = (__bridge WebHTMLView *)observer;
-        if (Frame* coreFrame = core([webView _frame]))
-            coreFrame->eventHandler().capsLockStateMayHaveChanged();
-    });
-}
 #endif
 
 @interface WebHTMLView (WebHTMLViewFileInternal)
@@ -2622,7 +2610,6 @@ ALLOW_DEPRECATED_DECLARATIONS_END
     [[NSNotificationCenter defaultCenter] 
             addObserver:self selector:@selector(markedTextUpdate:) 
                    name:WebMarkedTextUpdatedNotification object:nil];
-    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), hardwareKeyboardAvailabilityChangedCallback, (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr, CFNotificationSuspensionBehaviorCoalesce);
 #endif
 
 #if PLATFORM(MAC)
@@ -2639,7 +2626,6 @@ ALLOW_DEPRECATED_DECLARATIONS_END
 
 #if PLATFORM(IOS_FAMILY)
     [[NSNotificationCenter defaultCenter] removeObserver:self name:WebMarkedTextUpdatedNotification object:nil];
-    CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), (CFStringRef)[NSString stringWithUTF8String:kGSEventHardwareKeyboardAvailabilityChangedNotification], nullptr);
 #endif
 
     // We can't assert that close has already been called because
index cdd3a8b..00403ac 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r238047.
+
+        Introduced layout test failures on iOS simulator.
+
+        Reverted changeset:
+
+        "[iOS] Draw caps lock indicator in password fields"
+        https://bugs.webkit.org/show_bug.cgi?id=190565
+        https://trac.webkit.org/changeset/238047
+
 2018-11-09  Daniel Bates  <dabates@apple.com>
 
         [iOS] Draw caps lock indicator in password fields
index d354324..ab1c406 100644 (file)
@@ -15,13 +15,10 @@ exports:
       - x86_64
     symbols:
       - _GSCurrentEventTimestamp
-      - _GSEventIsHardwareKeyboardAttached
       - _GSFontInitialize
       - _GSFontPurgeFontCache
       - _GSInitialize
-      - _GSKeyboardGetModifierState
       - _GSSystemRootDirectory
-      - _kGSEventHardwareKeyboardAvailabilityChangedNotification
 install-name: /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
 objc-constraint: none
 platform: ios