CSS auto focus-ring outlines don't render on iOS
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2019 22:26:37 +0000 (22:26 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2019 22:26:37 +0000 (22:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193583
<rdar://problem/6508697>

Reviewed by Simon Fraser.

Source/WebCore:

Implement support for drawing focus rings on iOS when built with ENABLE(FULL_KEYBOARD_ACCESS)
enabled.

For now the focus ring drawing for iOS is tangled up into the Mac-specific code to draw
animated focus rings. I will fix this in <https://bugs.webkit.org/show_bug.cgi?id=193591>.

* SourcesCocoa.txt: Add file ColorIOS.mm.
* WebCore.xcodeproj/project.pbxproj: Add files ColorIOS.{h, mm}.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::drawFocusRingAtTime):
(WebCore::GraphicsContext::drawFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

* platform/ios/ColorIOS.h: Added.
* platform/ios/ColorIOS.mm: Added.
(WebCore::colorFromUIColor): Convert a UIColor to a WebCore::Color.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::platformFocusRingColor const): Implement this override for iOS.
(WebCore::RenderThemeIOS::supportsFocusRing const): Implement this override for iOS to always
return false - the iOS theme code does not support painting focus rings. By returning false we
will use the platform-independent, non-theme code path to draw focus rings.

Source/WebCore/PAL:

Forward declare some IPI.

* pal/spi/ios/UIKitSPI.h:

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

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
Source/WebCore/platform/ios/ColorIOS.h [new file with mode: 0644]
Source/WebCore/platform/ios/ColorIOS.mm [new file with mode: 0644]
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderThemeIOS.h
Source/WebCore/rendering/RenderThemeIOS.mm

index 924e421..d7f8476 100644 (file)
@@ -1,3 +1,45 @@
+2019-01-18  Daniel Bates  <dabates@apple.com>
+
+        CSS auto focus-ring outlines don't render on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=193583
+        <rdar://problem/6508697>
+
+        Reviewed by Simon Fraser.
+
+        Implement support for drawing focus rings on iOS when built with ENABLE(FULL_KEYBOARD_ACCESS)
+        enabled.
+
+        For now the focus ring drawing for iOS is tangled up into the Mac-specific code to draw
+        animated focus rings. I will fix this in <https://bugs.webkit.org/show_bug.cgi?id=193591>.
+
+        * SourcesCocoa.txt: Add file ColorIOS.mm.
+        * WebCore.xcodeproj/project.pbxproj: Add files ColorIOS.{h, mm}.
+
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/cocoa/GraphicsContextCocoa.mm:
+        (WebCore::drawFocusRingAtTime):
+        (WebCore::GraphicsContext::drawFocusRing):
+        Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
+        This is always enabled on Mac.
+        
+        * platform/ios/ColorIOS.h: Added.
+        * platform/ios/ColorIOS.mm: Added.
+        (WebCore::colorFromUIColor): Convert a UIColor to a WebCore::Color.
+
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::paintFocusRing):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paintAreaElementFocusRing):
+        Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
+        This is always enabled on Mac.
+
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::platformFocusRingColor const): Implement this override for iOS.
+        (WebCore::RenderThemeIOS::supportsFocusRing const): Implement this override for iOS to always
+        return false - the iOS theme code does not support painting focus rings. By returning false we
+        will use the platform-independent, non-theme code path to draw focus rings.
+
 2019-01-18  David Kilzer  <ddkilzer@apple.com>
 
         Follow-up: Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
index d45d8ba..2d8584b 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-18  Daniel Bates  <dabates@apple.com>
+
+        CSS auto focus-ring outlines don't render on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=193583
+        <rdar://problem/6508697>
+
+        Reviewed by Simon Fraser.
+
+        Forward declare some IPI.
+
+        * pal/spi/ios/UIKitSPI.h:
+
 2019-01-18  David Kilzer  <ddkilzer@apple.com>
 
         Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
index 7f3165a..e1d46ac 100644 (file)
@@ -142,6 +142,12 @@ NS_ASSUME_NONNULL_END
 @end
 #endif
 
+#endif // USE(APPLE_INTERNAL_SDK)
+
+#if ENABLE(FULL_KEYBOARD_ACCESS)
+@interface UIColor (IPI)
++ (UIColor *)keyboardFocusIndicatorColor;
+@end
 #endif
 
 #endif // PLATFORM(IOS_FAMILY)
index f08b3c8..27d93a4 100644 (file)
@@ -389,6 +389,7 @@ platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
 platform/graphics/opentype/OpenTypeCG.cpp
 
+platform/ios/ColorIOS.mm
 platform/ios/CursorIOS.cpp
 platform/ios/Device.cpp
 platform/ios/DeviceMotionClientIOS.mm
index dfc2db4..dfaec5c 100644 (file)
                CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */; settings = {ATTRIBUTES = (); }; };
                CE1866451F72E5B400A0CAB6 /* MarkedText.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1866431F72E5B400A0CAB6 /* MarkedText.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CE2849871CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h in Headers */ = {isa = PBXBuildFile; fileRef = CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */; };
+               CE5169E721F1B84700EA4F78 /* ColorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5169E521F1B84700EA4F78 /* ColorIOS.h */; };
                CE5FA255209E48C50051D700 /* ContentSecurityPolicyClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5FA253209E48C50051D700 /* ContentSecurityPolicyClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CE6DADFA1C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = CE6DADF81C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CE799F981C6A46BC0097B518 /* ContentSecurityPolicySourceList.h in Headers */ = {isa = PBXBuildFile; fileRef = CE799F961C6A46BC0097B518 /* ContentSecurityPolicySourceList.h */; };
                CE1866431F72E5B400A0CAB6 /* MarkedText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkedText.h; sourceTree = "<group>"; };
                CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContentSecurityPolicyDirectiveNames.h; path = csp/ContentSecurityPolicyDirectiveNames.h; sourceTree = "<group>"; };
                CE2849881CA3614600B4A57F /* ContentSecurityPolicyDirectiveNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContentSecurityPolicyDirectiveNames.cpp; path = csp/ContentSecurityPolicyDirectiveNames.cpp; sourceTree = "<group>"; };
+               CE5169E521F1B84700EA4F78 /* ColorIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ColorIOS.h; sourceTree = "<group>"; };
+               CE5169E621F1B84700EA4F78 /* ColorIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorIOS.mm; 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>"; };
                        children = (
                                A148328B187F506800DA63A6 /* wak */,
                                F48223121E386E240066FC79 /* AbstractPasteboard.h */,
+                               CE5169E521F1B84700EA4F78 /* ColorIOS.h */,
+                               CE5169E621F1B84700EA4F78 /* ColorIOS.mm */,
                                2655414B1489AA2B000DFC5D /* CursorIOS.cpp */,
                                A1ED778A1BE3293F00DC1791 /* Device.cpp */,
                                A1ED778B1BE3294000DC1791 /* Device.h */,
                                F48D2AA52159740D00C6752B /* ColorCocoa.h in Headers */,
                                3103B7DF1DB01567008BB890 /* ColorHash.h in Headers */,
                                F55B3DB41251F12D003EF269 /* ColorInputType.h in Headers */,
+                               CE5169E721F1B84700EA4F78 /* ColorIOS.h in Headers */,
                                EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */,
                                9382DF5810A8D5C900925652 /* ColorSpace.h in Headers */,
                                BCDD454E1236C95C009A7985 /* ColumnInfo.h in Headers */,
index 1c366d5..816caea 100644 (file)
@@ -446,7 +446,9 @@ public:
 
     void drawFocusRing(const Vector<FloatRect>&, float width, float offset, const Color&);
     void drawFocusRing(const Path&, float width, float offset, const Color&);
-#if PLATFORM(MAC)
+
+    // FIXME: The following functions should only be compiled for Mac. See <https://bugs.webkit.org/show_bug.cgi?id=193591>.
+#if PLATFORM(COCOA)
     void drawFocusRing(const Path&, double timeOffset, bool& needsRedraw, const Color&);
     void drawFocusRing(const Vector<FloatRect>&, double timeOffset, bool& needsRedraw, const Color&);
 #endif
index 068aefa..702d6c5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2003-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -59,12 +59,26 @@ namespace WebCore {
 // NSColor, NSBezierPath, and NSGraphicsContext calls do not raise exceptions
 // so we don't block exceptions.
 
-#if PLATFORM(MAC)
+#if ENABLE(FULL_KEYBOARD_ACCESS)
 
 static bool drawFocusRingAtTime(CGContextRef context, NSTimeInterval timeOffset, const Color& color)
 {
+#if USE(APPKIT)
     CGFocusRingStyle focusRingStyle;
     BOOL needsRepaint = NSInitializeCGFocusRingStyleForTime(NSFocusRingOnly, &focusRingStyle, timeOffset);
+#else
+    BOOL needsRepaint = NO;
+    UNUSED_PARAM(timeOffset);
+
+    CGFocusRingStyle focusRingStyle;
+    focusRingStyle.version = 0;
+    focusRingStyle.tint = kCGFocusRingTintBlue;
+    focusRingStyle.ordering = kCGFocusRingOrderingNone;
+    focusRingStyle.alpha = kCGFocusRingAlphaDefault;
+    focusRingStyle.radius = kCGFocusRingRadiusDefault;
+    focusRingStyle.threshold = kCGFocusRingThresholdDefault;
+    focusRingStyle.bounds = CGRectZero;
+#endif
 
     // We want to respect the CGContext clipping and also not overpaint any
     // existing focus ring. The way to do this is set accumulate to
@@ -101,11 +115,11 @@ static bool drawFocusRingToContextAtTime(CGContextRef context, CGPathRef focusRi
     return drawFocusRingAtTime(context, std::numeric_limits<double>::max(), color);
 }
 
-#endif // PLATFORM(MAC)
+#endif // ENABLE(FULL_KEYBOARD_ACCESS)
 
 void GraphicsContext::drawFocusRing(const Path& path, float width, float offset, const Color& color)
 {
-#if PLATFORM(MAC)
+#if ENABLE(FULL_KEYBOARD_ACCESS)
     if (paintingDisabled() || path.isNull())
         return;
 
@@ -123,7 +137,9 @@ void GraphicsContext::drawFocusRing(const Path& path, float width, float offset,
 #endif
 }
 
-#if PLATFORM(MAC)
+// FIXME: The following functions should only be compiled for Mac. See <https://bugs.webkit.org/show_bug.cgi?id=193591>.
+#if ENABLE(FULL_KEYBOARD_ACCESS)
+
 void GraphicsContext::drawFocusRing(const Path& path, double timeOffset, bool& needsRedraw, const Color& color)
 {
     if (paintingDisabled() || path.isNull())
@@ -149,11 +165,12 @@ void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, double timeO
 
     needsRedraw = drawFocusRingToContextAtTime(platformContext(), focusRingPath.get(), timeOffset, color);
 }
+
 #endif
 
 void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, float width, float offset, const Color& color)
 {
-#if PLATFORM(MAC)
+#if ENABLE(FULL_KEYBOARD_ACCESS)
     if (paintingDisabled())
         return;
 
diff --git a/Source/WebCore/platform/ios/ColorIOS.h b/Source/WebCore/platform/ios/ColorIOS.h
new file mode 100644 (file)
index 0000000..ef07785
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2019 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 "Color.h"
+
+#if PLATFORM(IOS_FAMILY)
+
+OBJC_CLASS UIColor;
+
+namespace WebCore {
+
+Color colorFromUIColor(UIColor *);
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/ios/ColorIOS.mm b/Source/WebCore/platform/ios/ColorIOS.mm
new file mode 100644 (file)
index 0000000..2f89a46
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#import "config.h"
+#import "ColorIOS.h"
+
+#if PLATFORM(IOS_FAMILY)
+
+#import <UIKit/UIKit.h>
+
+namespace WebCore {
+
+Color colorFromUIColor(UIColor *color)
+{
+    // FIXME: Make this work for a UIColor that was created from a pattern or a DispayP3 color.
+    CGFloat redComponent;
+    CGFloat greenComponent;
+    CGFloat blueComponent;
+    CGFloat alpha;
+
+    [color getRed:&redComponent green:&greenComponent blue:&blueComponent alpha:&alpha];
+
+    static const double scaleFactor = nextafter(256.0, 0.0);
+    return makeRGBA(scaleFactor * redComponent, scaleFactor * greenComponent, scaleFactor * blueComponent, scaleFactor * alpha);
+}
+
+} // namespace WebCore
+
+#endif
index 3954452..15c9a35 100644 (file)
@@ -1819,7 +1819,8 @@ void RenderElement::paintFocusRing(PaintInfo& paintInfo, const RenderStyle& styl
         rect.inflate(outlineOffset);
         pixelSnappedFocusRingRects.append(snapRectToDevicePixels(rect, deviceScaleFactor));
     }
-#if PLATFORM(MAC)
+    // FIXME: The following code should only be compiled for Mac. See <https://bugs.webkit.org/show_bug.cgi?id=193591>.
+#if PLATFORM(COCOA)
     bool needsRepaint;
     if (style.hasBorderRadius()) {
         Path path = PathUtilities::pathWithShrinkWrappedRectsForOutline(pixelSnappedFocusRingRects, style.border(), outlineOffset, style.direction(), style.writingMode(),
index 76441ea..183a934 100644 (file)
@@ -550,10 +550,7 @@ void RenderImage::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
     
 void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
-#if PLATFORM(IOS_FAMILY)
-    UNUSED_PARAM(paintInfo);
-    UNUSED_PARAM(paintOffset);
-#else
+#if ENABLE(FULL_KEYBOARD_ACCESS)
     if (document().printing() || !frame().selection().isFocusedAndActive())
         return;
     
@@ -597,8 +594,11 @@ void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo, const LayoutPo
         page().focusController().setFocusedElementNeedsRepaint();
 #else
     paintInfo.context().drawFocusRing(path, outlineWidth, areaElementStyle->outlineOffset(), areaElementStyle->visitedDependentColorWithColorFilter(CSSPropertyOutlineColor));
-#endif
-#endif
+#endif // PLATFORM(MAC)
+#else
+    UNUSED_PARAM(paintInfo);
+    UNUSED_PARAM(paintOffset);
+#endif // ENABLE(FULL_KEYBOARD_ACCESS)
 }
 
 void RenderImage::areaElementFocusChanged(HTMLAreaElement* element)
index a5a30ac..39346c1 100644 (file)
@@ -109,8 +109,11 @@ protected:
     void adjustSearchFieldStyle(StyleResolver&, RenderStyle&, const Element*) const override;
     bool paintSearchFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
 
+    bool supportsFocusRing(const RenderStyle&) const final;
+
     Color platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
     Color platformInactiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
+    Color platformFocusRingColor(OptionSet<StyleColor::Options>) const final;
 
 #if ENABLE(TOUCH_EVENTS)
     Color platformTapHighlightColor() const override { return 0x4D1A1A1A; }
index 6094991..7c6c77e 100644 (file)
@@ -32,6 +32,7 @@
 #import "CSSPrimitiveValue.h"
 #import "CSSToLengthConversionData.h"
 #import "CSSValueKeywords.h"
+#import "ColorIOS.h"
 #import "DateComponents.h"
 #import "Document.h"
 #import "File.h"
@@ -1122,11 +1123,21 @@ Color RenderThemeIOS::platformInactiveSelectionBackgroundColor(OptionSet<StyleCo
     return Color::transparent;
 }
 
+Color RenderThemeIOS::platformFocusRingColor(OptionSet<StyleColor::Options>) const
+{
+    return colorFromUIColor([getUIColorClass() keyboardFocusIndicatorColor]);
+}
+
 bool RenderThemeIOS::shouldHaveSpinButton(const HTMLInputElement&) const
 {
     return false;
 }
 
+bool RenderThemeIOS::supportsFocusRing(const RenderStyle&) const
+{
+    return false;
+}
+
 FontCascadeDescription& RenderThemeIOS::cachedSystemFontDescription(CSSValueID valueID) const
 {
     static NeverDestroyed<FontCascadeDescription> systemFont;