Title: [102633] trunk/Source/WebKit2
Revision
102633
Author
[email protected]
Date
2011-12-12 15:51:08 -0800 (Mon, 12 Dec 2011)

Log Message

Prefix internal methods in Objective-C API files with an underscore
https://bugs.webkit.org/show_bug.cgi?id=74363

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _pageRef]):
(-[WKBrowsingContextController loadRequest:]):
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
(-[WKBrowsingContextController stopLoading]):
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController goForward]):
(-[WKBrowsingContextController canGoForward]):
(-[WKBrowsingContextController goBack]):
(-[WKBrowsingContextController canGoBack]):
(-[WKBrowsingContextController activeURL]):
(-[WKBrowsingContextController provisionalURL]):
(-[WKBrowsingContextController committedURL]):
(-[WKBrowsingContextController title]):
(-[WKBrowsingContextController textZoom]):
(-[WKBrowsingContextController setTextZoom:]):
(-[WKBrowsingContextController pageZoom]):
(-[WKBrowsingContextController setPageZoom:]):
(-[WKBrowsingContextController setPaginationMode:]):
(-[WKBrowsingContextController paginationMode]):
(-[WKBrowsingContextController setPageLength:]):
(-[WKBrowsingContextController pageLength]):
(-[WKBrowsingContextController setGapBetweenPages:]):
(-[WKBrowsingContextController gapBetweenPages]):
(-[WKBrowsingContextController pageCount]):
(-[WKBrowsingContextController _initWithPageRef:]):
* UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup allowsJavaScript]):
(-[WKBrowsingContextGroup setAllowsJavaScript:]):
(-[WKBrowsingContextGroup allowsPlugIns]):
(-[WKBrowsingContextGroup setAllowsPlugIns:]):
(-[WKBrowsingContextGroup _pageGroupRef]):
* UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
* UIProcess/API/mac/WKConnection.mm:
(-[WKConnection _initWithConnectionRef:]):
* UIProcess/API/mac/WKConnectionInternal.h:
* UIProcess/API/mac/WKProcessGroup.mm:
(didCreateConnection):
(-[WKProcessGroup _contextRef]):
* UIProcess/API/mac/WKProcessGroupInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKView browsingContextController]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (102632 => 102633)


--- trunk/Source/WebKit2/ChangeLog	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/ChangeLog	2011-12-12 23:51:08 UTC (rev 102633)
@@ -1,3 +1,56 @@
+2011-12-12  Sam Weinig  <[email protected]>
+
+        Prefix internal methods in Objective-C API files with an underscore
+        https://bugs.webkit.org/show_bug.cgi?id=74363
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/mac/WKBrowsingContextController.mm:
+        (-[WKBrowsingContextController _pageRef]):
+        (-[WKBrowsingContextController loadRequest:]):
+        (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
+        (-[WKBrowsingContextController stopLoading]):
+        (-[WKBrowsingContextController reload]):
+        (-[WKBrowsingContextController reloadFromOrigin]):
+        (-[WKBrowsingContextController goForward]):
+        (-[WKBrowsingContextController canGoForward]):
+        (-[WKBrowsingContextController goBack]):
+        (-[WKBrowsingContextController canGoBack]):
+        (-[WKBrowsingContextController activeURL]):
+        (-[WKBrowsingContextController provisionalURL]):
+        (-[WKBrowsingContextController committedURL]):
+        (-[WKBrowsingContextController title]):
+        (-[WKBrowsingContextController textZoom]):
+        (-[WKBrowsingContextController setTextZoom:]):
+        (-[WKBrowsingContextController pageZoom]):
+        (-[WKBrowsingContextController setPageZoom:]):
+        (-[WKBrowsingContextController setPaginationMode:]):
+        (-[WKBrowsingContextController paginationMode]):
+        (-[WKBrowsingContextController setPageLength:]):
+        (-[WKBrowsingContextController pageLength]):
+        (-[WKBrowsingContextController setGapBetweenPages:]):
+        (-[WKBrowsingContextController gapBetweenPages]):
+        (-[WKBrowsingContextController pageCount]):
+        (-[WKBrowsingContextController _initWithPageRef:]):
+        * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
+        * UIProcess/API/mac/WKBrowsingContextGroup.mm:
+        (-[WKBrowsingContextGroup allowsJavaScript]):
+        (-[WKBrowsingContextGroup setAllowsJavaScript:]):
+        (-[WKBrowsingContextGroup allowsPlugIns]):
+        (-[WKBrowsingContextGroup setAllowsPlugIns:]):
+        (-[WKBrowsingContextGroup _pageGroupRef]):
+        * UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
+        * UIProcess/API/mac/WKConnection.mm:
+        (-[WKConnection _initWithConnectionRef:]):
+        * UIProcess/API/mac/WKConnectionInternal.h:
+        * UIProcess/API/mac/WKProcessGroup.mm:
+        (didCreateConnection):
+        (-[WKProcessGroup _contextRef]):
+        * UIProcess/API/mac/WKProcessGroupInternal.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
+        (-[WKView browsingContextController]):
+
 2011-12-12  Ryosuke Niwa  <[email protected]>
 
         WebKit code shouldn't be calling applyCommand directly

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm	2011-12-12 23:51:08 UTC (rev 102633)
@@ -66,6 +66,14 @@
 @implementation WKBrowsingContextControllerData
 @end
 
+
+@interface WKBrowsingContextController ()
+
+@property(readonly) WKPageRef _pageRef;
+
+@end
+
+
 @implementation WKBrowsingContextController
 
 - (void)dealloc
@@ -74,7 +82,7 @@
     [super dealloc];
 }
 
-- (WKPageRef)pageRef
+- (WKPageRef)_pageRef
 {
     return _data->_pageRef.get();
 }
@@ -96,7 +104,7 @@
 - (void)loadRequest:(NSURLRequest *)request
 {
     WKRetainPtr<WKURLRequestRef> wkRequest = adoptWK(WKURLRequestCreateWithNSURLRequest(request));
-    WKPageLoadURLRequest(self.pageRef, wkRequest.get());
+    WKPageLoadURLRequest(self._pageRef, wkRequest.get());
 }
 
 - (void)loadFileURL:(NSURL *)URL restrictToFilesWithin:(NSURL *)allowedDirectory
@@ -107,44 +115,44 @@
     /* FIXME: Implement restrictions. */
 
     WKRetainPtr<WKURLRef> wkURL = adoptWK(WKURLCreateWithCFURL((CFURLRef)URL));
-    WKPageLoadURL(self.pageRef, wkURL.get());
+    WKPageLoadURL(self._pageRef, wkURL.get());
 }
 
 - (void)stopLoading
 {
-    WKPageStopLoading(self.pageRef);
+    WKPageStopLoading(self._pageRef);
 }
 
 - (void)reload
 {
-    WKPageReload(self.pageRef);
+    WKPageReload(self._pageRef);
 }
 
 - (void)reloadFromOrigin
 {
-    WKPageReloadFromOrigin(self.pageRef);
+    WKPageReloadFromOrigin(self._pageRef);
 }
 
 #pragma mark Back/Forward
 
 - (void)goForward
 {
-    WKPageGoForward(self.pageRef);
+    WKPageGoForward(self._pageRef);
 }
 
 - (BOOL)canGoForward
 {
-    return WKPageCanGoForward(self.pageRef);
+    return WKPageCanGoForward(self._pageRef);
 }
 
 - (void)goBack
 {
-    WKPageGoBack(self.pageRef);
+    WKPageGoBack(self._pageRef);
 }
 
 - (BOOL)canGoBack
 {
-    return WKPageCanGoBack(self.pageRef);
+    return WKPageCanGoBack(self._pageRef);
 }
 
 
@@ -152,46 +160,46 @@
 
 - (NSURL *)activeURL
 {
-    return autoreleased(WKPageCopyActiveURL(self.pageRef));
+    return autoreleased(WKPageCopyActiveURL(self._pageRef));
 }
 
 - (NSURL *)provisionalURL
 {
-    return autoreleased(WKPageCopyProvisionalURL(self.pageRef));
+    return autoreleased(WKPageCopyProvisionalURL(self._pageRef));
 }
 
 - (NSURL *)committedURL
 {
-    return autoreleased(WKPageCopyCommittedURL(self.pageRef));
+    return autoreleased(WKPageCopyCommittedURL(self._pageRef));
 }
 
 #pragma mark Active Document Introspection
 
 - (NSString *)title
 {
-    return autoreleased(WKPageCopyTitle(self.pageRef));
+    return autoreleased(WKPageCopyTitle(self._pageRef));
 }
 
 #pragma mark Zoom
 
 - (CGFloat)textZoom
 {
-    return WKPageGetTextZoomFactor(self.pageRef);
+    return WKPageGetTextZoomFactor(self._pageRef);
 }
 
 - (void)setTextZoom:(CGFloat)textZoom
 {
-    return WKPageSetTextZoomFactor(self.pageRef, textZoom);
+    return WKPageSetTextZoomFactor(self._pageRef, textZoom);
 }
 
 - (CGFloat)pageZoom
 {
-    return WKPageGetPageZoomFactor(self.pageRef);
+    return WKPageGetPageZoomFactor(self._pageRef);
 }
 
 - (void)setPageZoom:(CGFloat)pageZoom
 {
-    return WKPageSetPageZoomFactor(self.pageRef, pageZoom);
+    return WKPageSetPageZoomFactor(self._pageRef, pageZoom);
 }
 
 @end
@@ -215,12 +223,12 @@
         return;
     }
 
-    WKPageSetPaginationMode(self.pageRef, mode);
+    WKPageSetPaginationMode(self._pageRef, mode);
 }
 
 - (WKBrowsingContextPaginationMode)paginationMode
 {
-    switch (WKPageGetPaginationMode(self.pageRef)) {
+    switch (WKPageGetPaginationMode(self._pageRef)) {
     case kWKPaginationModeUnpaginated:
         return WKPaginationModeUnpaginated;
     case kWKPaginationModeHorizontal:
@@ -235,27 +243,27 @@
 
 - (void)setPageLength:(CGFloat)pageLength
 {
-    WKPageSetPageLength(self.pageRef, pageLength);
+    WKPageSetPageLength(self._pageRef, pageLength);
 }
 
 - (CGFloat)pageLength
 {
-    return WKPageGetPageLength(self.pageRef);
+    return WKPageGetPageLength(self._pageRef);
 }
 
 - (void)setGapBetweenPages:(CGFloat)gapBetweenPages
 {
-    WKPageSetGapBetweenPages(self.pageRef, gapBetweenPages);
+    WKPageSetGapBetweenPages(self._pageRef, gapBetweenPages);
 }
 
 - (CGFloat)gapBetweenPages
 {
-    return WKPageGetGapBetweenPages(self.pageRef);
+    return WKPageGetGapBetweenPages(self._pageRef);
 }
 
 - (NSUInteger)pageCount
 {
-    return WKPageGetPageCount(self.pageRef);
+    return WKPageGetPageCount(self._pageRef);
 }
 
 @end
@@ -346,7 +354,7 @@
 
 /* This should only be called from associate view. */
 
-- (id)initWithPageRef:(WKPageRef)pageRef
+- (id)_initWithPageRef:(WKPageRef)pageRef
 {
     self = [super init];
     if (!self)

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h	2011-12-12 23:51:08 UTC (rev 102633)
@@ -28,6 +28,6 @@
 @interface WKBrowsingContextController (Internal)
 
 /* This should only be called from associate view. */
-- (id)initWithPageRef:(WKPageRef)pageRef;
+- (id)_initWithPageRef:(WKPageRef)pageRef;
 
 @end

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm	2011-12-12 23:51:08 UTC (rev 102633)
@@ -63,29 +63,29 @@
 
 - (BOOL)allowsJavaScript
 {
-    return WKPreferencesGetJavaScriptEnabled(WKPageGroupGetPreferences(self.pageGroupRef));
+    return WKPreferencesGetJavaScriptEnabled(WKPageGroupGetPreferences(self._pageGroupRef));
 }
 
 - (void)setAllowsJavaScript:(BOOL)allowsJavaScript
 {
-    WKPreferencesSetJavaScriptEnabled(WKPageGroupGetPreferences(self.pageGroupRef), allowsJavaScript);
+    WKPreferencesSetJavaScriptEnabled(WKPageGroupGetPreferences(self._pageGroupRef), allowsJavaScript);
 }
 
 - (BOOL)allowsPlugIns
 {
-    return WKPreferencesGetPluginsEnabled(WKPageGroupGetPreferences(self.pageGroupRef));
+    return WKPreferencesGetPluginsEnabled(WKPageGroupGetPreferences(self._pageGroupRef));
 }
 
 - (void)setAllowsPlugIns:(BOOL)allowsPlugIns
 {
-    WKPreferencesSetPluginsEnabled(WKPageGroupGetPreferences(self.pageGroupRef), allowsPlugIns);
+    WKPreferencesSetPluginsEnabled(WKPageGroupGetPreferences(self._pageGroupRef), allowsPlugIns);
 }
 
 @end
 
 @implementation WKBrowsingContextGroup (Internal)
 
-- (WKPageGroupRef)pageGroupRef
+- (WKPageGroupRef)_pageGroupRef
 {
     return _data->_pageGroupRef.get();
 }

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h	2011-12-12 23:51:08 UTC (rev 102633)
@@ -27,6 +27,6 @@
 
 @interface WKBrowsingContextGroup (Internal)
 
-@property(readonly) WKPageGroupRef pageGroupRef;
+@property(readonly) WKPageGroupRef _pageGroupRef;
 
 @end

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm	2011-12-12 23:51:08 UTC (rev 102633)
@@ -100,7 +100,7 @@
     WKConnectionSetConnectionClient(connectionRef, &client);
 }
 
-- (id)initWithConnectionRef:(WKConnectionRef)connectionRef
+- (id)_initWithConnectionRef:(WKConnectionRef)connectionRef
 {
     self = [super init];
     if (!self)

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKConnectionInternal.h (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKConnectionInternal.h	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKConnectionInternal.h	2011-12-12 23:51:08 UTC (rev 102633)
@@ -27,6 +27,6 @@
 
 @interface WKConnection (Internal)
 
-- (id)initWithConnectionRef:(WKConnectionRef)connectionRef;
+- (id)_initWithConnectionRef:(WKConnectionRef)connectionRef;
 
 @end

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm	2011-12-12 23:51:08 UTC (rev 102633)
@@ -52,7 +52,7 @@
 {
     WKProcessGroup *processGroup = (WKProcessGroup *)clientInfo;
     if ([processGroup.delegate respondsToSelector:@selector(processGroup:didCreateConnectionToWebProcessPlugIn:)]) {
-        RetainPtr<WKConnection> connection = adoptNS([[WKConnection alloc] initWithConnectionRef:connectionRef]);
+        RetainPtr<WKConnection> connection = adoptNS([[WKConnection alloc] _initWithConnectionRef:connectionRef]);
         [processGroup.delegate processGroup:processGroup didCreateConnectionToWebProcessPlugIn:connection.get()];
     }
 }
@@ -112,7 +112,7 @@
 
 @implementation WKProcessGroup (Internal)
 
-- (WKContextRef)contextRef
+- (WKContextRef)_contextRef
 {
     return _data->_contextRef.get();
 }

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h	2011-12-12 23:51:08 UTC (rev 102633)
@@ -27,6 +27,6 @@
 
 @interface WKProcessGroup (Internal)
 
-@property(readonly) WKContextRef contextRef;
+@property(readonly) WKContextRef _contextRef;
 
 @end

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (102632 => 102633)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-12-12 23:51:03 UTC (rev 102632)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-12-12 23:51:08 UTC (rev 102633)
@@ -217,7 +217,7 @@
 
 - (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
 {
-    return [self initWithFrame:frame contextRef:processGroup.contextRef pageGroupRef:browsingContextGroup.pageGroupRef];
+    return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef];
 }
 
 - (void)dealloc
@@ -237,7 +237,7 @@
 - (WKBrowsingContextController *)browsingContextController
 {
     if (!_data->_browsingContextController)
-        _data->_browsingContextController.adoptNS([[WKBrowsingContextController alloc] initWithPageRef:[self pageRef]]);
+        _data->_browsingContextController.adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:[self pageRef]]);
     return _data->_browsingContextController.get();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to