Bug 201806 - REGRESSION (r229419): Missing call to [self init] in -[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]
Summary: REGRESSION (r229419): Missing call to [self init] in -[WebScrollbarPartAnimat...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on:
Reported: 2019-09-15 11:10 PDT by David Kilzer (:ddkilzer)
Modified: 2019-09-15 14:43 PDT (History)
6 users (show)

See Also:

Patch v1 (1.64 KB, patch)
2019-09-15 11:14 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2019-09-15 11:10:54 PDT
Missing call to [self init] in -[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:].

- (id)initWithScrollbar:(Scrollbar*)scrollbar featureToAnimate:(FeatureToAnimate)featureToAnimate animateFrom:(CGFloat)startValue animateTo:(CGFloat)endValue duration:(NSTimeInterval)duration
    self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
    if (!self)
        return nil;
    // FIXME: Missing call to [self init] here!
    const NSTimeInterval timeInterval = 0.01;
    _timer = adoptNS([[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:0] interval:timeInterval target:self selector:@selector(setCurrentProgress:) userInfo:nil repeats:YES]);
    _duration = duration;
    _timingFunction = CubicBezierTimingFunction::create(CubicBezierTimingFunction::EaseInOut);


    return self;

Comment 1 Radar WebKit Bug Importer 2019-09-15 11:11:05 PDT
Comment 2 David Kilzer (:ddkilzer) 2019-09-15 11:14:04 PDT
Created attachment 378817 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2019-09-15 11:20:00 PDT
Comment on attachment 378817 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=378817&action=review

> Source/WebCore/platform/mac/ScrollAnimatorMac.mm:326
> +    self = [super init];
> +    if (!self)
> +        return nil;

Note that I chose to use plain old -init due to this class inheriting from NSObject:

@interface WebScrollbarPartAnimation : NSAnimation
@interface WebScrollbarPartAnimation : NSObject
Comment 4 WebKit Commit Bot 2019-09-15 14:43:33 PDT
Comment on attachment 378817 [details]
Patch v1

Clearing flags on attachment: 378817

Committed r249887: <https://trac.webkit.org/changeset/249887>
Comment 5 WebKit Commit Bot 2019-09-15 14:43:35 PDT
All reviewed patches have been landed.  Closing bug.