2007-06-20 Mark Rowe <mrowe@apple.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2007 03:11:30 +0000 (03:11 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2007 03:11:30 +0000 (03:11 +0000)
        Reviewed by Adam.

        Reinstate the WebInspector class so WebKit clients that currently depend on it
        will build and run correctly.

        * WebInspector/WebInspector.h: Added.
        * WebInspector/WebInspector.mm: Added.
        (+[WebInspector webInspector]):
        (-[WebInspector dealloc]):
        (-[WebInspector setWebFrame:]):
        (-[WebInspector showWindow:]):
        * WebKit.exp:
        * WebKit.xcodeproj/project.pbxproj:

2007-06-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Adam.

        * WebCore.exp: Export InspectorController::inspect so WebKit can see it.

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

WebCore/ChangeLog
WebCore/WebCore.exp
WebKit/ChangeLog
WebKit/WebInspector/WebInspector.h [new file with mode: 0644]
WebKit/WebInspector/WebInspector.mm [new file with mode: 0644]
WebKit/WebKit.exp
WebKit/WebKit.xcodeproj/project.pbxproj

index 14ad2d2..0799bb9 100644 (file)
@@ -1,3 +1,9 @@
+2007-06-20  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Adam.
+
+        * WebCore.exp: Export InspectorController::inspect so WebKit can see it.
+
 2007-06-20  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Adele Peterson, Oliver Hunt, Anders Carlsson.
index a9d1adb..38f2e37 100644 (file)
@@ -303,6 +303,7 @@ __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
 __ZN7WebCore16NavigationActionC1Ev
 __ZN7WebCore18PlatformMouseEventC1EP7NSEvent
 __ZN7WebCore19InspectorController16setWindowVisibleEb
+__ZN7WebCore19InspectorController7inspectEPNS_4NodeE
 __ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEbRi
 __ZN7WebCore19SelectionController5clearEv
 __ZN7WebCore19SelectionController9selectAllEv
@@ -360,6 +361,7 @@ __ZN7WebCore5Frame20setSelectionFromNoneEv
 __ZN7WebCore5Frame20windowScriptNPObjectEv
 __ZN7WebCore5Frame21setProhibitsScrollingEb
 __ZN7WebCore5Frame26dashboardRegionsDictionaryEv
+__ZN7WebCore5Frame29cleanupScriptObjectsForPluginEPv
 __ZN7WebCore5Frame4initEv
 __ZN7WebCore5Frame9setBridgeEP18WebCoreFrameBridge
 __ZN7WebCore5FrameC1EPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
@@ -705,4 +707,3 @@ _wkSignalCFReadStreamEnd
 _wkSignalCFReadStreamError
 _wkSignalCFReadStreamHasBytes
 _wkSupportsMultipartXMixedReplace
-__ZN7WebCore5Frame29cleanupScriptObjectsForPluginEPv
index 0598881..5f885ad 100644 (file)
@@ -1,3 +1,19 @@
+2007-06-20  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Adam.
+
+        Reinstate the WebInspector class so WebKit clients that currently depend on it
+        will build and run correctly.
+
+        * WebInspector/WebInspector.h: Added.
+        * WebInspector/WebInspector.mm: Added.
+        (+[WebInspector webInspector]):
+        (-[WebInspector dealloc]):
+        (-[WebInspector setWebFrame:]):
+        (-[WebInspector showWindow:]):
+        * WebKit.exp:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2007-06-20  Adam Roben  <aroben@apple.com>
 
         Land the new Inspector.
diff --git a/WebKit/WebInspector/WebInspector.h b/WebKit/WebInspector/WebInspector.h
new file mode 100644 (file)
index 0000000..045267c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class WebFrame;
+@class WebView;
+
+@interface WebInspector : NSObject
+{
+    WebView *_webView;
+}
++ (WebInspector *)sharedWebInspector;
++ (WebInspector *)webInspector;
+- (void)setWebFrame:(WebFrame*)frame;
+- (void)showWindow:(id)sender;
+@end
diff --git a/WebKit/WebInspector/WebInspector.mm b/WebKit/WebInspector/WebInspector.mm
new file mode 100644 (file)
index 0000000..de669ce
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebInspector.h"
+#import "WebFrameInternal.h"
+#import "WebView.h"
+
+#include <WebCore/Document.h>
+#include <WebCore/Frame.h>
+#include <WebCore/InspectorController.h>
+#include <WebCore/Page.h>
+
+using namespace WebCore;
+
+@implementation WebInspector
+
+// This method name is used by the Safari 3 beta
++ (WebInspector *)sharedWebInspector
+{
+    return [self webInspector];
+}
+
++ (WebInspector *)webInspector
+{
+    return [[[WebInspector alloc] init] autorelease];
+}
+
+- (void)dealloc
+{
+    [_webView release];
+    [super dealloc];
+}
+
+- (void)setWebFrame:(WebFrame *)frame
+{
+    [_webView release];
+    _webView = [[frame webView] retain];
+}
+
+- (void)showWindow:(id)sender
+{
+    if (Page* page = core(_webView))
+        if (InspectorController* inspectorController = page->inspectorController())
+            inspectorController->inspect(page->mainFrame()->document());
+}
+@end
index bcfc3dd..b0676d0 100644 (file)
@@ -16,6 +16,7 @@
 .objc_class_name_WebHistory
 .objc_class_name_WebHistoryItem
 .objc_class_name_WebIconDatabase
+.objc_class_name_WebInspector
 .objc_class_name_WebJavaScriptTextInputPanel
 .objc_class_name_WebKeyGenerator
 .objc_class_name_WebKitStatistics
 _HIWebViewCreate
 _HIWebViewGetWebView
 _WebActionButtonKey
-_WebActionButtonKey
-_WebActionElementKey
 _WebActionElementKey
 _WebActionModifierFlagsKey
-_WebActionModifierFlagsKey
-_WebActionNavigationTypeKey
 _WebActionNavigationTypeKey
 _WebActionOriginalURLKey
 _WebArchivePboardType
index 4ad118d..fa282e3 100644 (file)
@@ -43,6 +43,8 @@
                51FDC4D30B0AF5C100F84EB3 /* WebHistoryItemPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FDC4D20B0AF5C100F84EB3 /* WebHistoryItemPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5241ADF50B1BC48A004012BD /* WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5241ADF30B1BC48A004012BD /* WebCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5241ADF40B1BC48A004012BD /* WebCache.mm */; };
+               5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BF8120C2A1D90008CE06D /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; };
                5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                650F74E409E488F70020118A /* WebUnarchivingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 650F74E209E488F70020118A /* WebUnarchivingState.h */; };
                650F74E509E488F70020118A /* WebUnarchivingState.m in Sources */ = {isa = PBXBuildFile; fileRef = 650F74E309E488F70020118A /* WebUnarchivingState.m */; };
                51FDC4D20B0AF5C100F84EB3 /* WebHistoryItemPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryItemPrivate.h; sourceTree = "<group>"; };
                5241ADF30B1BC48A004012BD /* WebCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCache.h; sourceTree = "<group>"; };
                5241ADF40B1BC48A004012BD /* WebCache.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCache.mm; sourceTree = "<group>"; };
+               5D7BF8120C2A1D90008CE06D /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; };
+               5D7BF8130C2A1D90008CE06D /* WebInspector.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspector.mm; sourceTree = "<group>"; };
                5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebAssertions.h; sourceTree = "<group>"; };
                650F74E209E488F70020118A /* WebUnarchivingState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebUnarchivingState.h; sourceTree = "<group>"; };
                650F74E309E488F70020118A /* WebUnarchivingState.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebUnarchivingState.m; sourceTree = "<group>"; };
                1C68F63F095B5F9C00C2984E /* WebInspector */ = {
                        isa = PBXGroup;
                        children = (
+                               5D7BF8120C2A1D90008CE06D /* WebInspector.h */,
+                               5D7BF8130C2A1D90008CE06D /* WebInspector.mm */,
                                1C68F663095B5FC100C2984E /* WebNodeHighlight.h */,
                                1C68F664095B5FC100C2984E /* WebNodeHighlight.m */,
                                1C68F665095B5FC100C2984E /* WebNodeHighlightView.h */,
                                5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */,
                                06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */,
                                BCDFA8F90C10B6F500D3A10C /* WebKitPluginContainerView.h in Headers */,
+                               5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */,
                                06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */,
                                BCDFA9130C10B93E00D3A10C /* WebKitPluginContainerView.mm in Sources */,
+                               5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };