Use the prefix "WK" instead of "Web" for Objective-C classes defined in WebKit2.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 19:30:44 +0000 (19:30 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 19:30:44 +0000 (19:30 +0000)
Reviewed by Anders Carlsson.

Renamed WebInspectorProxyObjCAdapter to WKWebInspectorProxyObjCAdapter.
Renamed WebInspectorWKView to WKWebInspectorWKView.
Renamed WebFindIndicatorWindowAnimation to WKFindIndicatorWindowAnimation.
Renamed WebFindIndicatorView to WKFindIndicatorView.
Renamed WebUserDataWrapper to WKUserDataWrapper.

Updated the build phase checking for inappropriate Objective-C class names to disallow the prefix
"Web" and only allow "WK".

* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/FindIndicatorWindow.mm:
(WebKit::FindIndicatorWindow::setFindIndicator):
(WebKit::FindIndicatorWindow::startFadeOutTimerFired):
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItemVector):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformOpen):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h
Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
Source/WebKit2/UIProcess/WebInspectorProxy.h
Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm

index 761ba4c1600b1ebae2b207a127112ce93031f650..c881ba8f124f096d05e6e7326dc229853a73a7e8 100644 (file)
@@ -1,3 +1,33 @@
+2011-09-21  Dan Bernstein  <mitz@apple.com>
+
+        Use the prefix "WK" instead of "Web" for Objective-C classes defined in WebKit2.
+
+        Reviewed by Anders Carlsson.
+
+        Renamed WebInspectorProxyObjCAdapter to WKWebInspectorProxyObjCAdapter.
+        Renamed WebInspectorWKView to WKWebInspectorWKView.
+        Renamed WebFindIndicatorWindowAnimation to WKFindIndicatorWindowAnimation.
+        Renamed WebFindIndicatorView to WKFindIndicatorView.
+        Renamed WebUserDataWrapper to WKUserDataWrapper.
+
+        Updated the build phase checking for inappropriate Objective-C class names to disallow the prefix
+        "Web" and only allow "WK".
+
+        * UIProcess/API/mac/FindIndicatorWindow.h:
+        * UIProcess/API/mac/FindIndicatorWindow.mm:
+        (WebKit::FindIndicatorWindow::setFindIndicator):
+        (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
+        * UIProcess/WebInspectorProxy.h:
+        * UIProcess/mac/WebContextMenuProxyMac.mm:
+        (-[WKMenuTarget forwardContextMenuAction:]):
+        (WebKit::nsMenuItemVector):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        (WebKit::WebInspectorProxy::platformOpen):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
+        (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac):
+
 2011-09-21  Chang Shu  <cshu@webkit.org>
 
         [WK2] [Mac] Implement a more-complete MouseDown/MouseUp/MouseMoveTo functions for WebKit2 EventSender
index e8889b6a36725c06f7967ef2ab23a32775ccc8f1..eb1b4c26bc30042aeca6f490ec8eece8aacca712 100644 (file)
@@ -33,8 +33,8 @@
 #import "RunLoop.h"
 #import "WebKitSystemInterface.h"
 
+@class WKFindIndicatorWindowAnimation;
 @class WKView;
-@class WebFindIndicatorWindowAnimation;
 
 namespace WebKit {
 
@@ -66,10 +66,10 @@ private:
     RetainPtr<NSWindow> m_findIndicatorWindow;
 
     WKWindowBounceAnimationContextRef m_bounceAnimationContext;
-    RetainPtr<WebFindIndicatorWindowAnimation> m_bounceAnimation;
+    RetainPtr<WKFindIndicatorWindowAnimation> m_bounceAnimation;
 
     RunLoop::Timer<FindIndicatorWindow> m_startFadeOutTimer;
-    RetainPtr<WebFindIndicatorWindowAnimation> m_fadeOutAnimation;
+    RetainPtr<WKFindIndicatorWindowAnimation> m_fadeOutAnimation;
 };
 
 } // namespace WebKit
index 715bba73316557aecb0aa375ece947fccf012a63..4056e1e3d4f73b9443d1e638983123d08523a3d8 100644 (file)
@@ -36,14 +36,14 @@ static const double fadeOutAnimationDuration = 0.3;
 
 using namespace WebCore;
 
-@interface WebFindIndicatorView : NSView {
+@interface WKFindIndicatorView : NSView {
     RefPtr<WebKit::FindIndicator> _findIndicator;
 }
 
 - (id)_initWithFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator;
 @end
 
-@implementation WebFindIndicatorView
+@implementation WKFindIndicatorView
 
 - (id)_initWithFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator
 {
@@ -67,7 +67,7 @@ using namespace WebCore;
 
 @end
 
-@interface WebFindIndicatorWindowAnimation : NSAnimation<NSAnimationDelegate> {
+@interface WKFindIndicatorWindowAnimation : NSAnimation<NSAnimationDelegate> {
     WebKit::FindIndicatorWindow* _findIndicatorWindow;
     void (WebKit::FindIndicatorWindow::*_animationProgressCallback)(double progress);
     void (WebKit::FindIndicatorWindow::*_animationDidEndCallback)();
@@ -79,7 +79,7 @@ using namespace WebCore;
            animationDidEndCallback:(void (WebKit::FindIndicatorWindow::*)())animationDidEndCallback;
 @end
 
-@implementation WebFindIndicatorWindowAnimation
+@implementation WKFindIndicatorWindowAnimation
 
 - (id)_initWithFindIndicatorWindow:(WebKit::FindIndicatorWindow *)findIndicatorWindow 
                  animationDuration:(CFTimeInterval)animationDuration
@@ -157,7 +157,7 @@ void FindIndicatorWindow::setFindIndicator(PassRefPtr<FindIndicator> findIndicat
     [m_findIndicatorWindow.get() setOpaque:NO];
     [m_findIndicatorWindow.get() setIgnoresMouseEvents:YES];
 
-    RetainPtr<WebFindIndicatorView> findIndicatorView(AdoptNS, [[WebFindIndicatorView alloc] _initWithFindIndicator:m_findIndicator]);
+    RetainPtr<WKFindIndicatorView> findIndicatorView(AdoptNS, [[WKFindIndicatorView alloc] _initWithFindIndicator:m_findIndicator]);
     [m_findIndicatorWindow.get() setContentView:findIndicatorView.get()];
 
     [[m_wkView window] addChildWindow:m_findIndicatorWindow.get() ordered:NSWindowAbove];
@@ -165,7 +165,7 @@ void FindIndicatorWindow::setFindIndicator(PassRefPtr<FindIndicator> findIndicat
 
     // Start the bounce animation.
     m_bounceAnimationContext = WKWindowBounceAnimationContextCreate(m_findIndicatorWindow.get());
-    m_bounceAnimation.adoptNS([[WebFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
+    m_bounceAnimation.adoptNS([[WKFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
                                                                                   animationDuration:bounceAnimationDuration
                                                                           animationProgressCallback:&FindIndicatorWindow::bounceAnimationCallback
                                                                             animationDidEndCallback:&FindIndicatorWindow::bounceAnimationDidEnd]);
@@ -204,7 +204,7 @@ void FindIndicatorWindow::startFadeOutTimerFired()
 {
     ASSERT(!m_fadeOutAnimation);
     
-    m_fadeOutAnimation.adoptNS([[WebFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
+    m_fadeOutAnimation.adoptNS([[WKFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
                                                                                    animationDuration:fadeOutAnimationDuration
                                                                            animationProgressCallback:&FindIndicatorWindow::fadeOutAnimationCallback
                                                                              animationDidEndCallback:&FindIndicatorWindow::fadeOutAnimationDidEnd]);
index df8dda63c2dd2d3bf99c064c32471293ee186fbd..b9591b9a1622b8ea36e6c4e7cfc5029c6ba27be1 100644 (file)
@@ -38,8 +38,8 @@
 #include <wtf/RetainPtr.h>
 
 OBJC_CLASS NSWindow;
-OBJC_CLASS WebInspectorProxyObjCAdapter;
-OBJC_CLASS WebInspectorWKView;
+OBJC_CLASS WKWebInspectorProxyObjCAdapter;
+OBJC_CLASS WKWebInspectorWKView;
 #endif
 
 #if PLATFORM(WIN)
@@ -168,9 +168,9 @@ private:
     bool m_isProfilingPage;
 
 #if PLATFORM(MAC)
-    RetainPtr<WebInspectorWKView> m_inspectorView;
+    RetainPtr<WKWebInspectorWKView> m_inspectorView;
     RetainPtr<NSWindow> m_inspectorWindow;
-    RetainPtr<WebInspectorProxyObjCAdapter> m_inspectorProxyObjCAdapter;
+    RetainPtr<WKWebInspectorProxyObjCAdapter> m_inspectorProxyObjCAdapter;
 #elif PLATFORM(WIN)
     HWND m_inspectorWindow;
     RefPtr<WebView> m_inspectorView;
index fd0f534135979842ce4336a0b452a0026ec1875b..81552dc5e1be48e28ea48cb0c11f5042f40e3093 100644 (file)
 
 using namespace WebCore;
 
-@interface WebUserDataWrapper : NSObject {
+@interface WKUserDataWrapper : NSObject {
     RefPtr<WebKit::APIObject> _webUserData;
 }
 - (id)initWithUserData:(WebKit::APIObject*)userData;
 - (WebKit::APIObject*)userData;
 @end
 
-@implementation WebUserDataWrapper
+@implementation WKUserDataWrapper
 
 - (id)initWithUserData:(WebKit::APIObject*)userData
 {
@@ -93,8 +93,8 @@ using namespace WebCore;
     WebKit::WebContextMenuItemData item(ActionType, static_cast<ContextMenuAction>([sender tag]), [sender title], [sender isEnabled], [sender state] == NSOnState);
     
     if (id representedObject = [sender representedObject]) {
-        ASSERT([representedObject isKindOfClass:[WebUserDataWrapper class]]);
-        item.setUserData([static_cast<WebUserDataWrapper *>(representedObject) userData]);
+        ASSERT([representedObject isKindOfClass:[WKUserDataWrapper class]]);
+        item.setUserData([static_cast<WKUserDataWrapper *>(representedObject) userData]);
     }
             
     _menuProxy->contextMenuItemSelected(item);
@@ -146,7 +146,7 @@ static Vector<RetainPtr<NSMenuItem> > nsMenuItemVector(const Vector<WebContextMe
             [menuItem setState:items[i].checked() ? NSOnState : NSOffState];
                         
             if (items[i].userData()) {
-                WebUserDataWrapper *wrapper = [[WebUserDataWrapper alloc] initWithUserData:items[i].userData()];
+                WKUserDataWrapper *wrapper = [[WKUserDataWrapper alloc] initWithUserData:items[i].userData()];
                 [menuItem setRepresentedObject:wrapper];
                 [wrapper release];
             }
index f50a123f386e18974e1e4a9a8c318a3922c6d53b..73917b1620b9dc91a78d3521579272e5fbafb814 100644 (file)
@@ -45,10 +45,10 @@ using namespace WebKit;
 // The height needed to match a typical NSToolbar.
 static const CGFloat windowContentBorderThickness = 55;
 
-// WebInspectorProxyObjCAdapter is a helper ObjC object used as a delegate or notification observer
+// WKWebInspectorProxyObjCAdapter is a helper ObjC object used as a delegate or notification observer
 // for the sole purpose of getting back into the C++ code from an ObjC caller.
 
-@interface WebInspectorProxyObjCAdapter : NSObject <NSWindowDelegate> {
+@interface WKWebInspectorProxyObjCAdapter : NSObject <NSWindowDelegate> {
     WebInspectorProxy* _inspectorProxy; // Not retained to prevent cycles
 }
 
@@ -56,7 +56,7 @@ static const CGFloat windowContentBorderThickness = 55;
 
 @end
 
-@implementation WebInspectorProxyObjCAdapter
+@implementation WKWebInspectorProxyObjCAdapter
 
 - (id)initWithWebInspectorProxy:(WebInspectorProxy*)inspectorProxy
 {
@@ -82,10 +82,10 @@ static const CGFloat windowContentBorderThickness = 55;
 
 @end
 
-@interface WebInspectorWKView : WKView
+@interface WKWebInspectorWKView : WKView
 @end
 
-@implementation WebInspectorWKView
+@implementation WKWebInspectorWKView
 
 - (NSInteger)tag
 {
@@ -101,7 +101,7 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
     ASSERT(m_page);
     ASSERT(!m_inspectorView);
 
-    m_inspectorView.adoptNS([[WebInspectorWKView alloc] initWithFrame:NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight) contextRef:toAPI(page()->process()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
+    m_inspectorView.adoptNS([[WKWebInspectorWKView alloc] initWithFrame:NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight) contextRef:toAPI(page()->process()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
     ASSERT(m_inspectorView);
 
     [m_inspectorView.get() setDrawsBackground:NO];
@@ -113,7 +113,7 @@ void WebInspectorProxy::platformOpen()
 {
     ASSERT(!m_inspectorWindow);
 
-    m_inspectorProxyObjCAdapter.adoptNS([[WebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]);
+    m_inspectorProxyObjCAdapter.adoptNS([[WKWebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]);
 
     NSUInteger styleMask = (NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask | NSTexturedBackgroundWindowMask);
     NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
index ec8742769b2046387ef2931787b18c99077dc217..f4f5852e21968016bbc41786c54beb0e5b4cfe3a 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names WK Web || exit $?\nfi";
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names WK || exit $?\nfi";
                };
                5DF408C0131DD37C00130071 /* Check For Global Initializers */ = {
                        isa = PBXShellScriptBuildPhase;
index 96b3a0f0b5c8b11d628d8eecfd29a852b00c55af..07060078dc7b16c47f25d95277fb4bd835be3091 100644 (file)
@@ -62,7 +62,7 @@ typedef void (WebKit::WebFullScreenManager::*AnimationFinishedFunction)(bool);
 @end
 #endif
 
-@interface WebFullScreenManagerAnimationListener : NSObject {
+@interface WKFullScreenManagerAnimationListener : NSObject {
     WebKit::WebFullScreenManager* _manager;
     AnimationBeganFunction _began;
     AnimationFinishedFunction _finished;
@@ -73,7 +73,7 @@ typedef void (WebKit::WebFullScreenManager::*AnimationFinishedFunction)(bool);
 - (void)invalidate;
 @end
 
-@implementation WebFullScreenManagerAnimationListener
+@implementation WKFullScreenManagerAnimationListener
 - (id)initWithManager:(WebKit::WebFullScreenManager*)manager began:(AnimationBeganFunction)began finished:(AnimationFinishedFunction)finished
 {
     self = [super init];
@@ -121,8 +121,8 @@ PassRefPtr<WebFullScreenManagerMac> WebFullScreenManagerMac::create(WebPage* pag
 WebFullScreenManagerMac::WebFullScreenManagerMac(WebPage* page)
     : WebFullScreenManager(page)
 {
-    m_enterFullScreenListener.adoptNS([[WebFullScreenManagerAnimationListener alloc] initWithManager:this began:&WebFullScreenManagerMac::beganEnterFullScreenAnimation finished:&WebFullScreenManagerMac::finishedEnterFullScreenAnimation]);
-    m_exitFullScreenListener.adoptNS([[WebFullScreenManagerAnimationListener alloc] initWithManager:this began:&WebFullScreenManagerMac::beganExitFullScreenAnimation finished:&WebFullScreenManagerMac::finishedExitFullScreenAnimation]);
+    m_enterFullScreenListener.adoptNS([[WKFullScreenManagerAnimationListener alloc] initWithManager:this began:&WebFullScreenManagerMac::beganEnterFullScreenAnimation finished:&WebFullScreenManagerMac::finishedEnterFullScreenAnimation]);
+    m_exitFullScreenListener.adoptNS([[WKFullScreenManagerAnimationListener alloc] initWithManager:this began:&WebFullScreenManagerMac::beganExitFullScreenAnimation finished:&WebFullScreenManagerMac::finishedExitFullScreenAnimation]);
 }
 
 WebFullScreenManagerMac::~WebFullScreenManagerMac()