Title: [231058] trunk/Source/WebCore
Revision
231058
Author
[email protected]
Date
2018-04-26 11:22:03 -0700 (Thu, 26 Apr 2018)

Log Message

Make WAKScrollView delegate a weak property
<https://webkit.org/b/184799>
<rdar://problem/39469669>

Reviewed by Simon Fraser.

* platform/ios/wak/WAKScrollView.h:
- Remove `delegate` instance variable declaration.
- Declare `delegate` property as weak.
(-[WAKScrollView setDelegate:]): Delete declaration.
(-[WAKScrollView delegate]): Ditto.
* platform/ios/wak/WAKScrollView.mm:
- Synthesize getter/setter methods for `delegate` property.
(-[WAKScrollView setDelegate:]): Delete implementation.
(-[WAKScrollView delegate]): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (231057 => 231058)


--- trunk/Source/WebCore/ChangeLog	2018-04-26 18:20:50 UTC (rev 231057)
+++ trunk/Source/WebCore/ChangeLog	2018-04-26 18:22:03 UTC (rev 231058)
@@ -1,3 +1,21 @@
+2018-04-26  David Kilzer  <[email protected]>
+
+        Make WAKScrollView delegate a weak property
+        <https://webkit.org/b/184799>
+        <rdar://problem/39469669>
+
+        Reviewed by Simon Fraser.
+
+        * platform/ios/wak/WAKScrollView.h:
+        - Remove `delegate` instance variable declaration.
+        - Declare `delegate` property as weak.
+        (-[WAKScrollView setDelegate:]): Delete declaration.
+        (-[WAKScrollView delegate]): Ditto.
+        * platform/ios/wak/WAKScrollView.mm:
+        - Synthesize getter/setter methods for `delegate` property.
+        (-[WAKScrollView setDelegate:]): Delete implementation.
+        (-[WAKScrollView delegate]): Ditto.
+
 2018-04-26  Youenn Fablet  <[email protected]>
 
         CORS preflight checker should add a console message when preflight load is blocked

Modified: trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h (231057 => 231058)


--- trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h	2018-04-26 18:20:50 UTC (rev 231057)
+++ trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h	2018-04-26 18:22:03 UTC (rev 231058)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,6 @@
 {
     WAKView *_documentView;  // Only here so the ObjC instance stays around.
     WAKClipView *_contentView;
-    id _delegate;
     NSPoint _scrollOrigin;
 }
 
@@ -57,8 +56,7 @@
 - (BOOL)drawsBackground;
 - (float)horizontalLineScroll;
 
-- (void)setDelegate:(id)delegate;
-- (id)delegate;
+@property (nonatomic, weak) id delegate;
 
 - (CGRect)unobscuredContentRect;
 - (void)setActualScrollPosition:(CGPoint)point;

Modified: trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm (231057 => 231058)


--- trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm	2018-04-26 18:20:50 UTC (rev 231057)
+++ trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm	2018-04-26 18:22:03 UTC (rev 231058)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -62,6 +62,8 @@
 
 @implementation WAKScrollView
 
+@synthesize delegate;
+
 - (id)initWithFrame:(CGRect)rect
 {
     WKViewRef view = WKViewCreateWithFrame(rect, &viewContext);
@@ -114,16 +116,6 @@
     return NO;
 }
 
-- (void)setDelegate:(id)delegate
-{
-    _delegate = delegate;
-}
-
-- (id)delegate
-{
-    return _delegate;
-}
-
 - (CGRect)documentVisibleRect 
 {
     return [_contentView documentVisibleRect];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to