Title: [95661] trunk/Source/WebKit2
Revision
95661
Author
[email protected]
Date
2011-09-21 12:30:44 -0700 (Wed, 21 Sep 2011)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (95660 => 95661)


--- trunk/Source/WebKit2/ChangeLog	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/ChangeLog	2011-09-21 19:30:44 UTC (rev 95661)
@@ -1,3 +1,33 @@
+2011-09-21  Dan Bernstein  <[email protected]>
+
+        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  <[email protected]>
 
         [WK2] [Mac] Implement a more-complete MouseDown/MouseUp/MouseMoveTo functions for WebKit2 EventSender

Modified: trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h (95660 => 95661)


--- trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h	2011-09-21 19:30:44 UTC (rev 95661)
@@ -33,8 +33,8 @@
 #import "RunLoop.h"
 #import "WebKitSystemInterface.h"
 
+@class WKFindIndicatorWindowAnimation;
 @class WKView;
-@class WebFindIndicatorWindowAnimation;
 
 namespace WebKit {
 
@@ -66,10 +66,10 @@
     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

Modified: trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm (95660 => 95661)


--- trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm	2011-09-21 19:30:44 UTC (rev 95661)
@@ -36,14 +36,14 @@
 
 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 @@
 
 @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 @@
            animationDidEndCallback:(void (WebKit::FindIndicatorWindow::*)())animationDidEndCallback;
 @end
 
-@implementation WebFindIndicatorWindowAnimation
+@implementation WKFindIndicatorWindowAnimation
 
 - (id)_initWithFindIndicatorWindow:(WebKit::FindIndicatorWindow *)findIndicatorWindow 
                  animationDuration:(CFTimeInterval)animationDuration
@@ -157,7 +157,7 @@
     [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 @@
 
     // 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 @@
 {
     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]);

Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (95660 => 95661)


--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2011-09-21 19:30:44 UTC (rev 95661)
@@ -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 @@
     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;

Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm (95660 => 95661)


--- trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm	2011-09-21 19:30:44 UTC (rev 95661)
@@ -35,14 +35,14 @@
 
 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 @@
     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 @@
             [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];
             }

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (95660 => 95661)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2011-09-21 19:30:44 UTC (rev 95661)
@@ -45,10 +45,10 @@
 // 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 @@
 
 @end
 
-@implementation WebInspectorProxyObjCAdapter
+@implementation WKWebInspectorProxyObjCAdapter
 
 - (id)initWithWebInspectorProxy:(WebInspectorProxy*)inspectorProxy
 {
@@ -82,10 +82,10 @@
 
 @end
 
-@interface WebInspectorWKView : WKView
+@interface WKWebInspectorWKView : WKView
 @end
 
-@implementation WebInspectorWKView
+@implementation WKWebInspectorWKView
 
 - (NSInteger)tag
 {
@@ -101,7 +101,7 @@
     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 @@
 {
     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];

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (95660 => 95661)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-09-21 19:30:44 UTC (rev 95661)
@@ -4031,7 +4031,7 @@
 			);
 			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;

Modified: trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm (95660 => 95661)


--- trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2011-09-21 19:24:38 UTC (rev 95660)
+++ trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2011-09-21 19:30:44 UTC (rev 95661)
@@ -62,7 +62,7 @@
 @end
 #endif
 
-@interface WebFullScreenManagerAnimationListener : NSObject {
+@interface WKFullScreenManagerAnimationListener : NSObject {
     WebKit::WebFullScreenManager* _manager;
     AnimationBeganFunction _began;
     AnimationFinishedFunction _finished;
@@ -73,7 +73,7 @@
 - (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 @@
 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()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to