[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
timothy at apple.com
timothy at apple.com
Wed Dec 22 14:57:13 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e06937714af980be3b66c99eee5aa58e84031a6e
Author: timothy at apple.com <timothy at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 25 23:43:32 2010 +0000
Stub out WebInspector objects and WKInspectorRef API.
https://webkit.org/b/48265
Reviewed by Anders Carlsson.
* Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
* Shared/API/c/WKBase.h: Added WKInspectorRef.
* Shared/APIObject.h: Added TypeInspector.
* UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
* UIProcess/API/C/WKInspector.cpp: Added.
(WKInspectorGetTypeID):
(WKInspectorGetPage):
* UIProcess/API/C/WKInspector.h: Added.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetInspector): Added.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebInspectorProxy.cpp: Added.
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::~WebInspectorProxy):
(WebKit::WebInspectorProxy::invalidate):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::create):
(WebKit::WebInspectorProxy::page):
(WebKit::WebInspectorProxy::type):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
* UIProcess/WebPageProxy.h:
* WebKit2.pro: Added new files.
* WebKit2.xcodeproj/project.pbxproj: Added new files.
* WebProcess/WebPage/WebInspector.cpp: Added.
(WebKit::WebInspector::WebInspector):
* WebProcess/WebPage/WebInspector.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspector): Lazily create the WebInspector.
* WebProcess/WebPage/WebPage.h:
* win/WebKit2.vcproj: Added new files.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 5b8db97..47142e5 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,43 @@
+2010-10-25 Timothy Hatcher <timothy at apple.com>
+
+ Stub out WebInspector objects and WKInspectorRef API.
+
+ https://webkit.org/b/48265
+
+ Reviewed by Anders Carlsson.
+
+ * Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
+ * Shared/API/c/WKBase.h: Added WKInspectorRef.
+ * Shared/APIObject.h: Added TypeInspector.
+ * UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
+ * UIProcess/API/C/WKInspector.cpp: Added.
+ (WKInspectorGetTypeID):
+ (WKInspectorGetPage):
+ * UIProcess/API/C/WKInspector.h: Added.
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetInspector): Added.
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebInspectorProxy.cpp: Added.
+ (WebKit::WebInspectorProxy::WebInspectorProxy):
+ (WebKit::WebInspectorProxy::~WebInspectorProxy):
+ (WebKit::WebInspectorProxy::invalidate):
+ * UIProcess/WebInspectorProxy.h:
+ (WebKit::WebInspectorProxy::create):
+ (WebKit::WebInspectorProxy::page):
+ (WebKit::WebInspectorProxy::type):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
+ * UIProcess/WebPageProxy.h:
+ * WebKit2.pro: Added new files.
+ * WebKit2.xcodeproj/project.pbxproj: Added new files.
+ * WebProcess/WebPage/WebInspector.cpp: Added.
+ (WebKit::WebInspector::WebInspector):
+ * WebProcess/WebPage/WebInspector.h: Added.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::inspector): Lazily create the WebInspector.
+ * WebProcess/WebPage/WebPage.h:
+ * win/WebKit2.vcproj: Added new files.
+
2010-10-25 Anders Carlsson <andersca at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebKit2/Platform/CoreIPC/MessageID.h b/WebKit2/Platform/CoreIPC/MessageID.h
index 91b085e..aaade4c 100644
--- a/WebKit2/Platform/CoreIPC/MessageID.h
+++ b/WebKit2/Platform/CoreIPC/MessageID.h
@@ -35,17 +35,19 @@ enum MessageClass {
MessageClassCoreIPC,
// Messages sent by the UI process to the web process.
- MessageClassWebProcess,
+ MessageClassDrawingArea,
MessageClassInjectedBundle,
+ MessageClassWebInspector,
MessageClassWebPage,
- MessageClassDrawingArea,
+ MessageClassWebProcess,
// Messages sent by the web process to the UI process.
+ MessageClassDrawingAreaProxy,
MessageClassWebContext,
- MessageClassWebProcessProxy,
+ MessageClassWebInspectorProxy,
MessageClassWebPageProxy,
- MessageClassDrawingAreaProxy,
-
+ MessageClassWebProcessProxy,
+
// Messages sent by the UI process to the plug-in process.
MessageClassPluginProcess,
diff --git a/WebKit2/Shared/API/c/WKBase.h b/WebKit2/Shared/API/c/WKBase.h
index da4dfb7..3a9c232 100644
--- a/WebKit2/Shared/API/c/WKBase.h
+++ b/WebKit2/Shared/API/c/WKBase.h
@@ -64,6 +64,7 @@ typedef const struct OpaqueWKContext* WKContextRef;
typedef const struct OpaqueWKFormSubmissionListener* WKFormSubmissionListenerRef;
typedef const struct OpaqueWKFrame* WKFrameRef;
typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
+typedef const struct OpaqueWKInspector* WKInspectorRef;
typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
typedef const struct OpaqueWKPage* WKPageRef;
typedef const struct OpaqueWKPageNamespace* WKPageNamespaceRef;
diff --git a/WebKit2/Shared/APIObject.h b/WebKit2/Shared/APIObject.h
index 38fbb3a..a4a9e12 100644
--- a/WebKit2/Shared/APIObject.h
+++ b/WebKit2/Shared/APIObject.h
@@ -56,6 +56,7 @@ public:
TypeBackForwardList,
TypeBackForwardListItem,
TypeContext,
+ TypeInspector,
TypeFormSubmissionListener,
TypeFrame,
TypeFramePolicyListener,
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index 5e9f353..2553485 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -41,6 +41,7 @@ class WebContext;
class WebFormSubmissionListenerProxy;
class WebFramePolicyListenerProxy;
class WebFrameProxy;
+class WebInspectorProxy;
class WebNavigationData;
class WebPageNamespace;
class WebPageProxy;
@@ -52,6 +53,7 @@ WK_ADD_API_MAPPING(WKContextRef, WebContext)
WK_ADD_API_MAPPING(WKFormSubmissionListenerRef, WebFormSubmissionListenerProxy)
WK_ADD_API_MAPPING(WKFramePolicyListenerRef, WebFramePolicyListenerProxy)
WK_ADD_API_MAPPING(WKFrameRef, WebFrameProxy)
+WK_ADD_API_MAPPING(WKInspectorRef, WebInspectorProxy)
WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
WK_ADD_API_MAPPING(WKPageNamespaceRef, WebPageNamespace)
WK_ADD_API_MAPPING(WKPageRef, WebPageProxy)
diff --git a/WebKit2/UIProcess/API/C/WKInspector.cpp b/WebKit2/UIProcess/API/C/WKInspector.cpp
new file mode 100644
index 0000000..2f11b78
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKInspector.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "WKInspector.h"
+
+#include "WKAPICast.h"
+#include "WebInspectorProxy.h"
+
+using namespace WebKit;
+
+WKTypeID WKInspectorGetTypeID()
+{
+ return toAPI(WebInspectorProxy::APIType);
+}
+
+WKPageRef WKInspectorGetPage(WKInspectorRef inspectorRef)
+{
+ return toAPI(toImpl(inspectorRef)->page());
+}
diff --git a/WebKit2/UIProcess/API/C/WKInspector.h b/WebKit2/UIProcess/API/C/WKInspector.h
new file mode 100644
index 0000000..8009ff1
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKInspector.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#ifndef WKInspector_h
+#define WKInspector_h
+
+#include <WebKit2/WKBase.h>
+
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKInspectorGetTypeID();
+
+WK_EXPORT WKPageRef WKInspectorGetPage(WKInspectorRef inspector);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // WKInspector_h
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index 36a7ef9..71bfa7c 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -142,6 +142,11 @@ WKFrameRef WKPageGetMainFrame(WKPageRef pageRef)
return toAPI(toImpl(pageRef)->mainFrame());
}
+WKInspectorRef WKPageGetInspector(WKPageRef pageRef)
+{
+ return toAPI(toImpl(pageRef)->inspector());
+}
+
double WKPageGetEstimatedProgress(WKPageRef pageRef)
{
return toImpl(pageRef)->estimatedProgress();
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 8a92412..8834b37 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -208,6 +208,8 @@ WK_EXPORT WKStringRef WKPageCopyTitle(WKPageRef page);
WK_EXPORT WKFrameRef WKPageGetMainFrame(WKPageRef page);
WK_EXPORT double WKPageGetEstimatedProgress(WKPageRef page);
+WK_EXPORT WKInspectorRef WKPageGetInspector(WKPageRef page);
+
WK_EXPORT void WKPageSetCustomUserAgent(WKPageRef page, WKStringRef userAgent);
WK_EXPORT void WKPageTerminate(WKPageRef page);
diff --git a/WebKit2/UIProcess/WebInspectorProxy.cpp b/WebKit2/UIProcess/WebInspectorProxy.cpp
new file mode 100644
index 0000000..3f3ab12
--- /dev/null
+++ b/WebKit2/UIProcess/WebInspectorProxy.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "WebInspectorProxy.h"
+
+#include "WebPageProxy.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebInspectorProxy::WebInspectorProxy(WebPageProxy* page)
+ : m_page(page)
+{
+}
+
+WebInspectorProxy::~WebInspectorProxy()
+{
+}
+
+void WebInspectorProxy::invalidate()
+{
+ m_page = 0;
+}
+
+} // namespace WebKit
diff --git a/WebKit2/UIProcess/WebInspectorProxy.h b/WebKit2/UIProcess/WebInspectorProxy.h
new file mode 100644
index 0000000..c08f11b
--- /dev/null
+++ b/WebKit2/UIProcess/WebInspectorProxy.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#ifndef WebInspectorProxy_h
+#define WebInspectorProxy_h
+
+#include "APIObject.h"
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+class WebPageProxy;
+
+class WebInspectorProxy : public APIObject {
+public:
+ static const Type APIType = TypeInspector;
+
+ static PassRefPtr<WebInspectorProxy> create(WebPageProxy* page)
+ {
+ return adoptRef(new WebInspectorProxy(page));
+ }
+
+ ~WebInspectorProxy();
+
+ void invalidate();
+
+ WebPageProxy* page() { return m_page; }
+
+private:
+ WebInspectorProxy(WebPageProxy* page);
+
+ virtual Type type() const { return APIType; }
+
+ WebPageProxy* m_page;
+};
+
+} // namespace WebKit
+
+#endif // WebInspectorProxy_h
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 5beeeea..304616a 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -919,6 +919,15 @@ void WebPageProxy::didDraw()
m_uiClient.didDraw(this);
}
+// Inspector
+
+WebInspectorProxy* WebPageProxy::inspector()
+{
+ if (!m_inspector)
+ m_inspector = WebInspectorProxy::create(this);
+ return m_inspector.get();
+}
+
// BackForwardList
void WebPageProxy::backForwardAddItem(uint64_t itemID)
@@ -1164,6 +1173,11 @@ void WebPageProxy::processDidCrash()
m_mainFrame = 0;
+ if (m_inspector) {
+ m_inspector->invalidate();
+ m_inspector = 0;
+ }
+
m_pageTitle = String();
m_toolTip = String();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index db3a950..e48f5e2 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -37,6 +37,7 @@
#include "WebFormClient.h"
#include "WebFrameProxy.h"
#include "WebHistoryClient.h"
+#include "WebInspectorProxy.h"
#include "WebLoaderClient.h"
#include "WebPolicyClient.h"
#include "WebUIClient.h"
@@ -108,6 +109,8 @@ public:
WebBackForwardList* backForwardList() { return m_backForwardList.get(); }
+ WebInspectorProxy* inspector();
+
void setPageClient(PageClient*);
void initializeLoaderClient(const WKPageLoaderClient*);
void initializePolicyClient(const WKPagePolicyClient*);
@@ -324,6 +327,8 @@ private:
RefPtr<WebFrameProxy> m_mainFrame;
String m_pageTitle;
+ RefPtr<WebInspectorProxy> m_inspector;
+
HashMap<uint64_t, RefPtr<ScriptReturnValueCallback> > m_scriptReturnValueCallbacks;
HashMap<uint64_t, RefPtr<RenderTreeExternalRepresentationCallback> > m_renderTreeExternalRepresentationCallbacks;
HashMap<uint64_t, RefPtr<FrameSourceCallback> > m_frameSourceCallbacks;
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index f04d52e..c8fbc48 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -229,6 +229,7 @@ HEADERS += \
UIProcess/API/C/WKContextPrivate.h \
UIProcess/API/C/WKFrame.h \
UIProcess/API/C/WKFramePolicyListener.h \
+ UIProcess/API/C/WKInspector.h \
UIProcess/API/C/WKNavigationData.h \
UIProcess/API/C/WKPage.h \
UIProcess/API/C/WKPageNamespace.h \
@@ -268,6 +269,7 @@ HEADERS += \
UIProcess/WebFramePolicyListenerProxy.h \
UIProcess/WebFrameProxy.h \
UIProcess/WebHistoryClient.h \
+ UIProcess/WebInspectorProxy.h \
UIProcess/WebLoaderClient.h \
UIProcess/WebNavigationData.h \
UIProcess/WebPageNamespace.h \
@@ -321,6 +323,7 @@ HEADERS += \
WebProcess/WebPage/PageOverlay.h \
WebProcess/WebPage/WebEditCommand.h \
WebProcess/WebPage/WebFrame.h \
+ WebProcess/WebPage/WebInspector.h \
WebProcess/WebPage/WebPage.h \
WebProcess/WebProcess.h \
$$WEBKIT2_GENERATED_HEADERS
@@ -377,6 +380,7 @@ SOURCES += \
UIProcess/API/C/WKContext.cpp \
UIProcess/API/C/WKFrame.cpp \
UIProcess/API/C/WKFramePolicyListener.cpp \
+ UIProcess/API/C/WKInspector.cpp \
UIProcess/API/C/WKNavigationData.cpp \
UIProcess/API/C/WKPage.cpp \
UIProcess/API/C/WKPageNamespace.cpp \
@@ -412,6 +416,7 @@ SOURCES += \
UIProcess/WebFramePolicyListenerProxy.cpp \
UIProcess/WebFrameProxy.cpp \
UIProcess/WebHistoryClient.cpp \
+ UIProcess/WebInspectorProxy.cpp \
UIProcess/WebLoaderClient.cpp \
UIProcess/WebNavigationData.cpp \
UIProcess/WebPageNamespace.cpp \
@@ -469,6 +474,7 @@ SOURCES += \
WebProcess/WebPage/PageOverlay.cpp \
WebProcess/WebPage/WebEditCommand.cpp \
WebProcess/WebPage/WebFrame.cpp \
+ WebProcess/WebPage/WebInspector.cpp \
WebProcess/WebPage/WebPage.cpp \
WebProcess/WebPage/WebBackForwardListProxy.cpp \
WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 06b408d..ff1d167 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -147,6 +147,12 @@
1AEFD2F711D1807B008219D3 /* ArgumentCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEFD2F611D1807B008219D3 /* ArgumentCoders.h */; };
1C8E25A81270E3BB00BC7BD0 /* WebInspectorFrontendClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */; };
1C8E25A91270E3BC00BC7BD0 /* WebInspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */; };
+ 1C8E28201275D15400BC7BD0 /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E281E1275D15400BC7BD0 /* WebInspector.h */; };
+ 1C8E28211275D15400BC7BD0 /* WebInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */; };
+ 1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */; };
+ 1C8E28351275D73800BC7BD0 /* WebInspectorProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E28331275D73800BC7BD0 /* WebInspectorProxy.cpp */; };
+ 1C8E293912761E5B00BC7BD0 /* WKInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E293712761E5B00BC7BD0 /* WKInspector.h */; };
+ 1C8E293A12761E5B00BC7BD0 /* WKInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E293812761E5B00BC7BD0 /* WKInspector.cpp */; };
51578B831209ECEF00A37C4A /* WebData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578B821209ECEF00A37C4A /* WebData.h */; };
516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
51A7F2F3125BF820008AEB1D /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A7F2F2125BF820008AEB1D /* Logging.h */; };
@@ -622,6 +628,12 @@
1AEFD2F611D1807B008219D3 /* ArgumentCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCoders.h; sourceTree = "<group>"; };
1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorFrontendClient.h; sourceTree = "<group>"; };
1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorFrontendClient.cpp; sourceTree = "<group>"; };
+ 1C8E281E1275D15400BC7BD0 /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; };
+ 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspector.cpp; sourceTree = "<group>"; };
+ 1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxy.h; sourceTree = "<group>"; };
+ 1C8E28331275D73800BC7BD0 /* WebInspectorProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorProxy.cpp; sourceTree = "<group>"; };
+ 1C8E293712761E5B00BC7BD0 /* WKInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKInspector.h; sourceTree = "<group>"; };
+ 1C8E293812761E5B00BC7BD0 /* WKInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKInspector.cpp; sourceTree = "<group>"; };
32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
51578B821209ECEF00A37C4A /* WebData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebData.h; sourceTree = "<group>"; };
516A4A5B120A2CCD00C05B7F /* WebError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebError.h; sourceTree = "<group>"; };
@@ -979,6 +991,8 @@
);
name = Products;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
0867D691FE84028FC02AAC07 /* WebKit2 */ = {
isa = PBXGroup;
@@ -1008,6 +1022,8 @@
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
089C1665FE841158C02AAC07 /* Resources */ = {
isa = PBXGroup;
@@ -1019,6 +1035,8 @@
);
name = Resources;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
@@ -1061,6 +1079,8 @@
);
path = PluginProcess;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
1A0EC7FD124BD402007EF4A5 /* mac */ = {
isa = PBXGroup;
@@ -1083,6 +1103,8 @@
);
path = Configurations;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
1A6FA01C11E1526300DB1371 /* mac */ = {
isa = PBXGroup;
@@ -1219,6 +1241,8 @@
);
path = Shared;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
1AB5A1BA10E021D30040F6CF /* CoreIPC */ = {
isa = PBXGroup;
@@ -1277,6 +1301,8 @@
);
name = "Other Sources";
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
51B3004D12529CF5000B5CA0 /* cf */ = {
isa = PBXGroup;
@@ -1303,6 +1329,8 @@
);
path = WebProcess;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
BC032D5D10F437220058C15A /* WebCoreSupport */ = {
isa = PBXGroup;
@@ -1357,6 +1385,8 @@
BCA0EF7D12331E78007D3CFB /* WebEditCommand.h */,
BC111ADC112F5B9300337BAB /* WebFrame.cpp */,
BC032D8910F437A00058C15A /* WebFrame.h */,
+ 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */,
+ 1C8E281E1275D15400BC7BD0 /* WebInspector.h */,
BC963D6A113DD19200574BE2 /* WebPage.cpp */,
BC032D8B10F437A00058C15A /* WebPage.h */,
C0CE72581247E4DA00BC0EC4 /* WebPage.messages.in */,
@@ -1412,6 +1442,8 @@
BC9B389F10F538BE00443A15 /* WebFrameProxy.h */,
BCF69F841176CD6F00471A52 /* WebHistoryClient.cpp */,
BCF69F851176CD6F00471A52 /* WebHistoryClient.h */,
+ 1C8E28331275D73800BC7BD0 /* WebInspectorProxy.cpp */,
+ 1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */,
BCB9E76111232B9E00A137E0 /* WebLoaderClient.cpp */,
BC59534010FC04520098F82D /* WebLoaderClient.h */,
BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
@@ -1435,6 +1467,8 @@
);
path = UIProcess;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
BC032DC410F4387C0058C15A /* API */ = {
isa = PBXGroup;
@@ -1464,6 +1498,8 @@
BCD01397110FA420003B8A67 /* WKFrame.h */,
BCB9F6A41123DD0D00A137E0 /* WKFramePolicyListener.cpp */,
BCB9F6A31123DD0D00A137E0 /* WKFramePolicyListener.h */,
+ 1C8E293812761E5B00BC7BD0 /* WKInspector.cpp */,
+ 1C8E293712761E5B00BC7BD0 /* WKInspector.h */,
C09AE5E8125257C20025825D /* WKNativeEvent.h */,
BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */,
BCF69FA71176D1CB00471A52 /* WKNavigationData.h */,
@@ -1645,6 +1681,8 @@
);
path = Platform;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
BC4075D5124FEFFA0068F20A /* cf */ = {
isa = PBXGroup;
@@ -1739,12 +1777,12 @@
BCDDB314124EBCEF0048D13C /* API */ = {
isa = PBXGroup;
children = (
- BCDDB315124EBCFE0048D13C /* c */,
+ BCDDB315124EBCFE0048D13C /* C */,
);
path = API;
sourceTree = "<group>";
};
- BCDDB315124EBCFE0048D13C /* c */ = {
+ BCDDB315124EBCFE0048D13C /* C */ = {
isa = PBXGroup;
children = (
BC4075D5124FEFFA0068F20A /* cf */,
@@ -1786,6 +1824,7 @@
F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */,
F6113E27126CE19B0057D0A7 /* WKUserContentURLPattern.h */,
);
+ name = C;
path = c;
sourceTree = "<group>";
};
@@ -1820,6 +1859,8 @@
name = "Derived Sources";
path = DerivedSources/WebKit2;
sourceTree = BUILT_PRODUCTS_DIR;
+ tabWidth = 8;
+ usesTabs = 0;
};
C0CE73351247F70E00BC0EC4 /* Scripts */ = {
isa = PBXGroup;
@@ -1830,6 +1871,8 @@
);
path = Scripts;
sourceTree = "<group>";
+ tabWidth = 8;
+ usesTabs = 0;
};
C0CE73381247F70E00BC0EC4 /* webkit2 */ = {
isa = PBXGroup;
@@ -2067,6 +2110,9 @@
F6113E25126CE1820057D0A7 /* WebUserContentURLPattern.h in Headers */,
F6113E29126CE19B0057D0A7 /* WKUserContentURLPattern.h in Headers */,
1C8E25A91270E3BC00BC7BD0 /* WebInspectorFrontendClient.h in Headers */,
+ 1C8E28201275D15400BC7BD0 /* WebInspector.h in Headers */,
+ 1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */,
+ 1C8E293912761E5B00BC7BD0 /* WKInspector.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2377,6 +2423,9 @@
F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */,
BC575613126E0138006F0F12 /* WebError.cpp in Sources */,
1C8E25A81270E3BB00BC7BD0 /* WebInspectorFrontendClient.cpp in Sources */,
+ 1C8E28211275D15400BC7BD0 /* WebInspector.cpp in Sources */,
+ 1C8E28351275D73800BC7BD0 /* WebInspectorProxy.cpp in Sources */,
+ 1C8E293A12761E5B00BC7BD0 /* WKInspector.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/WebPage/WebInspector.cpp b/WebKit2/WebProcess/WebPage/WebInspector.cpp
new file mode 100644
index 0000000..0e6e517
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/WebInspector.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "WebInspector.h"
+
+#include "WebPage.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebInspector::WebInspector(WebPage* page)
+ : m_page(page)
+{
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/WebInspector.h b/WebKit2/WebProcess/WebPage/WebInspector.h
new file mode 100644
index 0000000..2148d3e
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/WebInspector.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#ifndef WebInspector_h
+#define WebInspector_h
+
+#include "Connection.h"
+#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebKit {
+
+class WebPage;
+
+class WebInspector {
+ WTF_MAKE_NONCOPYABLE(WebInspector);
+
+public:
+ explicit WebInspector(WebPage*);
+
+private:
+ WebPage* m_page;
+};
+
+} // namespace WebKit
+
+#endif // WebInspector_h
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 9bd5514..eb860e4 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -45,6 +45,7 @@
#include "WebEvent.h"
#include "WebEventConversion.h"
#include "WebFrame.h"
+#include "WebInspector.h"
#include "WebInspectorClient.h"
#include "WebPageCreationParameters.h"
#include "WebPageProxyMessages.h"
@@ -750,6 +751,13 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
platformPreferencesDidChange(store);
}
+WebInspector* WebPage::inspector()
+{
+ if (!m_inspector)
+ m_inspector = adoptPtr(new WebInspector(this));
+ return m_inspector.get();
+}
+
bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
{
Node* node = evt->target()->toNode();
@@ -770,7 +778,7 @@ bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
return !command.isTextInsertion() && command.execute(evt);
}
- if (command.execute(evt))
+ if (command.execute(evt))
return true;
// Don't insert null or control characters as they can result in unexpected behaviour
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 5545ddd..4bf2e7f 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -68,6 +68,7 @@ class PageOverlay;
class PluginView;
class WebEvent;
class WebFrame;
+class WebInspector;
class WebKeyboardEvent;
class WebMouseEvent;
class WebPopupMenu;
@@ -95,6 +96,8 @@ public:
DrawingArea* drawingArea() const { return m_drawingArea.get(); }
+ WebInspector* inspector();
+
// -- Called by the DrawingArea.
// FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
@@ -272,6 +275,8 @@ private:
FindController m_findController;
OwnPtr<PageOverlay> m_pageOverlay;
+ OwnPtr<WebInspector> m_inspector;
+
RefPtr<WebPopupMenu> m_activePopupMenu;
uint64_t m_pageID;
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 8efe0ec..27f139b 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1188,6 +1188,14 @@
>
</File>
<File
+ RelativePath="..\WebProcess\WebPage\WebInspector.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebProcess\WebPage\WebInspector.h"
+ >
+ </File>
+ <File
RelativePath="..\WebProcess\WebPage\WebPage.cpp"
>
</File>
@@ -1669,6 +1677,14 @@
>
</File>
<File
+ RelativePath="..\UIProcess\WebInspectorProxy.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\UIProcess\WebInspectorProxy.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\WebLoaderClient.cpp"
>
</File>
@@ -1819,6 +1835,14 @@
>
</File>
<File
+ RelativePath="..\UIProcess\API\C\WKInspector.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\UIProcess\API\C\WKInspector.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\API\C\WKNativeEvent.h"
>
</File>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list