WebKit Bugzilla
Attachment 362524 Details for
Bug 194864
: [iOS] Tweak UI for focus rings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194864-20190220121723.patch (text/plain), 4.91 KB, created by
Daniel Bates
on 2019-02-20 12:17:24 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-02-20 12:17:24 PST
Size:
4.91 KB
patch
obsolete
>Subversion Revision: 241779 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ea2c31f24c0fc0c030837a00019c98468be011bb..ef57d8dee099cac38b57ef5a7f050638c1715998 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-20 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Tweak UI for focus rings >+ https://bugs.webkit.org/show_bug.cgi?id=194864 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make use of UIKit constants to make focus rings pretty. >+ >+ * platform/graphics/cocoa/GraphicsContextCocoa.mm: >+ (WebCore::drawFocusRingAtTime): >+ > 2019-02-19 Zalan Bujtas <zalan@apple.com> > > Fix post-commit feedback. >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 7e5c531eee9d9cfa3cf747d62d6759dc7f96742b..0e7fcf662d339274107949779958f8461100abd0 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,16 @@ >+2019-02-20 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Tweak UI for focus rings >+ https://bugs.webkit.org/show_bug.cgi?id=194864 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Expose more SPI. >+ >+ * pal/ios/UIKitSoftLink.h: >+ * pal/ios/UIKitSoftLink.mm: >+ * pal/spi/ios/UIKitSPI.h: >+ > 2019-02-16 Darin Adler <darin@apple.com> > > Continue reducing use of String::format, now focusing on hex: "%p", "%x", etc. >diff --git a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >index f933959e62b8cce53cf13309b8496dea7eb0c482..bb6bb7e45ad222ad59ae862f7ff6d577e8afc41a 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >@@ -49,6 +49,7 @@ SOFT_LINK_CLASS_FOR_HEADER(PAL, UIApplication) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIColor) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIDevice) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIDocumentInteractionController) >+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIFocusRingStyle) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIFont) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIGraphicsImageRenderer) > SOFT_LINK_CLASS_FOR_HEADER(PAL, UIImage) >diff --git a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >index 33715ccc9bcd55dde959e2871d8b956eebb7516a..494644c6de01e79e3e5e21a7208352fdb203fef7 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >@@ -52,6 +52,7 @@ SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIDocumentInteractionController) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIFont) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIGraphicsImageRenderer) > SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, UIKit, UIImage, PAL_EXPORT) >+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIFocusRingStyle) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UILabel) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIPasteboard) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIScreen) >diff --git a/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h b/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >index e1d46ac955352a4037784cc12c871e61a0737cb7..41f11e8ed2bb965e0a667018cecc046e96584969 100644 >--- a/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >+++ b/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >@@ -37,6 +37,7 @@ WTF_EXTERN_C_END > #import <UIKit/UIApplicationSceneConstants.h> > #import <UIKit/UIApplication_Private.h> > #import <UIKit/UIColor_Private.h> >+#import <UIKit/UIFocusRingStyle.h> > #import <UIKit/UIFont_Private.h> > #import <UIKit/UIInterface_Private.h> > #import <UIKit/UIScreen_Private.h> >@@ -148,6 +149,12 @@ NS_ASSUME_NONNULL_END > @interface UIColor (IPI) > + (UIColor *)keyboardFocusIndicatorColor; > @end >+ >+@interface UIFocusRingStyle (Staging_47831886) >++ (CGFloat)cornerRadius; >++ (CGFloat)maxAlpha; >++ (CGFloat)alphaThreshold; >+@end > #endif > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm b/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >index eab564b0e24255a021c94120b861e7c691781507..55bb4e90885881427f52e51e3f42fa3840e2e0a3 100644 >--- a/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm >@@ -42,6 +42,7 @@ > #if PLATFORM(IOS_FAMILY) > #import "Color.h" > #import "WKGraphics.h" >+#import <pal/ios/UIKitSoftLink.h> > #import <pal/spi/ios/UIKitSPI.h> > #endif > >@@ -74,9 +75,9 @@ static bool drawFocusRingAtTime(CGContextRef context, NSTimeInterval timeOffset, > focusRingStyle.version = 0; > focusRingStyle.tint = kCGFocusRingTintBlue; > focusRingStyle.ordering = kCGFocusRingOrderingNone; >- focusRingStyle.alpha = kCGFocusRingAlphaDefault; >- focusRingStyle.radius = kCGFocusRingRadiusDefault; >- focusRingStyle.threshold = kCGFocusRingThresholdDefault; >+ focusRingStyle.alpha = [PAL::getUIFocusRingStyleClass() maxAlpha]; >+ focusRingStyle.radius = [PAL::getUIFocusRingStyleClass() cornerRadius]; >+ focusRingStyle.threshold = [PAL::getUIFocusRingStyleClass() alphaThreshold]; > focusRingStyle.bounds = CGRectZero; > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194864
:
362524
|
362525