Changeset 102633 in webkit


Ignore:
Timestamp:
Dec 12, 2011 3:51:08 PM (12 years ago)
Author:
weinig@apple.com
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]):

Location:
trunk/Source/WebKit2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r102627 r102633  
     12011-12-12  Sam Weinig  <sam@webkit.org>
     2
     3        Prefix internal methods in Objective-C API files with an underscore
     4        https://bugs.webkit.org/show_bug.cgi?id=74363
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * UIProcess/API/mac/WKBrowsingContextController.mm:
     9        (-[WKBrowsingContextController _pageRef]):
     10        (-[WKBrowsingContextController loadRequest:]):
     11        (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
     12        (-[WKBrowsingContextController stopLoading]):
     13        (-[WKBrowsingContextController reload]):
     14        (-[WKBrowsingContextController reloadFromOrigin]):
     15        (-[WKBrowsingContextController goForward]):
     16        (-[WKBrowsingContextController canGoForward]):
     17        (-[WKBrowsingContextController goBack]):
     18        (-[WKBrowsingContextController canGoBack]):
     19        (-[WKBrowsingContextController activeURL]):
     20        (-[WKBrowsingContextController provisionalURL]):
     21        (-[WKBrowsingContextController committedURL]):
     22        (-[WKBrowsingContextController title]):
     23        (-[WKBrowsingContextController textZoom]):
     24        (-[WKBrowsingContextController setTextZoom:]):
     25        (-[WKBrowsingContextController pageZoom]):
     26        (-[WKBrowsingContextController setPageZoom:]):
     27        (-[WKBrowsingContextController setPaginationMode:]):
     28        (-[WKBrowsingContextController paginationMode]):
     29        (-[WKBrowsingContextController setPageLength:]):
     30        (-[WKBrowsingContextController pageLength]):
     31        (-[WKBrowsingContextController setGapBetweenPages:]):
     32        (-[WKBrowsingContextController gapBetweenPages]):
     33        (-[WKBrowsingContextController pageCount]):
     34        (-[WKBrowsingContextController _initWithPageRef:]):
     35        * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
     36        * UIProcess/API/mac/WKBrowsingContextGroup.mm:
     37        (-[WKBrowsingContextGroup allowsJavaScript]):
     38        (-[WKBrowsingContextGroup setAllowsJavaScript:]):
     39        (-[WKBrowsingContextGroup allowsPlugIns]):
     40        (-[WKBrowsingContextGroup setAllowsPlugIns:]):
     41        (-[WKBrowsingContextGroup _pageGroupRef]):
     42        * UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
     43        * UIProcess/API/mac/WKConnection.mm:
     44        (-[WKConnection _initWithConnectionRef:]):
     45        * UIProcess/API/mac/WKConnectionInternal.h:
     46        * UIProcess/API/mac/WKProcessGroup.mm:
     47        (didCreateConnection):
     48        (-[WKProcessGroup _contextRef]):
     49        * UIProcess/API/mac/WKProcessGroupInternal.h:
     50        * UIProcess/API/mac/WKView.mm:
     51        (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
     52        (-[WKView browsingContextController]):
     53
    1542011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
    255
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm

    r102616 r102633  
    6767@end
    6868
     69
     70@interface WKBrowsingContextController ()
     71
     72@property(readonly) WKPageRef _pageRef;
     73
     74@end
     75
     76
    6977@implementation WKBrowsingContextController
    7078
     
    7583}
    7684
    77 - (WKPageRef)pageRef
     85- (WKPageRef)_pageRef
    7886{
    7987    return _data->_pageRef.get();
     
    97105{
    98106    WKRetainPtr<WKURLRequestRef> wkRequest = adoptWK(WKURLRequestCreateWithNSURLRequest(request));
    99     WKPageLoadURLRequest(self.pageRef, wkRequest.get());
     107    WKPageLoadURLRequest(self._pageRef, wkRequest.get());
    100108}
    101109
     
    108116
    109117    WKRetainPtr<WKURLRef> wkURL = adoptWK(WKURLCreateWithCFURL((CFURLRef)URL));
    110     WKPageLoadURL(self.pageRef, wkURL.get());
     118    WKPageLoadURL(self._pageRef, wkURL.get());
    111119}
    112120
    113121- (void)stopLoading
    114122{
    115     WKPageStopLoading(self.pageRef);
     123    WKPageStopLoading(self._pageRef);
    116124}
    117125
    118126- (void)reload
    119127{
    120     WKPageReload(self.pageRef);
     128    WKPageReload(self._pageRef);
    121129}
    122130
    123131- (void)reloadFromOrigin
    124132{
    125     WKPageReloadFromOrigin(self.pageRef);
     133    WKPageReloadFromOrigin(self._pageRef);
    126134}
    127135
     
    130138- (void)goForward
    131139{
    132     WKPageGoForward(self.pageRef);
     140    WKPageGoForward(self._pageRef);
    133141}
    134142
    135143- (BOOL)canGoForward
    136144{
    137     return WKPageCanGoForward(self.pageRef);
     145    return WKPageCanGoForward(self._pageRef);
    138146}
    139147
    140148- (void)goBack
    141149{
    142     WKPageGoBack(self.pageRef);
     150    WKPageGoBack(self._pageRef);
    143151}
    144152
    145153- (BOOL)canGoBack
    146154{
    147     return WKPageCanGoBack(self.pageRef);
     155    return WKPageCanGoBack(self._pageRef);
    148156}
    149157
     
    153161- (NSURL *)activeURL
    154162{
    155     return autoreleased(WKPageCopyActiveURL(self.pageRef));
     163    return autoreleased(WKPageCopyActiveURL(self._pageRef));
    156164}
    157165
    158166- (NSURL *)provisionalURL
    159167{
    160     return autoreleased(WKPageCopyProvisionalURL(self.pageRef));
     168    return autoreleased(WKPageCopyProvisionalURL(self._pageRef));
    161169}
    162170
    163171- (NSURL *)committedURL
    164172{
    165     return autoreleased(WKPageCopyCommittedURL(self.pageRef));
     173    return autoreleased(WKPageCopyCommittedURL(self._pageRef));
    166174}
    167175
     
    170178- (NSString *)title
    171179{
    172     return autoreleased(WKPageCopyTitle(self.pageRef));
     180    return autoreleased(WKPageCopyTitle(self._pageRef));
    173181}
    174182
     
    177185- (CGFloat)textZoom
    178186{
    179     return WKPageGetTextZoomFactor(self.pageRef);
     187    return WKPageGetTextZoomFactor(self._pageRef);
    180188}
    181189
    182190- (void)setTextZoom:(CGFloat)textZoom
    183191{
    184     return WKPageSetTextZoomFactor(self.pageRef, textZoom);
     192    return WKPageSetTextZoomFactor(self._pageRef, textZoom);
    185193}
    186194
    187195- (CGFloat)pageZoom
    188196{
    189     return WKPageGetPageZoomFactor(self.pageRef);
     197    return WKPageGetPageZoomFactor(self._pageRef);
    190198}
    191199
    192200- (void)setPageZoom:(CGFloat)pageZoom
    193201{
    194     return WKPageSetPageZoomFactor(self.pageRef, pageZoom);
     202    return WKPageSetPageZoomFactor(self._pageRef, pageZoom);
    195203}
    196204
     
    216224    }
    217225
    218     WKPageSetPaginationMode(self.pageRef, mode);
     226    WKPageSetPaginationMode(self._pageRef, mode);
    219227}
    220228
    221229- (WKBrowsingContextPaginationMode)paginationMode
    222230{
    223     switch (WKPageGetPaginationMode(self.pageRef)) {
     231    switch (WKPageGetPaginationMode(self._pageRef)) {
    224232    case kWKPaginationModeUnpaginated:
    225233        return WKPaginationModeUnpaginated;
     
    236244- (void)setPageLength:(CGFloat)pageLength
    237245{
    238     WKPageSetPageLength(self.pageRef, pageLength);
     246    WKPageSetPageLength(self._pageRef, pageLength);
    239247}
    240248
    241249- (CGFloat)pageLength
    242250{
    243     return WKPageGetPageLength(self.pageRef);
     251    return WKPageGetPageLength(self._pageRef);
    244252}
    245253
    246254- (void)setGapBetweenPages:(CGFloat)gapBetweenPages
    247255{
    248     WKPageSetGapBetweenPages(self.pageRef, gapBetweenPages);
     256    WKPageSetGapBetweenPages(self._pageRef, gapBetweenPages);
    249257}
    250258
    251259- (CGFloat)gapBetweenPages
    252260{
    253     return WKPageGetGapBetweenPages(self.pageRef);
     261    return WKPageGetGapBetweenPages(self._pageRef);
    254262}
    255263
    256264- (NSUInteger)pageCount
    257265{
    258     return WKPageGetPageCount(self.pageRef);
     266    return WKPageGetPageCount(self._pageRef);
    259267}
    260268
     
    347355/* This should only be called from associate view. */
    348356
    349 - (id)initWithPageRef:(WKPageRef)pageRef
     357- (id)_initWithPageRef:(WKPageRef)pageRef
    350358{
    351359    self = [super init];
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h

    r97882 r102633  
    2929
    3030/* This should only be called from associate view. */
    31 - (id)initWithPageRef:(WKPageRef)pageRef;
     31- (id)_initWithPageRef:(WKPageRef)pageRef;
    3232
    3333@end
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm

    r98622 r102633  
    6464- (BOOL)allowsJavaScript
    6565{
    66     return WKPreferencesGetJavaScriptEnabled(WKPageGroupGetPreferences(self.pageGroupRef));
     66    return WKPreferencesGetJavaScriptEnabled(WKPageGroupGetPreferences(self._pageGroupRef));
    6767}
    6868
    6969- (void)setAllowsJavaScript:(BOOL)allowsJavaScript
    7070{
    71     WKPreferencesSetJavaScriptEnabled(WKPageGroupGetPreferences(self.pageGroupRef), allowsJavaScript);
     71    WKPreferencesSetJavaScriptEnabled(WKPageGroupGetPreferences(self._pageGroupRef), allowsJavaScript);
    7272}
    7373
    7474- (BOOL)allowsPlugIns
    7575{
    76     return WKPreferencesGetPluginsEnabled(WKPageGroupGetPreferences(self.pageGroupRef));
     76    return WKPreferencesGetPluginsEnabled(WKPageGroupGetPreferences(self._pageGroupRef));
    7777}
    7878
    7979- (void)setAllowsPlugIns:(BOOL)allowsPlugIns
    8080{
    81     WKPreferencesSetPluginsEnabled(WKPageGroupGetPreferences(self.pageGroupRef), allowsPlugIns);
     81    WKPreferencesSetPluginsEnabled(WKPageGroupGetPreferences(self._pageGroupRef), allowsPlugIns);
    8282}
    8383
     
    8686@implementation WKBrowsingContextGroup (Internal)
    8787
    88 - (WKPageGroupRef)pageGroupRef
     88- (WKPageGroupRef)_pageGroupRef
    8989{
    9090    return _data->_pageGroupRef.get();
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h

    r98184 r102633  
    2828@interface WKBrowsingContextGroup (Internal)
    2929
    30 @property(readonly) WKPageGroupRef pageGroupRef;
     30@property(readonly) WKPageGroupRef _pageGroupRef;
    3131
    3232@end
  • trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm

    r102625 r102633  
    101101}
    102102
    103 - (id)initWithConnectionRef:(WKConnectionRef)connectionRef
     103- (id)_initWithConnectionRef:(WKConnectionRef)connectionRef
    104104{
    105105    self = [super init];
  • trunk/Source/WebKit2/UIProcess/API/mac/WKConnectionInternal.h

    r102616 r102633  
    2828@interface WKConnection (Internal)
    2929
    30 - (id)initWithConnectionRef:(WKConnectionRef)connectionRef;
     30- (id)_initWithConnectionRef:(WKConnectionRef)connectionRef;
    3131
    3232@end
  • trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm

    r102616 r102633  
    5353    WKProcessGroup *processGroup = (WKProcessGroup *)clientInfo;
    5454    if ([processGroup.delegate respondsToSelector:@selector(processGroup:didCreateConnectionToWebProcessPlugIn:)]) {
    55         RetainPtr<WKConnection> connection = adoptNS([[WKConnection alloc] initWithConnectionRef:connectionRef]);
     55        RetainPtr<WKConnection> connection = adoptNS([[WKConnection alloc] _initWithConnectionRef:connectionRef]);
    5656        [processGroup.delegate processGroup:processGroup didCreateConnectionToWebProcessPlugIn:connection.get()];
    5757    }
     
    113113@implementation WKProcessGroup (Internal)
    114114
    115 - (WKContextRef)contextRef
     115- (WKContextRef)_contextRef
    116116{
    117117    return _data->_contextRef.get();
  • trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h

    r98160 r102633  
    2828@interface WKProcessGroup (Internal)
    2929
    30 @property(readonly) WKContextRef contextRef;
     30@property(readonly) WKContextRef _contextRef;
    3131
    3232@end
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r102494 r102633  
    218218- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
    219219{
    220     return [self initWithFrame:frame contextRef:processGroup.contextRef pageGroupRef:browsingContextGroup.pageGroupRef];
     220    return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef];
    221221}
    222222
     
    238238{
    239239    if (!_data->_browsingContextController)
    240         _data->_browsingContextController.adoptNS([[WKBrowsingContextController alloc] initWithPageRef:[self pageRef]]);
     240        _data->_browsingContextController.adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:[self pageRef]]);
    241241    return _data->_browsingContextController.get();
    242242}
Note: See TracChangeset for help on using the changeset viewer.