summaryrefslogtreecommitdiffstats
path: root/WebCore/page/DOMWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/DOMWindow.cpp')
-rw-r--r--WebCore/page/DOMWindow.cpp46
1 files changed, 11 insertions, 35 deletions
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 200b82a..1c811cc 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -62,7 +62,7 @@
#include "IDBFactory.h"
#include "IDBFactoryBackendInterface.h"
#include "InspectorController.h"
-#include "InspectorTimelineAgent.h"
+#include "InspectorInstrumentation.h"
#include "KURL.h"
#include "Location.h"
#include "StyleMedia.h"
@@ -86,7 +86,7 @@
#include <algorithm>
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
-#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
#if ENABLE(FILE_SYSTEM)
#include "AsyncFileSystem.h"
@@ -700,7 +700,7 @@ void DOMWindow::pageDestroyed()
}
#if ENABLE(INDEXED_DATABASE)
-IDBFactory* DOMWindow::indexedDB() const
+IDBFactory* DOMWindow::webkitIndexedDB() const
{
if (m_idbFactory)
return m_idbFactory.get();
@@ -740,7 +740,7 @@ void DOMWindow::requestFileSystem(int type, long long size, PassRefPtr<FileSyste
return;
}
- LocalFileSystem::localFileSystem().requestFileSystem(document, fileSystemType, size, FileSystemCallbacks::create(successCallback, errorCallback, document));
+ LocalFileSystem::localFileSystem().requestFileSystem(document, fileSystemType, size, FileSystemCallbacks::create(successCallback, errorCallback, document), false);
}
COMPILE_ASSERT(static_cast<int>(DOMWindow::TEMPORARY) == static_cast<int>(AsyncFileSystem::Temporary), enum_mismatch);
@@ -798,8 +798,8 @@ void DOMWindow::postMessageTimerFired(PostMessageTimer* t)
if (timer->targetOrigin()) {
// Check target origin now since the target document may have changed since the simer was scheduled.
if (!timer->targetOrigin()->isSameSchemeHostPort(document()->securityOrigin())) {
- String message = String::format("Unable to post message to %s. Recipient has origin %s.\n",
- timer->targetOrigin()->toString().utf8().data(), document()->securityOrigin()->toString().utf8().data());
+ String message = makeString("Unable to post message to ", timer->targetOrigin()->toString(),
+ ". Recipient has origin ", document()->securityOrigin()->toString(), ".\n");
console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 0, String());
return;
}
@@ -993,11 +993,8 @@ String DOMWindow::atob(const String& encodedString, ExceptionCode& ec)
return String();
}
- Vector<char> in;
- in.append(encodedString.characters(), encodedString.length());
Vector<char> out;
-
- if (!base64Decode(in, out)) {
+ if (!base64Decode(encodedString, out, FailOnInvalidCharacter)) {
ec = INVALID_CHARACTER_ERR;
return String();
}
@@ -1541,15 +1538,6 @@ void DOMWindow::dispatchLoadEvent()
#endif
}
-#if ENABLE(INSPECTOR)
-InspectorTimelineAgent* DOMWindow::inspectorTimelineAgent()
-{
- if (frame() && frame()->page())
- return frame()->page()->inspectorTimelineAgent();
- return 0;
-}
-#endif
-
bool DOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget> prpTarget)
{
RefPtr<EventTarget> protect = this;
@@ -1559,23 +1547,11 @@ bool DOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget
event->setCurrentTarget(this);
event->setEventPhase(Event::AT_TARGET);
-#if ENABLE(INSPECTOR)
- Page* inspectedPage = InspectorTimelineAgent::instanceCount() && frame() ? frame()->page() : 0;
- if (inspectedPage) {
- if (InspectorTimelineAgent* timelineAgent = hasEventListeners(event->type()) ? inspectedPage->inspectorTimelineAgent() : 0)
- timelineAgent->willDispatchEvent(*event);
- else
- inspectedPage = 0;
- }
-#endif
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEventOnWindow(frame(), *event, this);
bool result = fireEventListeners(event.get());
-#if ENABLE(INSPECTOR)
- if (inspectedPage)
- if (InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent())
- timelineAgent->didDispatchEvent();
-#endif
+ InspectorInstrumentation::didDispatchEventOnWindow(cookie);
return result;
}
@@ -1616,12 +1592,12 @@ EventTargetData* DOMWindow::ensureEventTargetData()
}
#if ENABLE(BLOB)
-String DOMWindow::createBlobURL(Blob* blob)
+String DOMWindow::createObjectURL(Blob* blob)
{
return scriptExecutionContext()->createPublicBlobURL(blob).string();
}
-void DOMWindow::revokeBlobURL(const String& blobURLString)
+void DOMWindow::revokeObjectURL(const String& blobURLString)
{
scriptExecutionContext()->revokePublicBlobURL(KURL(KURL(), blobURLString));
}