WebKit Bugzilla
Attachment 357637 Details for
Bug 192837
: REGRESSION(r239134) iOS safe browsing warning unable to show details
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192837-20181218171534.patch (text/plain), 3.64 KB, created by
Alex Christensen
on 2018-12-18 17:15:35 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-12-18 17:15:35 PST
Size:
3.64 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 239360) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-12-18 Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION(r239134) iOS safe browsing warning unable to show details >+ https://bugs.webkit.org/show_bug.cgi?id=192837 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: >+ (-[WKSafeBrowsingWarning addContent]): >+ I had a fragile design that relied on the internal view heirarchy structure of UIScrollView, >+ which I changed in r239134 by introducing a layout which changed where its scrollbars were in the view heirarchy. >+ I now have a more robust design that saves a WeakObjCPtr to the view I need to traverse to. >+ Testing is problematic because this had to do with scrollbars and UIScrollView internals which seem to behave >+ differently in TestWebKitAPI, but I verified manually that this fixes the issue. >+ > 2018-12-18 Sihui Liu <sihui_liu@apple.com> > > Clean up IndexedDB files between tests >Index: Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h (revision 239338) >+++ Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h (working copy) >@@ -43,9 +43,11 @@ enum class ContinueUnsafeLoad : bool; > OBJC_CLASS WKSafeBrowsingTextView; > > #if PLATFORM(MAC) >+using ViewType = NSView; > using RectType = NSRect; > @interface WKSafeBrowsingWarning : NSView<NSTextViewDelegate> > #else >+using ViewType = UIView; > using RectType = CGRect; > @interface WKSafeBrowsingWarning : UIScrollView<UITextViewDelegate> > #endif >@@ -54,6 +56,7 @@ using RectType = CGRect; > CompletionHandler<void(Variant<WebKit::ContinueUnsafeLoad, URL>&&)> _completionHandler; > RefPtr<const WebKit::SafeBrowsingWarning> _warning; > WeakObjCPtr<WKSafeBrowsingTextView> _details; >+ WeakObjCPtr<ViewType> _box; > } > > - (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 239338) >+++ Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm (working copy) >@@ -50,7 +50,6 @@ using FontType = NSFont; > using TextViewType = NSTextView; > using ButtonType = NSButton; > using AlignmentType = NSLayoutAttribute; >-using ViewType = NSView; > using SizeType = NSSize; > #else > using ColorType = UIColor; >@@ -58,7 +57,6 @@ using FontType = UIFont; > using TextViewType = UITextView; > using ButtonType = UIButton; > using AlignmentType = UIStackViewAlignment; >-using ViewType = UIView; > using SizeType = CGSize; > #endif > >@@ -299,6 +297,7 @@ - (void)addContent > auto showDetails = makeButton(WarningItem::ShowDetailsButton, self, @selector(showDetailsClicked)); > auto goBack = makeButton(WarningItem::GoBackButton, self, @selector(goBackClicked)); > auto box = [[ViewType new] autorelease]; >+ _box = box; > setBackground(box, colorForItem(WarningItem::BoxBackground, self)); > box.layer.cornerRadius = boxCornerRadius; > >@@ -367,7 +366,7 @@ - (void)addContent > > - (void)showDetailsClicked > { >- ViewType *box = self.subviews.lastObject; >+ ViewType *box = _box.get().get(); > ButtonType *showDetails = box.subviews.lastObject; > [showDetails removeFromSuperview]; >
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:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192837
:
357628
| 357637