⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 239367 in webkit


Ignore:
Timestamp:
Dec 18, 2018, 9:01:04 PM (8 years ago)
Author:
achristensen@apple.com
Message:

REGRESSION(r239134) iOS safe browsing warning unable to show details
​https://bugs.webkit.org/show_bug.cgi?id=192837

Reviewed by Tim Horton.

  • 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.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239366 r239367  
     12018-12-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION(r239134) iOS safe browsing warning unable to show details
     4        https://bugs.webkit.org/show_bug.cgi?id=192837
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
     9        (-[WKSafeBrowsingWarning addContent]):
     10        I had a fragile design that relied on the internal view heirarchy structure of UIScrollView,
     11        which I changed in r239134 by introducing a layout which changed where its scrollbars were in the view heirarchy.
     12        I now have a more robust design that saves a WeakObjCPtr to the view I need to traverse to.
     13        Testing is problematic because this had to do with scrollbars and UIScrollView internals which seem to behave
     14        differently in TestWebKitAPI, but I verified manually that this fixes the issue.
     15
    1162018-12-18  Fujii Hironori  <Hironori.Fujii@sony.com>
    217
  • trunk/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h

    r238771 r239367  
    4444
    4545#if PLATFORM(MAC)
     46using ViewType = NSView;
    4647using RectType = NSRect;
    4748@interface WKSafeBrowsingWarning : NSView<NSTextViewDelegate>
    4849#else
     50using ViewType = UIView;
    4951using RectType = CGRect;
    5052@interface WKSafeBrowsingWarning : UIScrollView<UITextViewDelegate>
    … …  
    5557    RefPtr<const WebKit::SafeBrowsingWarning> _warning;
    5658    WeakObjCPtr<WKSafeBrowsingTextView> _details;
     59    WeakObjCPtr<ViewType> _box;
    5760}
    5861
  • trunk/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm

    r239134 r239367  
    5151using ButtonType = NSButton;
    5252using AlignmentType = NSLayoutAttribute;
    53 using ViewType = NSView;
    5453using SizeType = NSSize;
    5554#else
    … …  
    5958using ButtonType = UIButton;
    6059using AlignmentType = UIStackViewAlignment;
    61 using ViewType = UIView;
    6260using SizeType = CGSize;
    6361#endif
    … …  
    300298    auto goBack = makeButton(WarningItem::GoBackButton, self, @selector(goBackClicked));
    301299    auto box = [[ViewType new] autorelease];
     300    _box = box;
    302301    setBackground(box, colorForItem(WarningItem::BoxBackground, self));
    303302    box.layer.cornerRadius = boxCornerRadius;
    … …  
    368367- (void)showDetailsClicked
    369368{
    370     ViewType *box = self.subviews.lastObject;
     369    ViewType *box = _box.get().get();
    371370    ButtonType *showDetails = box.subviews.lastObject;
    372371    [showDetails removeFromSuperview];
Note: See TracChangeset for help on using the changeset viewer.