WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
proposed patch
0001-Make-WebKit2-compile-with-ENABLE_INSPECTOR-0.patch (text/plain), 34.74 KB, created by
Andras Becsi
on 2010-11-23 08:12:08 PST
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Andras Becsi
Created:
2010-11-23 08:12:08 PST
Size:
34.74 KB
patch
obsolete
>From 8aa0a9f5bffb59fc13d4ca61d73033c8c00fa83c Mon Sep 17 00:00:00 2001 >From: Andras Becsi <abecsi@inf.u-szeged.hu> >Date: Tue, 23 Nov 2010 17:10:19 +0100 >Subject: [PATCH] Make WebKit2 compile with ENABLE_INSPECTOR=0 > >--- > WebCore/ChangeLog | 18 ++++++++ > WebCore/bindings/js/ScriptHeapSnapshot.h | 2 + > WebCore/bindings/js/ScriptProfile.cpp | 2 + > WebCore/bindings/js/ScriptProfile.h | 4 ++ > WebCore/inspector/InspectorDebuggerAgent.cpp | 4 +- > WebCore/inspector/InspectorDebuggerAgent.h | 4 +- > WebCore/inspector/InspectorProfilerAgent.cpp | 4 +- > WebCore/inspector/InspectorProfilerAgent.h | 4 +- > WebCore/inspector/ScriptBreakpoint.h | 5 ++ > WebKit/qt/Api/qwebinspector.h | 2 + > WebKit/qt/Api/qwebpage.cpp | 4 ++ > WebKit/qt/Api/qwebpage.h | 4 ++ > WebKit/qt/ChangeLog | 15 +++++++ > .../qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp | 2 +- > WebKit2/ChangeLog | 43 ++++++++++++++++++++ > WebKit2/Shared/API/c/WKSharedAPICast.h | 4 ++ > WebKit2/UIProcess/API/C/WKAPICast.h | 4 ++ > WebKit2/UIProcess/API/C/WKInspector.cpp | 4 ++ > WebKit2/UIProcess/API/C/WKInspector.h | 4 ++ > WebKit2/UIProcess/API/C/WKPage.cpp | 2 + > WebKit2/UIProcess/API/C/WKPage.h | 2 + > WebKit2/UIProcess/WebInspectorProxy.cpp | 4 ++ > WebKit2/UIProcess/WebInspectorProxy.h | 6 +++ > WebKit2/UIProcess/WebInspectorProxy.messages.in | 4 ++ > WebKit2/UIProcess/WebPageProxy.cpp | 12 +++++ > WebKit2/UIProcess/WebPageProxy.h | 8 +++- > WebKit2/UIProcess/mac/WebInspectorProxyMac.mm | 4 ++ > WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp | 4 ++ > WebKit2/UIProcess/win/WebInspectorProxyWin.cpp | 4 ++ > .../WebCoreSupport/WebInspectorClient.cpp | 4 ++ > .../WebProcess/WebCoreSupport/WebInspectorClient.h | 6 ++- > .../WebCoreSupport/WebInspectorFrontendClient.cpp | 4 ++ > .../WebCoreSupport/WebInspectorFrontendClient.h | 4 ++ > WebKit2/WebProcess/WebPage/WebInspector.cpp | 4 ++ > WebKit2/WebProcess/WebPage/WebInspector.h | 4 ++ > .../WebProcess/WebPage/WebInspector.messages.in | 4 ++ > WebKit2/WebProcess/WebPage/WebPage.cpp | 10 ++++- > WebKit2/WebProcess/WebPage/WebPage.h | 7 +++ > WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp | 4 ++ > WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp | 4 ++ > 40 files changed, 225 insertions(+), 13 deletions(-) > >diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index 35a1c31..b15e674 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2010-11-23 Andras Becsi <abecsi@inf.u-szeged.hu> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make WebKit2 compile with !ENABLE(INSPECTOR). >+ https://bugs.webkit.org/show_bug.cgi?id=49973 >+ >+ No new tests needed. >+ >+ * bindings/js/ScriptHeapSnapshot.h: >+ * bindings/js/ScriptProfile.cpp: >+ * bindings/js/ScriptProfile.h: >+ * inspector/InspectorDebuggerAgent.cpp: >+ * inspector/InspectorDebuggerAgent.h: >+ * inspector/InspectorProfilerAgent.cpp: >+ * inspector/InspectorProfilerAgent.h: >+ * inspector/ScriptBreakpoint.h: >+ > 2010-11-23 Alexander Pavlov <apavlov@chromium.org> > > Reviewed by Pavel Feldman. >diff --git a/WebCore/bindings/js/ScriptHeapSnapshot.h b/WebCore/bindings/js/ScriptHeapSnapshot.h >index c81c782..a9432ad 100644 >--- a/WebCore/bindings/js/ScriptHeapSnapshot.h >+++ b/WebCore/bindings/js/ScriptHeapSnapshot.h >@@ -43,7 +43,9 @@ public: > String title() const { return ""; } > unsigned int uid() const { return 0; } > >+#if ENABLE(INSPECTOR) > PassRefPtr<InspectorObject> buildInspectorObjectForHead() const { return InspectorObject::create(); } >+#endif > > private: > ScriptHeapSnapshot() {} >diff --git a/WebCore/bindings/js/ScriptProfile.cpp b/WebCore/bindings/js/ScriptProfile.cpp >index 8731ec2..84451fb 100644 >--- a/WebCore/bindings/js/ScriptProfile.cpp >+++ b/WebCore/bindings/js/ScriptProfile.cpp >@@ -66,6 +66,7 @@ ScriptProfileNode* ScriptProfile::head() const > return m_profile->head(); > } > >+#if ENABLE(INSPECTOR) > static PassRefPtr<InspectorObject> buildInspectorObjectFor(const JSC::ProfileNode* node) > { > RefPtr<InspectorObject> result = InspectorObject::create(); >@@ -94,6 +95,7 @@ PassRefPtr<InspectorObject> ScriptProfile::buildInspectorObjectForHead() const > { > return buildInspectorObjectFor(m_profile->head()); > } >+#endif > > } // namespace WebCore > >diff --git a/WebCore/bindings/js/ScriptProfile.h b/WebCore/bindings/js/ScriptProfile.h >index b39d2c9..1533d5a 100644 >--- a/WebCore/bindings/js/ScriptProfile.h >+++ b/WebCore/bindings/js/ScriptProfile.h >@@ -40,7 +40,9 @@ class Profile; > > namespace WebCore { > >+#if ENABLE(INSPECTOR) > class InspectorObject; >+#endif > > class ScriptProfile : public RefCounted<ScriptProfile> { > public: >@@ -51,7 +53,9 @@ public: > unsigned int uid() const; > ScriptProfileNode* head() const; > >+#if ENABLE(INSPECTOR) > PassRefPtr<InspectorObject> buildInspectorObjectForHead() const; >+#endif > > private: > ScriptProfile(PassRefPtr<JSC::Profile> profile); >diff --git a/WebCore/inspector/InspectorDebuggerAgent.cpp b/WebCore/inspector/InspectorDebuggerAgent.cpp >index ebd03e6..b3caa2e 100644 >--- a/WebCore/inspector/InspectorDebuggerAgent.cpp >+++ b/WebCore/inspector/InspectorDebuggerAgent.cpp >@@ -30,7 +30,7 @@ > #include "config.h" > #include "InspectorDebuggerAgent.h" > >-#if ENABLE(JAVASCRIPT_DEBUGGER) >+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > #include "InjectedScript.h" > #include "InjectedScriptHost.h" > #include "InspectorFrontend.h" >@@ -335,4 +335,4 @@ void InspectorDebuggerAgent::breakProgram(DebuggerEventType type, PassRefPtr<Ins > > } // namespace WebCore > >-#endif // ENABLE(JAVASCRIPT_DEBUGGER) >+#endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) >diff --git a/WebCore/inspector/InspectorDebuggerAgent.h b/WebCore/inspector/InspectorDebuggerAgent.h >index 9501ac8..adc925a 100644 >--- a/WebCore/inspector/InspectorDebuggerAgent.h >+++ b/WebCore/inspector/InspectorDebuggerAgent.h >@@ -30,7 +30,7 @@ > #ifndef InspectorDebuggerAgent_h > #define InspectorDebuggerAgent_h > >-#if ENABLE(JAVASCRIPT_DEBUGGER) >+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > #include "ScriptBreakpoint.h" > #include "ScriptDebugListener.h" > #include "ScriptState.h" >@@ -111,6 +111,6 @@ private: > > } // namespace WebCore > >-#endif // ENABLE(JAVASCRIPT_DEBUGGER) >+#endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > > #endif // !defined(InspectorDebuggerAgent_h) >diff --git a/WebCore/inspector/InspectorProfilerAgent.cpp b/WebCore/inspector/InspectorProfilerAgent.cpp >index 3f107d6..1248677 100644 >--- a/WebCore/inspector/InspectorProfilerAgent.cpp >+++ b/WebCore/inspector/InspectorProfilerAgent.cpp >@@ -30,7 +30,7 @@ > #include "config.h" > #include "InspectorProfilerAgent.h" > >-#if ENABLE(JAVASCRIPT_DEBUGGER) >+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > > #include "Console.h" > #include "InspectorController.h" >@@ -259,4 +259,4 @@ void InspectorProfilerAgent::toggleRecordButton(bool isProfiling) > > } // namespace WebCore > >-#endif // ENABLE(JAVASCRIPT_DEBUGGER) >+#endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) >diff --git a/WebCore/inspector/InspectorProfilerAgent.h b/WebCore/inspector/InspectorProfilerAgent.h >index c1f5db1..e67848d 100644 >--- a/WebCore/inspector/InspectorProfilerAgent.h >+++ b/WebCore/inspector/InspectorProfilerAgent.h >@@ -30,7 +30,7 @@ > #ifndef InspectorProfilerAgent_h > #define InspectorProfilerAgent_h > >-#if ENABLE(JAVASCRIPT_DEBUGGER) >+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > > #include "PlatformString.h" > #include <wtf/Forward.h> >@@ -92,6 +92,6 @@ private: > > } // namespace WebCore > >-#endif // ENABLE(JAVASCRIPT_DEBUGGER) >+#endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > > #endif // !defined(InspectorProfilerAgent_h) >diff --git a/WebCore/inspector/ScriptBreakpoint.h b/WebCore/inspector/ScriptBreakpoint.h >index b7c7a37..eb02eba 100644 >--- a/WebCore/inspector/ScriptBreakpoint.h >+++ b/WebCore/inspector/ScriptBreakpoint.h >@@ -35,7 +35,10 @@ > > namespace WebCore { > >+#if ENABLE(INSPECTOR) > class InspectorObject; >+#endif >+ > struct ScriptBreakpoint; > > typedef HashMap<int, ScriptBreakpoint> SourceBreakpoints; >@@ -54,8 +57,10 @@ struct ScriptBreakpoint { > bool enabled; > String condition; > >+#if ENABLE(INSPECTOR) > static void sourceBreakpointsFromInspectorObject(PassRefPtr<InspectorObject>, SourceBreakpoints*); > static PassRefPtr<InspectorObject> inspectorObjectFromSourceBreakpoints(const SourceBreakpoints&); >+#endif > }; > > } // namespace WebCore >diff --git a/WebKit/qt/Api/qwebinspector.h b/WebKit/qt/Api/qwebinspector.h >index f192e92..85e55a1 100644 >--- a/WebKit/qt/Api/qwebinspector.h >+++ b/WebKit/qt/Api/qwebinspector.h >@@ -51,7 +51,9 @@ private: > friend class QWebInspectorPrivate; > friend class QWebPage; > friend class QWebPagePrivate; >+#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR > friend class WebCore::InspectorClientQt; >+#endif > friend class WebCore::InspectorFrontendClientQt; > }; > #endif >diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp >index e00b4c6..5670958 100644 >--- a/WebKit/qt/Api/qwebpage.cpp >+++ b/WebKit/qt/Api/qwebpage.cpp >@@ -312,7 +312,9 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) > pageClients.contextMenuClient = new ContextMenuClientQt(); > pageClients.editorClient = new EditorClientQt(q); > pageClients.dragClient = new DragClientQt(q); >+#if ENABLE(INSPECTOR) > pageClients.inspectorClient = new InspectorClientQt(q); >+#endif > #if ENABLE(DEVICE_ORIENTATION) > pageClients.deviceOrientationClient = new DeviceOrientationClientQt(q); > pageClients.deviceMotionClient = new DeviceMotionClientQt(q); >@@ -1178,10 +1180,12 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev > frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); > } > #endif >+#if ENABLE(INSPECTOR) > else if (event->propertyName() == "_q_webInspectorServerPort") { > InspectorServerQt* inspectorServer = InspectorServerQt::server(); > inspectorServer->listen(inspectorServerPort()); > } >+#endif > } > #endif > >diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h >index f1f5d24..19e20bd 100644 >--- a/WebKit/qt/Api/qwebpage.h >+++ b/WebKit/qt/Api/qwebpage.h >@@ -54,7 +54,9 @@ namespace WebCore { > class ChromeClientQt; > class EditorClientQt; > class FrameLoaderClientQt; >+#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR > class InspectorClientQt; >+#endif > class InspectorServerRequestHandlerQt; > class InspectorFrontendClientQt; > class NotificationPresenterClientQt; >@@ -428,7 +430,9 @@ private: > friend class WebCore::ChromeClientQt; > friend class WebCore::EditorClientQt; > friend class WebCore::FrameLoaderClientQt; >+#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR > friend class WebCore::InspectorClientQt; >+#endif > friend class WebCore::InspectorServerRequestHandlerQt; > friend class WebCore::InspectorFrontendClientQt; > friend class WebCore::NotificationPresenterClientQt; >diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog >index b7578f1..9523282 100644 >--- a/WebKit/qt/ChangeLog >+++ b/WebKit/qt/ChangeLog >@@ -1,3 +1,18 @@ >+2010-11-23 Andras Becsi <abecsi@inf.u-szeged.hu> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make WebKit2 compile with !ENABLE(INSPECTOR). >+ https://bugs.webkit.org/show_bug.cgi?id=49973 >+ >+ * Api/qwebinspector.h: >+ * Api/qwebpage.cpp: >+ (QWebPagePrivate::QWebPagePrivate): >+ (QWebPagePrivate::dynamicPropertyChangeEvent): >+ * Api/qwebpage.h: >+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp: >+ (DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled): >+ > 2010-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> > > Reviewed by Kenneth Rohde Christiansen. >diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp >index f5fa06b..a5a7270 100644 >--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp >+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp >@@ -175,7 +175,7 @@ bool DumpRenderTreeSupportQt::hasDocumentElement(QWebFrame* frame) > > void DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(QWebFrame* frame, bool enabled) > { >-#if ENABLE(JAVASCRIPT_DEBUGGER) >+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) > Frame* coreFrame = QWebFramePrivate::core(frame); > InspectorController* controller = coreFrame->page()->inspectorController(); > if (!controller) >diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog >index 554488b..e11df33 100644 >--- a/WebKit2/ChangeLog >+++ b/WebKit2/ChangeLog >@@ -1,3 +1,46 @@ >+2010-11-23 Andras Becsi <abecsi@inf.u-szeged.hu> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make WebKit2 compile with !ENABLE(INSPECTOR). >+ https://bugs.webkit.org/show_bug.cgi?id=49973 >+ >+ * Shared/API/c/WKSharedAPICast.h: >+ (WebKit::toAPI): >+ (WebKit::toImpl): >+ * UIProcess/API/C/WKAPICast.h: >+ * UIProcess/API/C/WKInspector.cpp: >+ * UIProcess/API/C/WKInspector.h: >+ * UIProcess/API/C/WKPage.cpp: >+ * UIProcess/API/C/WKPage.h: >+ * UIProcess/WebInspectorProxy.cpp: >+ * UIProcess/WebInspectorProxy.h: >+ * UIProcess/WebInspectorProxy.messages.in: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::close): >+ (WebKit::WebPageProxy::didReceiveMessage): >+ (WebKit::WebPageProxy::didReceiveSyncMessage): >+ (WebKit::WebPageProxy::processDidCrash): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/mac/WebInspectorProxyMac.mm: >+ * UIProcess/qt/WebInspectorProxyQt.cpp: >+ * UIProcess/win/WebInspectorProxyWin.cpp: >+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp: >+ * WebProcess/WebCoreSupport/WebInspectorClient.h: >+ * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: >+ * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: >+ * WebProcess/WebPage/WebInspector.cpp: >+ * WebProcess/WebPage/WebInspector.h: >+ * WebProcess/WebPage/WebInspector.messages.in: >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::WebPage): >+ (WebKit::WebPage::close): >+ (WebKit::WebPage::windowIsFocused): >+ (WebKit::WebPage::didReceiveMessage): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/qt/WebInspectorQt.cpp: >+ * WebProcess/WebPage/win/WebInspectorWin.cpp: >+ > 2010-11-22 Adam Roben <aroben@apple.com> > > Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files >diff --git a/WebKit2/Shared/API/c/WKSharedAPICast.h b/WebKit2/Shared/API/c/WKSharedAPICast.h >index 8a1a2c4..77a72d2 100644 >--- a/WebKit2/Shared/API/c/WKSharedAPICast.h >+++ b/WebKit2/Shared/API/c/WKSharedAPICast.h >@@ -363,8 +363,10 @@ inline WKContextMenuItemTag toAPI(WebCore::ContextMenuAction action) > return kWKContextMenuItemTagPDFSinglePageScrolling; > case WebCore::ContextMenuItemTagPDFFacingPagesScrolling: > return kWKContextMenuItemTagPDFFacingPagesScrolling; >+#if ENABLE(INSPECTOR) > case WebCore::ContextMenuItemTagInspectElement: > return kWKContextMenuItemTagInspectElement; >+#endif > case WebCore::ContextMenuItemTagTextDirectionMenu: > return kWKContextMenuItemTagTextDirectionMenu; > case WebCore::ContextMenuItemTagTextDirectionDefault: >@@ -539,8 +541,10 @@ inline WebCore::ContextMenuAction toImpl(WKContextMenuItemTag tag) > return WebCore::ContextMenuItemTagPDFSinglePageScrolling; > case kWKContextMenuItemTagPDFFacingPagesScrolling: > return WebCore::ContextMenuItemTagPDFFacingPagesScrolling; >+#if ENABLE(INSPECTOR) > case kWKContextMenuItemTagInspectElement: > return WebCore::ContextMenuItemTagInspectElement; >+#endif > case kWKContextMenuItemTagTextDirectionMenu: > return WebCore::ContextMenuItemTagTextDirectionMenu; > case kWKContextMenuItemTagTextDirectionDefault: >diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h >index ead40a0..98e999e 100644 >--- a/WebKit2/UIProcess/API/C/WKAPICast.h >+++ b/WebKit2/UIProcess/API/C/WKAPICast.h >@@ -44,7 +44,9 @@ class WebContext; > class WebFormSubmissionListenerProxy; > class WebFramePolicyListenerProxy; > class WebFrameProxy; >+#if ENABLE(INSPECTOR) > class WebInspectorProxy; >+#endif > class WebNavigationData; > class WebPageNamespace; > class WebPageProxy; >@@ -57,7 +59,9 @@ WK_ADD_API_MAPPING(WKDownloadRef, DownloadProxy) > WK_ADD_API_MAPPING(WKFormSubmissionListenerRef, WebFormSubmissionListenerProxy) > WK_ADD_API_MAPPING(WKFramePolicyListenerRef, WebFramePolicyListenerProxy) > WK_ADD_API_MAPPING(WKFrameRef, WebFrameProxy) >+#if ENABLE(INSPECTOR) > WK_ADD_API_MAPPING(WKInspectorRef, WebInspectorProxy) >+#endif > 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 >index 803036a..7a87265 100644 >--- a/WebKit2/UIProcess/API/C/WKInspector.cpp >+++ b/WebKit2/UIProcess/API/C/WKInspector.cpp >@@ -25,6 +25,8 @@ > > #include "WKInspector.h" > >+#if ENABLE(INSPECTOR) >+ > #include "WKAPICast.h" > #include "WebInspectorProxy.h" > >@@ -104,3 +106,5 @@ void WKInspectorTogglePageProfiling(WKInspectorRef inspectorRef) > { > toImpl(inspectorRef)->togglePageProfiling(); > } >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/UIProcess/API/C/WKInspector.h b/WebKit2/UIProcess/API/C/WKInspector.h >index f950e7e..c147015 100644 >--- a/WebKit2/UIProcess/API/C/WKInspector.h >+++ b/WebKit2/UIProcess/API/C/WKInspector.h >@@ -28,6 +28,8 @@ > > #include <WebKit2/WKBase.h> > >+#if ENABLE(INSPECTOR) >+ > #ifndef __cplusplus > #include <stdbool.h> > #endif >@@ -63,4 +65,6 @@ WK_EXPORT void WKInspectorTogglePageProfiling(WKInspectorRef inspector); > } > #endif > >+#endif // ENABLE(INSPECTOR) >+ > #endif // WKInspector_h >diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp >index bbd60da..1d4420f 100644 >--- a/WebKit2/UIProcess/API/C/WKPage.cpp >+++ b/WebKit2/UIProcess/API/C/WKPage.cpp >@@ -152,10 +152,12 @@ WKFrameRef WKPageGetFocusedFrame(WKPageRef pageRef) > return toAPI(toImpl(pageRef)->focusedFrame()); > } > >+#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR > WKInspectorRef WKPageGetInspector(WKPageRef pageRef) > { > return toAPI(toImpl(pageRef)->inspector()); > } >+#endif > > double WKPageGetEstimatedProgress(WKPageRef pageRef) > { >diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h >index 2edf3ec..1a7f5ed 100644 >--- a/WebKit2/UIProcess/API/C/WKPage.h >+++ b/WebKit2/UIProcess/API/C/WKPage.h >@@ -246,7 +246,9 @@ WK_EXPORT WKFrameRef WKPageGetMainFrame(WKPageRef page); > WK_EXPORT WKFrameRef WKPageGetFocusedFrame(WKPageRef page); // The focused frame may be inactive. > WK_EXPORT double WKPageGetEstimatedProgress(WKPageRef page); > >+#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR > WK_EXPORT WKInspectorRef WKPageGetInspector(WKPageRef page); >+#endif > > WK_EXPORT WKStringRef WKPageCopyCustomUserAgent(WKPageRef page); > WK_EXPORT void WKPageSetCustomUserAgent(WKPageRef page, WKStringRef userAgent); >diff --git a/WebKit2/UIProcess/WebInspectorProxy.cpp b/WebKit2/UIProcess/WebInspectorProxy.cpp >index 83f4a44..74aea8c 100644 >--- a/WebKit2/UIProcess/WebInspectorProxy.cpp >+++ b/WebKit2/UIProcess/WebInspectorProxy.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspectorProxy.h" > >+#if ENABLE(INSPECTOR) >+ > #include "WebInspectorMessages.h" > #include "WebPageProxy.h" > #include "WebPageCreationParameters.h" >@@ -161,3 +163,5 @@ void WebInspectorProxy::didLoadInspectorPage() > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/UIProcess/WebInspectorProxy.h b/WebKit2/UIProcess/WebInspectorProxy.h >index 5548f7f..c6ad655 100644 >--- a/WebKit2/UIProcess/WebInspectorProxy.h >+++ b/WebKit2/UIProcess/WebInspectorProxy.h >@@ -26,6 +26,8 @@ > #ifndef WebInspectorProxy_h > #define WebInspectorProxy_h > >+#if ENABLE(INSPECTOR) >+ > #include "APIObject.h" > #include "Connection.h" > #include <wtf/Forward.h> >@@ -80,9 +82,11 @@ public: > bool isProfilingPage() const { return m_isProfilingPage; } > void togglePageProfiling(); > >+#if ENABLE(INSPECTOR) > // Implemented in generated WebInspectorProxyMessageReceiver.cpp > void didReceiveWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); > CoreIPC::SyncReplyMode didReceiveSyncWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*); >+#endif > > private: > WebInspectorProxy(WebPageProxy* page); >@@ -113,4 +117,6 @@ private: > > } // namespace WebKit > >+#endif // ENABLE(INSPECTOR) >+ > #endif // WebInspectorProxy_h >diff --git a/WebKit2/UIProcess/WebInspectorProxy.messages.in b/WebKit2/UIProcess/WebInspectorProxy.messages.in >index 3266260..9040f3c 100644 >--- a/WebKit2/UIProcess/WebInspectorProxy.messages.in >+++ b/WebKit2/UIProcess/WebInspectorProxy.messages.in >@@ -20,7 +20,11 @@ > # 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. > >+#if ENABLE(INSPECTOR) >+ > messages -> WebInspectorProxy { > CreateInspectorPage() -> (uint64_t inspectorPageID, WebKit::WebPageCreationParameters inspectorPageParameters) > DidLoadInspectorPage() > } >+ >+#endif >diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp >index 68f0192..29ce9b9 100644 >--- a/WebKit2/UIProcess/WebPageProxy.cpp >+++ b/WebKit2/UIProcess/WebPageProxy.cpp >@@ -215,10 +215,12 @@ void WebPageProxy::close() > > m_customUserAgent = String(); > >+#if ENABLE(INSPECTOR) > if (m_inspector) { > m_inspector->invalidate(); > m_inspector = 0; > } >+#endif > > m_pageTitle = String(); > m_toolTip = String(); >@@ -681,11 +683,13 @@ void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::M > return; > } > >+#if ENABLE(INSPECTOR) > if (messageID.is<CoreIPC::MessageClassWebInspectorProxy>()) { > if (WebInspectorProxy* inspector = this->inspector()) > inspector->didReceiveWebInspectorProxyMessage(connection, messageID, arguments); > return; > } >+#endif > > didReceiveWebPageProxyMessage(connection, messageID, arguments); > } >@@ -697,11 +701,13 @@ void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIP > return; > } > >+#if ENABLE(INSPECTOR) > if (messageID.is<CoreIPC::MessageClassWebInspectorProxy>()) { > if (WebInspectorProxy* inspector = this->inspector()) > inspector->didReceiveSyncWebInspectorProxyMessage(connection, messageID, arguments, reply); > return; > } >+#endif > > // FIXME: Do something with reply. > didReceiveSyncWebPageProxyMessage(connection, messageID, arguments, reply); >@@ -1156,6 +1162,8 @@ void WebPageProxy::didDraw() > > // Inspector > >+#if ENABLE(INSPECTOR) >+ > WebInspectorProxy* WebPageProxy::inspector() > { > if (isClosed() || !isValid()) >@@ -1165,6 +1173,8 @@ WebInspectorProxy* WebPageProxy::inspector() > return m_inspector.get(); > } > >+#endif >+ > // BackForwardList > > void WebPageProxy::backForwardAddItem(uint64_t itemID) >@@ -1442,10 +1452,12 @@ void WebPageProxy::processDidCrash() > > m_mainFrame = 0; > >+#if ENABLE(INSPECTOR) > if (m_inspector) { > m_inspector->invalidate(); > m_inspector = 0; > } >+#endif > > m_customUserAgent = String(); > m_pageTitle = String(); >diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h >index 104c033..ca8039b 100644 >--- a/WebKit2/UIProcess/WebPageProxy.h >+++ b/WebKit2/UIProcess/WebPageProxy.h >@@ -120,7 +120,9 @@ public: > > WebBackForwardList* backForwardList() { return m_backForwardList.get(); } > >+#if ENABLE(INSPECTOR) > WebInspectorProxy* inspector(); >+#endif > > void setPageClient(PageClient*); > void initializeContextMenuClient(const WKPageContextMenuClient*); >@@ -362,7 +364,7 @@ private: > void setToolTip(const String&); > void setCursor(const WebCore::Cursor&); > void didValidateMenuItem(const String& commandName, bool isEnabled, int32_t state); >- >+ > void didReceiveEvent(uint32_t opaqueType, bool handled); > > void didGetContentsAsString(const String&, uint64_t); >@@ -374,7 +376,7 @@ private: > > #if USE(ACCELERATED_COMPOSITING) > void didChangeAcceleratedCompositing(bool compositing, DrawingAreaBase::DrawingAreaInfo&); >-#endif >+#endif > > PageClient* m_pageClient; > WebLoaderClient m_loaderClient; >@@ -392,7 +394,9 @@ private: > > String m_customUserAgent; > >+#if ENABLE(INSPECTOR) > RefPtr<WebInspectorProxy> m_inspector; >+#endif > > HashMap<uint64_t, RefPtr<ContentsAsStringCallback> > m_contentsAsStringCallbacks; > HashMap<uint64_t, RefPtr<FrameSourceCallback> > m_frameSourceCallbacks; >diff --git a/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm b/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm >index b3af393..98a6d7c 100644 >--- a/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm >+++ b/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm >@@ -25,6 +25,8 @@ > > #import "WebInspectorProxy.h" > >+#if ENABLE(INSPECTOR) >+ > #import "WKAPICast.h" > #import "WKView.h" > #import "WebPageProxy.h" >@@ -54,3 +56,5 @@ String WebInspectorProxy::inspectorPageURL() const > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp b/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp >index cfc1298..79b2606 100644 >--- a/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp >+++ b/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspectorProxy.h" > >+#if ENABLE(INSPECTOR) >+ > #include <wtf/text/WTFString.h> > > #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1 >@@ -45,3 +47,5 @@ String WebInspectorProxy::inspectorPageURL() const > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp b/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp >index cfc1298..79b2606 100644 >--- a/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp >+++ b/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspectorProxy.h" > >+#if ENABLE(INSPECTOR) >+ > #include <wtf/text/WTFString.h> > > #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1 >@@ -45,3 +47,5 @@ String WebInspectorProxy::inspectorPageURL() const > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp >index e29723d..aa03b74 100644 >--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp >+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspectorClient.h" > >+#if ENABLE(INSPECTOR) >+ > #include "WebInspectorFrontendClient.h" > #include "WebInspector.h" > #include "WebPage.h" >@@ -80,3 +82,5 @@ bool WebInspectorClient::sendMessageToFrontend(const String& message) > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h >index b9225c3..7a12206 100644 >--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h >+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h >@@ -26,6 +26,8 @@ > #ifndef WebInspectorClient_h > #define WebInspectorClient_h > >+#if ENABLE(INSPECTOR) >+ > #include <WebCore/InspectorClient.h> > > namespace WebKit { >@@ -38,7 +40,7 @@ public: > : m_page(page) > { > } >- >+ > private: > virtual void inspectorDestroyed(); > >@@ -57,4 +59,6 @@ private: > > } // namespace WebKit > >+#endif // ENABLE(INSPECTOR) >+ > #endif // WebInspectorClient_h >diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp >index c44d8e4..b8278bd 100644 >--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp >+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspectorFrontendClient.h" > >+#if ENABLE(INSPECTOR) >+ > #include "WebInspector.h" > #include "WebPage.h" > #include <WebCore/Page.h> >@@ -102,3 +104,5 @@ void WebInspectorFrontendClient::sendMessageToBackend(const String&) > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h >index 6406a38..b3c2162 100644 >--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h >+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h >@@ -26,6 +26,8 @@ > #ifndef WebInspectorFrontendClient_h > #define WebInspectorFrontendClient_h > >+#if ENABLE(INSPECTOR) >+ > #include <WebCore/InspectorFrontendClientLocal.h> > > namespace WebKit { >@@ -59,4 +61,6 @@ private: > > } // namespace WebKit > >+#endif // ENABLE(INSPECTOR) >+ > #endif // WebInspectorFrontendClient_h >diff --git a/WebKit2/WebProcess/WebPage/WebInspector.cpp b/WebKit2/WebProcess/WebPage/WebInspector.cpp >index a7374dd..0eec3fd 100644 >--- a/WebKit2/WebProcess/WebPage/WebInspector.cpp >+++ b/WebKit2/WebProcess/WebPage/WebInspector.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspector.h" > >+#if ENABLE(INSPECTOR) >+ > #include "WebInspectorProxyMessages.h" > #include "WebPage.h" > #include "WebPageCreationParameters.h" >@@ -131,3 +133,5 @@ void WebInspector::stopPageProfiling() > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/WebProcess/WebPage/WebInspector.h b/WebKit2/WebProcess/WebPage/WebInspector.h >index 4a3c006..fbd0942 100644 >--- a/WebKit2/WebProcess/WebPage/WebInspector.h >+++ b/WebKit2/WebProcess/WebPage/WebInspector.h >@@ -26,6 +26,8 @@ > #ifndef WebInspector_h > #define WebInspector_h > >+#if ENABLE(INSPECTOR) >+ > #include "Connection.h" > #include <wtf/Forward.h> > #include <wtf/Noncopyable.h> >@@ -81,4 +83,6 @@ private: > > } // namespace WebKit > >+#endif // ENABLE(INSPECTOR) >+ > #endif // WebInspector_h >diff --git a/WebKit2/WebProcess/WebPage/WebInspector.messages.in b/WebKit2/WebProcess/WebPage/WebInspector.messages.in >index 7d7745d..dc184b6 100644 >--- a/WebKit2/WebProcess/WebPage/WebInspector.messages.in >+++ b/WebKit2/WebProcess/WebPage/WebInspector.messages.in >@@ -20,6 +20,8 @@ > # 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. > >+#if ENABLE(INSPECTOR) >+ > messages -> WebInspector { > Show() > Close() >@@ -31,3 +33,5 @@ messages -> WebInspector { > StartPageProfiling() > StopPageProfiling() > } >+ >+#endif >diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp >index 27d4b7d..9a50767 100644 >--- a/WebKit2/WebProcess/WebPage/WebPage.cpp >+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp >@@ -127,7 +127,9 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters) > pageClients.contextMenuClient = new WebContextMenuClient(this); > pageClients.editorClient = new WebEditorClient(this); > pageClients.dragClient = new WebDragClient(this); >+#if ENABLE(INSPECTOR) > pageClients.inspectorClient = new WebInspectorClient(this); >+#endif > pageClients.backForwardClient = WebBackForwardListProxy::create(this); > m_page = adoptPtr(new Page(pageClients)); > >@@ -306,7 +308,9 @@ void WebPage::close() > if (m_isVisibleToInjectedBundle && WebProcess::shared().injectedBundle()) > WebProcess::shared().injectedBundle()->willDestroyPage(this); > >+#if ENABLE(INSPECTOR) > m_inspector = 0; >+#endif > > if (m_activePopupMenu) { > m_activePopupMenu->disconnectFromPage(); >@@ -906,6 +910,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store) > platformPreferencesDidChange(store); > } > >+#if ENABLE(INSPECTOR) > WebInspector* WebPage::inspector() > { > if (m_isClosed) >@@ -914,6 +919,7 @@ WebInspector* WebPage::inspector() > m_inspector = adoptPtr(new WebInspector(this)); > return m_inspector.get(); > } >+#endif > > #if !PLATFORM(MAC) > bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt) >@@ -1060,7 +1066,7 @@ void WebPage::setWindowFrame(const IntRect& windowFrame) > bool WebPage::windowIsFocused() const > { > return m_page->focusController()->isActive(); >-} >+} > > #endif > >@@ -1072,11 +1078,13 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag > return; > } > >+#if ENABLE(INSPECTOR) > if (messageID.is<CoreIPC::MessageClassWebInspector>()) { > if (WebInspector* inspector = this->inspector()) > inspector->didReceiveWebInspectorMessage(connection, messageID, arguments); > return; > } >+#endif > > didReceiveWebPageMessage(connection, messageID, arguments); > } >diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h >index 2ec1d42..467b6de 100644 >--- a/WebKit2/WebProcess/WebPage/WebPage.h >+++ b/WebKit2/WebProcess/WebPage/WebPage.h >@@ -74,7 +74,9 @@ class WebContextMenu; > class WebContextMenuItemData; > class WebEvent; > class WebFrame; >+#if ENABLE(INSPECTOR) > class WebInspector; >+#endif > class WebKeyboardEvent; > class WebMouseEvent; > class WebPopupMenu; >@@ -108,7 +110,10 @@ public: > > InjectedBundleBackForwardList* backForwardList(); > DrawingArea* drawingArea() const { return m_drawingArea.get(); } >+ >+#if ENABLE(INSPECTOR) > WebInspector* inspector(); >+#endif > > // -- Called by the DrawingArea. > // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial? >@@ -345,7 +350,9 @@ private: > FindController m_findController; > RefPtr<PageOverlay> m_pageOverlay; > >+#if ENABLE(INSPECTOR) > OwnPtr<WebInspector> m_inspector; >+#endif > RefPtr<WebPopupMenu> m_activePopupMenu; > RefPtr<WebContextMenu> m_contextMenu; > >diff --git a/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp b/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp >index 7e77705..99aa1eb 100644 >--- a/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp >+++ b/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspector.h" > >+#if ENABLE(INSPECTOR) >+ > #include <wtf/text/WTFString.h> > > #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1 >@@ -39,3 +41,5 @@ String WebInspector::localizedStringsURL() const > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >diff --git a/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp b/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp >index 7e77705..99aa1eb 100644 >--- a/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp >+++ b/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp >@@ -25,6 +25,8 @@ > > #include "WebInspector.h" > >+#if ENABLE(INSPECTOR) >+ > #include <wtf/text/WTFString.h> > > #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1 >@@ -39,3 +41,5 @@ String WebInspector::localizedStringsURL() const > } > > } // namespace WebKit >+ >+#endif // ENABLE(INSPECTOR) >-- >1.7.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 49973
:
74667
|
74673