WebKit Bugzilla
Attachment 361336 Details for
Bug 194363
: Digital crown should scroll safe browsing warning on watchOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194363-20190206151255.patch (text/plain), 3.29 KB, created by
Alex Christensen
on 2019-02-06 15:12:55 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-02-06 15:12:55 PST
Size:
3.29 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 241104) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2019-02-06 Alex Christensen <achristensen@webkit.org> >+ >+ Digital crown should scroll safe browsing warning on watchOS >+ https://bugs.webkit.org/show_bug.cgi?id=194363 >+ <rdar://problem/47348124> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WKSafeBrowsingWarning.h: >+ * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: >+ (-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]): >+ (-[WKSafeBrowsingWarning addContent]): >+ > 2019-02-06 Keith Rollin <krollin@apple.com> > > Really enable the automatic checking and regenerations of .xcfilelists during builds >Index: Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h (revision 241028) >+++ Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h (working copy) >@@ -57,6 +57,9 @@ using RectType = CGRect; > RefPtr<const WebKit::SafeBrowsingWarning> _warning; > WeakObjCPtr<WKSafeBrowsingTextView> _details; > WeakObjCPtr<ViewType> _box; >+#if PLATFORM(WATCHOS) >+ WeakObjCPtr<UIResponder> _previousFirstResponder; >+#endif > } > > - (instancetype)initWithFrame:(RectType)frame safeBrowsingWarning:(const WebKit::SafeBrowsingWarning&)warning completionHandler:(CompletionHandler<void(Variant<WebKit::ContinueUnsafeLoad, URL>&&)>&&)completionHandler; >Index: Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm (revision 241028) >+++ Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm (working copy) >@@ -33,6 +33,11 @@ > #import <wtf/BlockPtr.h> > #import <wtf/Language.h> > >+#if PLATFORM(WATCHOS) >+#import <PepperUICore/UIScrollView+PUICAdditionsPrivate.h> >+#import <UIKit/UIResponder_Private.h> >+#endif >+ > constexpr CGFloat exclamationPointSize = 30; > constexpr CGFloat boxCornerRadius = 6; > #if HAVE(SAFE_BROWSING) >@@ -274,12 +279,22 @@ - (instancetype)initWithFrame:(RectType) > completionHandler(WebKit::ContinueUnsafeLoad::Yes); > return nil; > } >- _completionHandler = WTFMove(completionHandler); >+ _completionHandler = [weakSelf = WeakObjCPtr<WKSafeBrowsingWarning>(self), completionHandler = WTFMove(completionHandler)] (Variant<WebKit::ContinueUnsafeLoad, URL>&& result) mutable { >+#if PLATFORM(WATCHOS) >+ if (auto strongSelf = weakSelf.get()) >+ [strongSelf.get()->_previousFirstResponder becomeFirstResponder]; >+#endif >+ completionHandler(WTFMove(result)); >+ }; > _warning = makeRef(warning); > setBackground(self, colorForItem(WarningItem::Background, self)); > #if PLATFORM(MAC) > [self addContent]; > #endif >+ >+#if PLATFORM(WATCHOS) >+ self.crownInputScrollDirection = PUICCrownInputScrollDirectionVertical; >+#endif > return self; > } > >@@ -362,6 +377,11 @@ - (void)addContent > [self updateContentSize]; > #endif > #endif >+ >+#if PLATFORM(WATCHOS) >+ self->_previousFirstResponder = [self firstResponder]; >+ [self becomeFirstResponder]; >+#endif > } > > - (void)showDetailsClicked
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
Flags:
wenson_hsieh
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194363
: 361336