2011-01-01 Konstantin Tokarev <annulen@yandex.ru>

        Reviewed by Darin Adler.

        Don't include Inspector headers when Inspector is disabled
        https://bugs.webkit.org/show_bug.cgi?id=51789

        * bindings/js/JSDOMWindowBase.cpp: Include Inspector headers when
        Inspector is enabled
        * dom/Document.cpp: Include Inspector headers when
        Inspector is enabled
        (WebCore::Document::recalcStyle): Disabled InspectorInstrumentationCookie
        handling
        * html/HTMLDocument.cpp: Include Inspector headers when
        Inspector is enabled
        * loader/FrameLoader.cpp: Include Inspector headers when
        Inspector is enabled
        * loader/ResourceLoadNotifier.cpp: Include Inspector headers when
        Inspector is enabled
        * page/Chrome.cpp: Include Inspector headers when
        Inspector is enabled
        * page/Console.cpp: Include Inspector headers when
        Inspector is enabled
        * page/ContextMenuController.cpp: Include Inspector headers when
        Inspector is enabled
        * page/DOMWindow.cpp: Include Inspector headers when
        Inspector is enabled
        (WebCore::DOMWindow::dispatchEvent): Disabled InspectorInstrumentationCookie
        handling
        * page/EventHandler.cpp: Include Inspector headers when
        Inspector is enabled
        * page/Page.cpp: Include Inspector headers when
        Inspector is enabled
        * storage/Database.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/AbstractWorker.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/DefaultSharedWorkerRepository.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/SharedWorker.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/Worker.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/WorkerContext.cpp: Include Inspector headers when
        Inspector is enabled
        * workers/WorkerMessagingProxy.cpp: Include Inspector headers when
        Inspector is enabled
        * xml/XMLHttpRequest.cpp: Include Inspector headers when
        Inspector is enabled
        (WebCore::XMLHttpRequest::callReadyStateChangeListener): Disabled
        InspectorInstrumentationCookie handling

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 64f179f4
2011-01-01 Konstantin Tokarev <annulen@yandex.ru>
Reviewed by Darin Adler.
Don't include Inspector headers when Inspector is disabled
https://bugs.webkit.org/show_bug.cgi?id=51789
* bindings/js/JSDOMWindowBase.cpp: Include Inspector headers when
Inspector is enabled
* dom/Document.cpp: Include Inspector headers when
Inspector is enabled
(WebCore::Document::recalcStyle): Disabled InspectorInstrumentationCookie
handling
* html/HTMLDocument.cpp: Include Inspector headers when
Inspector is enabled
* loader/FrameLoader.cpp: Include Inspector headers when
Inspector is enabled
* loader/ResourceLoadNotifier.cpp: Include Inspector headers when
Inspector is enabled
* page/Chrome.cpp: Include Inspector headers when
Inspector is enabled
* page/Console.cpp: Include Inspector headers when
Inspector is enabled
* page/ContextMenuController.cpp: Include Inspector headers when
Inspector is enabled
* page/DOMWindow.cpp: Include Inspector headers when
Inspector is enabled
(WebCore::DOMWindow::dispatchEvent): Disabled InspectorInstrumentationCookie
handling
* page/EventHandler.cpp: Include Inspector headers when
Inspector is enabled
* page/Page.cpp: Include Inspector headers when
Inspector is enabled
* storage/Database.cpp: Include Inspector headers when
Inspector is enabled
* workers/AbstractWorker.cpp: Include Inspector headers when
Inspector is enabled
* workers/DefaultSharedWorkerRepository.cpp: Include Inspector headers when
Inspector is enabled
* workers/SharedWorker.cpp: Include Inspector headers when
Inspector is enabled
* workers/Worker.cpp: Include Inspector headers when
Inspector is enabled
* workers/WorkerContext.cpp: Include Inspector headers when
Inspector is enabled
* workers/WorkerMessagingProxy.cpp: Include Inspector headers when
Inspector is enabled
* xml/XMLHttpRequest.cpp: Include Inspector headers when
Inspector is enabled
(WebCore::XMLHttpRequest::callReadyStateChangeListener): Disabled
InspectorInstrumentationCookie handling
2010-12-31 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
......
......@@ -27,7 +27,6 @@
#include "Console.h"
#include "DOMWindow.h"
#include "Frame.h"
#include "InspectorController.h"
#include "JSDOMWindowCustom.h"
#include "JSNode.h"
#include "Logging.h"
......@@ -39,6 +38,10 @@
#include <wtf/Threading.h>
#include <wtf/text/StringConcatenate.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
using namespace JSC;
namespace WebCore {
......
......@@ -91,8 +91,6 @@
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "ImageLoader.h"
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#include "KeyboardEvent.h"
#include "Logging.h"
#include "MediaQueryList.h"
......@@ -151,6 +149,11 @@
#include <wtf/StdLibExtras.h>
#include <wtf/text/StringBuffer.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#endif
#if ENABLE(SHARED_WORKERS)
#include "SharedWorkerRepository.h"
#endif
......@@ -1545,8 +1548,9 @@ void Document::recalcStyle(StyleChange change)
if (m_inStyleRecalc)
return; // Guard against re-entrancy. -dwh
#if ENABLE(INSPECTOR)
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRecalculateStyle(this);
#endif
m_inStyleRecalc = true;
suspendPostAttachCallbacks();
......@@ -1600,8 +1604,9 @@ bail_out:
m_closeAfterStyleRecalc = false;
implicitClose();
}
#if ENABLE(INSPECTOR)
InspectorInstrumentation::didRecalculateStyle(cookie);
#endif
}
void Document::updateStyleIfNeeded()
......
......@@ -69,12 +69,15 @@
#include "HTMLBodyElement.h"
#include "HTMLElementFactory.h"
#include "HTMLNames.h"
#include "InspectorController.h"
#include "KURL.h"
#include "Page.h"
#include "Settings.h"
#include <wtf/text/CString.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
using namespace HTMLNames;
......
......@@ -69,7 +69,6 @@
#include "HistoryItem.h"
#include "IconDatabase.h"
#include "IconLoader.h"
#include "InspectorController.h"
#include "Logging.h"
#include "MIMETypeRegistry.h"
#include "MainResourceLoader.h"
......@@ -98,6 +97,10 @@
#include <wtf/text/CString.h>
#include <wtf/text/StringConcatenate.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
#include "HTMLMediaElement.h"
#endif
......
......@@ -35,11 +35,14 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "InspectorController.h"
#include "Page.h"
#include "ProgressTracker.h"
#include "ResourceLoader.h"
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame)
......
......@@ -33,7 +33,6 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "InspectorController.h"
#include "Page.h"
#include "PageGroupLoadDeferrer.h"
#include "RenderObject.h"
......@@ -46,6 +45,10 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
#if ENABLE(DOM_STORAGE)
#include "StorageNamespace.h"
#endif
......
......@@ -35,7 +35,6 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameTree.h"
#include "InspectorController.h"
#include "MemoryInfo.h"
#include "Page.h"
#include "PageGroup.h"
......@@ -49,6 +48,10 @@
#include <wtf/text/CString.h>
#include <wtf/UnusedParam.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
Console::Console(Frame* frame)
......
......@@ -50,7 +50,6 @@
#include "HTMLFormElement.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "InspectorController.h"
#include "LocalizedStrings.h"
#include "MouseEvent.h"
#include "NavigationAction.h"
......@@ -67,6 +66,10 @@
#include "markup.h"
#include <wtf/unicode/Unicode.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
using namespace WTF;
using namespace Unicode;
......
......@@ -64,8 +64,6 @@
#include "History.h"
#include "IDBFactory.h"
#include "IDBFactoryBackendInterface.h"
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#include "KURL.h"
#include "Location.h"
#include "MediaQueryList.h"
......@@ -105,6 +103,11 @@
#include "LocalFileSystem.h"
#endif
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#endif
using std::min;
using std::max;
......@@ -1533,13 +1536,13 @@ bool DOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget
event->setTarget(prpTarget ? prpTarget : this);
event->setCurrentTarget(this);
event->setEventPhase(Event::AT_TARGET);
#if ENABLE(INSPECTOR)
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEventOnWindow(frame(), *event, this);
#endif
bool result = fireEventListeners(event.get());
#if ENABLE(INSPECTOR)
InspectorInstrumentation::didDispatchEventOnWindow(cookie);
#endif
return result;
}
......
......@@ -50,7 +50,6 @@
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "Image.h"
#include "InspectorController.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "MouseEventWithHitTestResults.h"
......@@ -76,6 +75,10 @@
#include <wtf/CurrentTime.h>
#include <wtf/StdLibExtras.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
#if ENABLE(SVG)
#include "SVGDocument.h"
#include "SVGElementInstance.h"
......
......@@ -45,7 +45,6 @@
#include "FrameView.h"
#include "HTMLElement.h"
#include "HistoryItem.h"
#include "InspectorController.h"
#include "Logging.h"
#include "MediaCanStartListener.h"
#include "Navigator.h"
......@@ -81,6 +80,10 @@
#include "StorageNamespace.h"
#endif
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER)
#include "ScriptDebugServer.h"
#endif
......
......@@ -36,7 +36,6 @@
#include "DatabaseThread.h"
#include "DatabaseTracker.h"
#include "Document.h"
#include "InspectorController.h"
#include "Logging.h"
#include "NotImplemented.h"
#include "Page.h"
......@@ -60,6 +59,10 @@
#include "JSDOMWindow.h"
#endif
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
class DatabaseCreationCallbackTask : public ScriptExecutionContext::Task {
......
......@@ -38,10 +38,13 @@
#include "Event.h"
#include "EventException.h"
#include "EventNames.h"
#include "InspectorController.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
AbstractWorker::AbstractWorker(ScriptExecutionContext* context)
......
......@@ -37,7 +37,6 @@
#include "ActiveDOMObject.h"
#include "CrossThreadTask.h"
#include "Document.h"
#include "InspectorController.h"
#include "MessageEvent.h"
#include "MessagePort.h"
#include "NotImplemented.h"
......@@ -55,6 +54,10 @@
#include <wtf/HashSet.h>
#include <wtf/Threading.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
class SharedWorkerProxy : public ThreadSafeShared<SharedWorkerProxy>, public WorkerLoaderProxy, public WorkerReportingProxy {
......
......@@ -35,13 +35,16 @@
#include "SharedWorker.h"
#include "InspectorController.h"
#include "KURL.h"
#include "MessageChannel.h"
#include "MessagePort.h"
#include "ScriptExecutionContext.h"
#include "SharedWorkerRepository.h"
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
inline SharedWorker::SharedWorker(ScriptExecutionContext* context)
......
......@@ -40,7 +40,6 @@
#include "ExceptionCode.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "InspectorController.h"
#include "MessageEvent.h"
#include "TextEncoding.h"
#include "WorkerContextProxy.h"
......@@ -48,6 +47,10 @@
#include "WorkerThread.h"
#include <wtf/MainThread.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
inline Worker::Worker(ScriptExecutionContext* context)
......
......@@ -42,7 +42,6 @@
#include "ErrorEvent.h"
#include "Event.h"
#include "EventException.h"
#include "InspectorController.h"
#include "KURL.h"
#include "MessagePort.h"
#include "NotImplemented.h"
......@@ -59,6 +58,10 @@
#include <wtf/RefPtr.h>
#include <wtf/UnusedParam.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
#if ENABLE(NOTIFICATIONS)
#include "NotificationCenter.h"
#endif
......
......@@ -38,11 +38,14 @@
#include "Document.h"
#include "ErrorEvent.h"
#include "ExceptionCode.h"
#include "InspectorController.h"
#include "MessageEvent.h"
#include "ScriptExecutionContext.h"
#include "Worker.h"
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#endif
namespace WebCore {
class MessageWorkerContextTask : public ScriptExecutionContext::Task {
......
......@@ -35,8 +35,6 @@
#include "EventNames.h"
#include "File.h"
#include "HTTPParsers.h"
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
#include "SecurityOrigin.h"
......@@ -53,6 +51,11 @@
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/UnusedParam.h>
#if ENABLE(INSPECTOR)
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#endif
#if USE(JSC)
#include "JSDOMBinding.h"
#include "JSDOMWindow.h"
......@@ -355,18 +358,24 @@ void XMLHttpRequest::callReadyStateChangeListener()
{
if (!scriptExecutionContext())
return;
#if ENABLE(INSPECTOR)
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willChangeXHRReadyState(scriptExecutionContext(), this);
#endif
if (m_async || (m_state <= OPENED || m_state == DONE))
m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent);
#if ENABLE(INSPECTOR)
InspectorInstrumentation::didChangeXHRReadyState(cookie);
#endif
if (m_state == DONE && !m_error) {
#if ENABLE(INSPECTOR)
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLoadXHR(scriptExecutionContext(), this);
#endif
m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().loadEvent));
#if ENABLE(INSPECTOR)
InspectorInstrumentation::didLoadXHR(cookie);
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment