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...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-15 11:10 PDT by David Kilzer (:ddkilzer)
Modified: 2019-09-15 14:43 PDT (History)
6 users (show)

See Also:


Attachments
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
{
#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
    self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
    if (!self)
        return nil;
#else
    // 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);
#endif

    [...]

    return self;
}

<https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm#L317>
Comment 1 Radar WebKit Bug Importer 2019-09-15 11:11:05 PDT
<rdar://problem/55380741>
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:

#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
@interface WebScrollbarPartAnimation : NSAnimation
#else
@interface WebScrollbarPartAnimation : NSObject
#endif
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.