Merge from Chromium at DEPS revision r216972
This commit was generated by merge_to_master.py.
Change-Id: Ie5904a921ece9c5959b52c8e0b74db09fa08f144
diff --git a/Source/modules/crypto/Algorithm.cpp b/Source/modules/crypto/Algorithm.cpp
index 5fd8855..a6b3637 100644
--- a/Source/modules/crypto/Algorithm.cpp
+++ b/Source/modules/crypto/Algorithm.cpp
@@ -68,7 +68,7 @@
String Algorithm::name()
{
- return ASCIILiteral(m_algorithm.name());
+ return m_algorithm.name();
}
} // namespace WebCore
diff --git a/Source/modules/crypto/Key.cpp b/Source/modules/crypto/Key.cpp
index b0031c6..6fe4b07 100644
--- a/Source/modules/crypto/Key.cpp
+++ b/Source/modules/crypto/Key.cpp
@@ -101,7 +101,7 @@
String Key::type() const
{
- return ASCIILiteral(keyTypeToString(m_key.type()));
+ return keyTypeToString(m_key.type());
}
bool Key::extractable() const
@@ -126,7 +126,7 @@
for (int i = 0; i < WTF_ARRAY_LENGTH(keyUsageMappings); ++i) {
WebKit::WebCryptoKeyUsage usage = keyUsageMappings[i].value;
if (m_key.usages() & usage)
- result.append(ASCIILiteral(keyUsageToString(usage)));
+ result.append(keyUsageToString(usage));
}
return result;
}
diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp
index d66a1bf..07e6c83 100644
--- a/Source/modules/crypto/NormalizeAlgorithm.cpp
+++ b/Source/modules/crypto/NormalizeAlgorithm.cpp
@@ -77,37 +77,29 @@
// What operations each algorithm supports, and what parameters it expects.
const OperationParamsMapping operationParamsMappings[] = {
- // AES-CBC (section 18.10.)
+ // AES-CBC
{WebKit::WebCryptoAlgorithmIdAesCbc, Decrypt, WebKit::WebCryptoAlgorithmParamsTypeAesCbcParams},
{WebKit::WebCryptoAlgorithmIdAesCbc, Encrypt, WebKit::WebCryptoAlgorithmParamsTypeAesCbcParams},
{WebKit::WebCryptoAlgorithmIdAesCbc, GenerateKey, WebKit::WebCryptoAlgorithmParamsTypeAesKeyGenParams},
{WebKit::WebCryptoAlgorithmIdAesCbc, ImportKey, WebKit::WebCryptoAlgorithmParamsTypeNone},
- // HMAC (section 18.14.)
+ // HMAC
{WebKit::WebCryptoAlgorithmIdHmac, Sign, WebKit::WebCryptoAlgorithmParamsTypeHmacParams},
{WebKit::WebCryptoAlgorithmIdHmac, Verify, WebKit::WebCryptoAlgorithmParamsTypeHmacParams},
{WebKit::WebCryptoAlgorithmIdHmac, GenerateKey, WebKit::WebCryptoAlgorithmParamsTypeHmacParams},
{WebKit::WebCryptoAlgorithmIdHmac, ImportKey, WebKit::WebCryptoAlgorithmParamsTypeHmacParams},
- // RSASSA-PKCS1-v1_5 (section 18.4.)
+ // RSASSA-PKCS1-v1_5
{WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, Sign, WebKit::WebCryptoAlgorithmParamsTypeRsaSsaParams},
{WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, Verify, WebKit::WebCryptoAlgorithmParamsTypeRsaSsaParams},
{WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, GenerateKey, WebKit::WebCryptoAlgorithmParamsTypeRsaKeyGenParams},
{WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, ImportKey, WebKit::WebCryptoAlgorithmParamsTypeNone},
- // SHA-1 (section 18.16.)
+ // SHA-*
{WebKit::WebCryptoAlgorithmIdSha1, Digest, WebKit::WebCryptoAlgorithmParamsTypeNone},
-
- // SHA-224 (section 18.16.)
{WebKit::WebCryptoAlgorithmIdSha224, Digest, WebKit::WebCryptoAlgorithmParamsTypeNone},
-
- // SHA-256 (section 18.16.)
{WebKit::WebCryptoAlgorithmIdSha256, Digest, WebKit::WebCryptoAlgorithmParamsTypeNone},
-
- // SHA-384 (section 18.16.)
{WebKit::WebCryptoAlgorithmIdSha384, Digest, WebKit::WebCryptoAlgorithmParamsTypeNone},
-
- // SHA-512 (section 18.16.)
{WebKit::WebCryptoAlgorithmIdSha512, Digest, WebKit::WebCryptoAlgorithmParamsTypeNone},
};
diff --git a/Source/modules/encryptedmedia/MediaKeySession.idl b/Source/modules/encryptedmedia/MediaKeySession.idl
index a353455..ad7acae 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.idl
+++ b/Source/modules/encryptedmedia/MediaKeySession.idl
@@ -38,8 +38,8 @@
[RaisesException] void update(Uint8Array key);
void close();
- // EventListeners
- [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyadded;
- [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyerror;
- [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeymessage;
+ // EventHandlers
+ [EnabledAtRuntime=encryptedMedia] attribute EventHandler onwebkitkeyadded;
+ [EnabledAtRuntime=encryptedMedia] attribute EventHandler onwebkitkeyerror;
+ [EnabledAtRuntime=encryptedMedia] attribute EventHandler onwebkitkeymessage;
};
diff --git a/Source/modules/filesystem/DOMFileSystem.h b/Source/modules/filesystem/DOMFileSystem.h
index 0efbcec..4f33422 100644
--- a/Source/modules/filesystem/DOMFileSystem.h
+++ b/Source/modules/filesystem/DOMFileSystem.h
@@ -35,6 +35,7 @@
#include "core/dom/ActiveDOMObject.h"
#include "core/dom/ScriptExecutionContext.h"
#include "modules/filesystem/DOMFileSystemBase.h"
+#include "modules/filesystem/EntriesCallback.h"
namespace WebCore {
@@ -67,19 +68,28 @@
static void scheduleCallback(ScriptExecutionContext*, PassRefPtr<CB>, PassRefPtr<CBArg>);
template <typename CB, typename CBArg>
+ static void scheduleCallback(ScriptExecutionContext*, PassRefPtr<CB>, const CBArg&);
+
+ template <typename CB, typename CBArg>
void scheduleCallback(PassRefPtr<CB> callback, PassRefPtr<CBArg> callbackArg)
{
scheduleCallback(scriptExecutionContext(), callback, callbackArg);
}
+ template <typename CB, typename CBArg>
+ void scheduleCallback(PassRefPtr<CB> callback, const CBArg& callbackArg)
+ {
+ scheduleCallback(scriptExecutionContext(), callback, callbackArg);
+ }
+
private:
DOMFileSystem(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
// A helper template to schedule a callback task.
template <typename CB, typename CBArg>
- class DispatchCallbackTask : public ScriptExecutionContext::Task {
+ class DispatchCallbacRefPtrArgTask : public ScriptExecutionContext::Task {
public:
- DispatchCallbackTask(PassRefPtr<CB> callback, PassRefPtr<CBArg> arg)
+ DispatchCallbacRefPtrArgTask(PassRefPtr<CB> callback, PassRefPtr<CBArg> arg)
: m_callback(callback)
, m_callbackArg(arg)
{
@@ -94,6 +104,25 @@
RefPtr<CB> m_callback;
RefPtr<CBArg> m_callbackArg;
};
+
+ template <typename CB, typename CBArg>
+ class DispatchCallbackNonPtrArgTask : public ScriptExecutionContext::Task {
+ public:
+ DispatchCallbackNonPtrArgTask(PassRefPtr<CB> callback, const CBArg& arg)
+ : m_callback(callback)
+ , m_callbackArg(arg)
+ {
+ }
+
+ virtual void performTask(ScriptExecutionContext*)
+ {
+ m_callback->handleEvent(m_callbackArg);
+ }
+
+ private:
+ RefPtr<CB> m_callback;
+ CBArg m_callbackArg;
+ };
};
template <typename CB, typename CBArg>
@@ -101,7 +130,15 @@
{
ASSERT(scriptExecutionContext->isContextThread());
if (callback)
- scriptExecutionContext->postTask(adoptPtr(new DispatchCallbackTask<CB, CBArg>(callback, arg)));
+ scriptExecutionContext->postTask(adoptPtr(new DispatchCallbacRefPtrArgTask<CB, CBArg>(callback, arg)));
+}
+
+template <typename CB, typename CBArg>
+void DOMFileSystem::scheduleCallback(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<CB> callback, const CBArg& arg)
+{
+ ASSERT(scriptExecutionContext->isContextThread());
+ if (callback)
+ scriptExecutionContext->postTask(adoptPtr(new DispatchCallbackNonPtrArgTask<CB, CBArg>(callback, arg)));
}
} // namespace
diff --git a/Source/modules/filesystem/DOMFileSystemBase.cpp b/Source/modules/filesystem/DOMFileSystemBase.cpp
index daa0706..7f9d8de 100644
--- a/Source/modules/filesystem/DOMFileSystemBase.cpp
+++ b/Source/modules/filesystem/DOMFileSystemBase.cpp
@@ -38,7 +38,7 @@
#include "modules/filesystem/DirectoryEntry.h"
#include "modules/filesystem/DirectoryReaderBase.h"
#include "modules/filesystem/EntriesCallback.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/EntryBase.h"
#include "modules/filesystem/EntryCallback.h"
#include "modules/filesystem/ErrorCallback.h"
diff --git a/Source/modules/filesystem/DirectoryReader.cpp b/Source/modules/filesystem/DirectoryReader.cpp
index 495875f..67634cb 100644
--- a/Source/modules/filesystem/DirectoryReader.cpp
+++ b/Source/modules/filesystem/DirectoryReader.cpp
@@ -33,7 +33,7 @@
#include "core/fileapi/FileError.h"
#include "modules/filesystem/EntriesCallback.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/ErrorCallback.h"
namespace WebCore {
@@ -47,7 +47,7 @@
void DirectoryReader::readEntries(PassRefPtr<EntriesCallback> entriesCallback, PassRefPtr<ErrorCallback> errorCallback)
{
if (!m_hasMoreEntries) {
- filesystem()->scheduleCallback(entriesCallback, EntryArray::create());
+ filesystem()->scheduleCallback(entriesCallback, EntryVector());
return;
}
filesystem()->readDirectory(this, m_fullPath, entriesCallback, errorCallback);
diff --git a/Source/modules/filesystem/DirectoryReaderSync.cpp b/Source/modules/filesystem/DirectoryReaderSync.cpp
index 083579b..3532c20 100644
--- a/Source/modules/filesystem/DirectoryReaderSync.cpp
+++ b/Source/modules/filesystem/DirectoryReaderSync.cpp
@@ -35,7 +35,6 @@
#include "core/dom/ExceptionCode.h"
#include "modules/filesystem/DirectoryEntry.h"
#include "modules/filesystem/DirectoryEntrySync.h"
-#include "modules/filesystem/EntryArraySync.h"
#include "modules/filesystem/EntrySync.h"
#include "modules/filesystem/FileEntrySync.h"
#include "modules/filesystem/SyncCallbackHelper.h"
@@ -48,16 +47,16 @@
ScriptWrappable::init(this);
}
-PassRefPtr<EntryArraySync> DirectoryReaderSync::readEntries(ExceptionState& es)
+EntrySyncVector DirectoryReaderSync::readEntries(ExceptionState& es)
{
if (!m_hasMoreEntries)
- return EntryArraySync::create();
+ return EntrySyncVector();
EntriesSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
if (!m_fileSystem->readDirectory(this, m_fullPath, helper.successCallback(), helper.errorCallback())) {
es.throwDOMException(InvalidModificationError);
setHasMoreEntries(false);
- return 0;
+ return EntrySyncVector();
}
return helper.getResult(es);
}
diff --git a/Source/modules/filesystem/DirectoryReaderSync.h b/Source/modules/filesystem/DirectoryReaderSync.h
index 814a72d..1ecdf82 100644
--- a/Source/modules/filesystem/DirectoryReaderSync.h
+++ b/Source/modules/filesystem/DirectoryReaderSync.h
@@ -35,13 +35,16 @@
#include "modules/filesystem/DirectoryReaderBase.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
-class EntryArraySync;
+class EntrySync;
class ExceptionState;
+typedef Vector<RefPtr<EntrySync> > EntrySyncVector;
+
class DirectoryReaderSync : public DirectoryReaderBase, public ScriptWrappable {
public:
static PassRefPtr<DirectoryReaderSync> create(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
@@ -49,7 +52,7 @@
return adoptRef(new DirectoryReaderSync(fileSystem, fullPath));
}
- PassRefPtr<EntryArraySync> readEntries(ExceptionState&);
+ EntrySyncVector readEntries(ExceptionState&);
private:
DirectoryReaderSync(PassRefPtr<DOMFileSystemBase>, const String& fullPath);
diff --git a/Source/modules/filesystem/DirectoryReaderSync.idl b/Source/modules/filesystem/DirectoryReaderSync.idl
index 9821f43..cf4937c 100644
--- a/Source/modules/filesystem/DirectoryReaderSync.idl
+++ b/Source/modules/filesystem/DirectoryReaderSync.idl
@@ -31,5 +31,5 @@
[
NoInterfaceObject
] interface DirectoryReaderSync {
- [RaisesException] EntryArraySync readEntries();
+ [RaisesException] EntrySync[] readEntries();
};
diff --git a/Source/modules/filesystem/EntriesCallback.h b/Source/modules/filesystem/EntriesCallback.h
index 3927eb0..de0851c 100644
--- a/Source/modules/filesystem/EntriesCallback.h
+++ b/Source/modules/filesystem/EntriesCallback.h
@@ -32,15 +32,17 @@
#define EntriesCallback_h
#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
namespace WebCore {
-class EntryArray;
+class Entry;
+typedef Vector<RefPtr<Entry> > EntryVector;
class EntriesCallback : public RefCounted<EntriesCallback> {
public:
virtual ~EntriesCallback() { }
- virtual bool handleEvent(EntryArray*) = 0;
+ virtual bool handleEvent(const EntryVector&) = 0;
};
} // namespace
diff --git a/Source/modules/filesystem/EntriesCallback.idl b/Source/modules/filesystem/EntriesCallback.idl
index ef89851..8bed9d5 100644
--- a/Source/modules/filesystem/EntriesCallback.idl
+++ b/Source/modules/filesystem/EntriesCallback.idl
@@ -29,5 +29,5 @@
*/
callback interface EntriesCallback {
- boolean handleEvent(EntryArray entries);
+ boolean handleEvent(Entry[] entries);
};
diff --git a/Source/modules/filesystem/EntryArray.cpp b/Source/modules/filesystem/EntryArray.cpp
deleted file mode 100644
index 773d49b..0000000
--- a/Source/modules/filesystem/EntryArray.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "config.h"
-#include "modules/filesystem/EntryArray.h"
-
-namespace WebCore {
-
-EntryArray::EntryArray()
-{
- ScriptWrappable::init(this);
-}
-
-Entry* EntryArray::item(unsigned index) const
-{
- if (index >= m_entries.size())
- return 0;
- return m_entries[index].get();
-}
-
-} // namespace
diff --git a/Source/modules/filesystem/EntryArray.h b/Source/modules/filesystem/EntryArray.h
deleted file mode 100644
index 5c77dc9..0000000
--- a/Source/modules/filesystem/EntryArray.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 EntryArray_h
-#define EntryArray_h
-
-#include "bindings/v8/ScriptWrappable.h"
-#include "modules/filesystem/Entry.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-
-namespace WebCore {
-
-class EntryArray : public RefCounted<EntryArray>, public ScriptWrappable {
-public:
- static PassRefPtr<EntryArray> create()
- {
- return adoptRef(new EntryArray());
- }
-
- unsigned length() const { return m_entries.size(); }
- Entry* item(unsigned index) const;
- void set(unsigned index, PassRefPtr<Entry>);
-
- bool isEmpty() const { return m_entries.isEmpty(); }
- void clear() { m_entries.clear(); }
- void append(PassRefPtr<Entry> entry) { m_entries.append(entry); }
-
-private:
- EntryArray();
-
- Vector<RefPtr<Entry> > m_entries;
-};
-
-} // namespace
-
-#endif // EntryArray_h
diff --git a/Source/modules/filesystem/EntryArray.idl b/Source/modules/filesystem/EntryArray.idl
deleted file mode 100644
index 2e637f4..0000000
--- a/Source/modules/filesystem/EntryArray.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-[
- NoInterfaceObject
-] interface EntryArray {
- readonly attribute unsigned long length;
- getter Entry item([IsIndex] unsigned long index);
-};
diff --git a/Source/modules/filesystem/EntryArraySync.cpp b/Source/modules/filesystem/EntryArraySync.cpp
deleted file mode 100644
index cde013d..0000000
--- a/Source/modules/filesystem/EntryArraySync.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "config.h"
-#include "modules/filesystem/EntryArraySync.h"
-
-#include "modules/filesystem/EntryArray.h"
-
-namespace WebCore {
-
-PassRefPtr<EntryArraySync> EntryArraySync::create(EntryArray* entries)
-{
- RefPtr<EntryArraySync> entriesSync = adoptRef(new EntryArraySync());
- if (entries) {
- for (unsigned i = 0; i < entries->length(); ++i)
- entriesSync->append(EntrySync::create(entries->item(i)));
- }
- return entriesSync.release();
-}
-
-EntryArraySync::EntryArraySync()
-{
- ScriptWrappable::init(this);
-}
-
-EntrySync* EntryArraySync::item(unsigned index) const
-{
- if (index >= m_entries.size())
- return 0;
- return m_entries[index].get();
-}
-
-}
diff --git a/Source/modules/filesystem/EntryArraySync.h b/Source/modules/filesystem/EntryArraySync.h
deleted file mode 100644
index 2a0508d..0000000
--- a/Source/modules/filesystem/EntryArraySync.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 EntryArraySync_h
-#define EntryArraySync_h
-
-#include "bindings/v8/ScriptWrappable.h"
-#include "modules/filesystem/EntrySync.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-
-namespace WebCore {
-
-class EntryArray;
-
-class EntryArraySync : public RefCounted<EntryArraySync>, public ScriptWrappable {
-public:
- static PassRefPtr<EntryArraySync> create()
- {
- return adoptRef(new EntryArraySync());
- }
-
- static PassRefPtr<EntryArraySync> create(EntryArray*);
-
- unsigned length() const { return m_entries.size(); }
- EntrySync* item(unsigned index) const;
-
- bool isEmpty() const { return m_entries.isEmpty(); }
- void clear() { m_entries.clear(); }
- void append(PassRefPtr<EntrySync> entry) { m_entries.append(entry); }
-
-private:
- EntryArraySync();
-
- Vector<RefPtr<EntrySync> > m_entries;
-};
-
-}
-
-#endif // EntryArraySync_h
diff --git a/Source/modules/filesystem/EntryArraySync.idl b/Source/modules/filesystem/EntryArraySync.idl
deleted file mode 100644
index e456446..0000000
--- a/Source/modules/filesystem/EntryArraySync.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-[
- NoInterfaceObject
-] interface EntryArraySync {
- readonly attribute unsigned long length;
- getter EntrySync item([IsIndex] unsigned long index);
-};
diff --git a/Source/modules/filesystem/FileSystemCallbacks.cpp b/Source/modules/filesystem/FileSystemCallbacks.cpp
index c1f71ee..88104c9 100644
--- a/Source/modules/filesystem/FileSystemCallbacks.cpp
+++ b/Source/modules/filesystem/FileSystemCallbacks.cpp
@@ -42,7 +42,7 @@
#include "modules/filesystem/DirectoryEntry.h"
#include "modules/filesystem/DirectoryReader.h"
#include "modules/filesystem/EntriesCallback.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/EntryCallback.h"
#include "modules/filesystem/ErrorCallback.h"
#include "modules/filesystem/FileEntry.h"
@@ -111,7 +111,6 @@
, m_successCallback(successCallback)
, m_directoryReader(directoryReader)
, m_basePath(basePath)
- , m_entries(EntryArray::create())
{
ASSERT(m_directoryReader);
}
@@ -119,16 +118,16 @@
void EntriesCallbacks::didReadDirectoryEntry(const String& name, bool isDirectory)
{
if (isDirectory)
- m_entries->append(DirectoryEntry::create(m_directoryReader->filesystem(), DOMFilePath::append(m_basePath, name)));
+ m_entries.append(DirectoryEntry::create(m_directoryReader->filesystem(), DOMFilePath::append(m_basePath, name)));
else
- m_entries->append(FileEntry::create(m_directoryReader->filesystem(), DOMFilePath::append(m_basePath, name)));
+ m_entries.append(FileEntry::create(m_directoryReader->filesystem(), DOMFilePath::append(m_basePath, name)));
}
void EntriesCallbacks::didReadDirectoryEntries(bool hasMore)
{
m_directoryReader->setHasMoreEntries(hasMore);
if (m_successCallback)
- m_successCallback->handleEvent(m_entries.get());
+ m_successCallback->handleEvent(m_entries);
}
// FileSystemCallbacks --------------------------------------------------------
diff --git a/Source/modules/filesystem/FileSystemCallbacks.h b/Source/modules/filesystem/FileSystemCallbacks.h
index 7b5570e..f0d9604 100644
--- a/Source/modules/filesystem/FileSystemCallbacks.h
+++ b/Source/modules/filesystem/FileSystemCallbacks.h
@@ -32,6 +32,7 @@
#define FileSystemCallbacks_h
#include "core/platform/AsyncFileSystemCallbacks.h"
+#include "modules/filesystem/EntriesCallback.h"
#include "modules/filesystem/FileSystemType.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
@@ -43,7 +44,6 @@
class DOMFileSystemBase;
class DirectoryReaderBase;
class EntriesCallback;
-class EntryArray;
class EntryCallback;
class ErrorCallback;
struct FileMetadata;
@@ -105,7 +105,7 @@
RefPtr<EntriesCallback> m_successCallback;
RefPtr<DirectoryReaderBase> m_directoryReader;
String m_basePath;
- RefPtr<EntryArray> m_entries;
+ EntryVector m_entries;
};
class FileSystemCallbacks : public FileSystemCallbacksBase {
diff --git a/Source/modules/filesystem/FileWriter.idl b/Source/modules/filesystem/FileWriter.idl
index 9216204..2d4b54b 100644
--- a/Source/modules/filesystem/FileWriter.idl
+++ b/Source/modules/filesystem/FileWriter.idl
@@ -50,10 +50,10 @@
readonly attribute long long position;
readonly attribute long long length;
- attribute EventListener onwritestart;
- attribute EventListener onprogress;
- attribute EventListener onwrite;
- attribute EventListener onabort;
- attribute EventListener onerror;
- attribute EventListener onwriteend;
+ attribute EventHandler onwritestart;
+ attribute EventHandler onprogress;
+ attribute EventHandler onwrite;
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+ attribute EventHandler onwriteend;
};
diff --git a/Source/modules/filesystem/HTMLInputElementFileSystem.cpp b/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
index c5d797a..9bb9c8c 100644
--- a/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
+++ b/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
@@ -38,24 +38,24 @@
#include "modules/filesystem/DOMFilePath.h"
#include "modules/filesystem/DOMFileSystem.h"
#include "modules/filesystem/DirectoryEntry.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/FileEntry.h"
namespace WebCore {
// static
-PassRefPtr<EntryArray> HTMLInputElementFileSystem::webkitEntries(ScriptExecutionContext* scriptExecutionContext, HTMLInputElement* input)
+EntryVector HTMLInputElementFileSystem::webkitEntries(ScriptExecutionContext* scriptExecutionContext, HTMLInputElement* input)
{
- RefPtr<EntryArray> array = EntryArray::create();
+ EntryVector entries;
FileList* files = input->files();
if (!files)
- return array;
+ return entries;
RefPtr<DOMFileSystem> filesystem = DOMFileSystem::createIsolatedFileSystem(scriptExecutionContext, input->droppedFileSystemId());
if (!filesystem) {
// Drag-drop isolated filesystem is not available.
- return array;
+ return entries;
}
for (unsigned i = 0; i < files->length(); ++i) {
@@ -69,11 +69,11 @@
// The dropped entries are mapped as top-level entries in the isolated filesystem.
String virtualPath = DOMFilePath::append("/", file->name());
if (metadata.type == FileMetadata::TypeDirectory)
- array->append(DirectoryEntry::create(filesystem, virtualPath));
+ entries.append(DirectoryEntry::create(filesystem, virtualPath));
else
- array->append(FileEntry::create(filesystem, virtualPath));
+ entries.append(FileEntry::create(filesystem, virtualPath));
}
- return array;
+ return entries;
}
HTMLInputElementFileSystem::HTMLInputElementFileSystem()
diff --git a/Source/modules/filesystem/HTMLInputElementFileSystem.h b/Source/modules/filesystem/HTMLInputElementFileSystem.h
index f0ce757..cb9f93e 100644
--- a/Source/modules/filesystem/HTMLInputElementFileSystem.h
+++ b/Source/modules/filesystem/HTMLInputElementFileSystem.h
@@ -31,17 +31,18 @@
#ifndef HTMLInputElementFileSystem_h
#define HTMLInputElementFileSystem_h
+#include "modules/filesystem/EntriesCallback.h"
#include "wtf/PassRefPtr.h"
namespace WebCore {
-class EntryArray;
+class Entry;
class HTMLInputElement;
class ScriptExecutionContext;
class HTMLInputElementFileSystem {
public:
- static PassRefPtr<EntryArray> webkitEntries(ScriptExecutionContext*, HTMLInputElement*);
+ static EntryVector webkitEntries(ScriptExecutionContext*, HTMLInputElement*);
private:
HTMLInputElementFileSystem();
diff --git a/Source/modules/filesystem/HTMLInputElementFileSystem.idl b/Source/modules/filesystem/HTMLInputElementFileSystem.idl
index fc4a29d..758d6fc 100644
--- a/Source/modules/filesystem/HTMLInputElementFileSystem.idl
+++ b/Source/modules/filesystem/HTMLInputElementFileSystem.idl
@@ -29,6 +29,6 @@
*/
partial interface HTMLInputElement {
- [EnabledAtRuntime=FileSystem,CallWith=ScriptExecutionContext] readonly attribute EntryArray webkitEntries;
+[EnabledAtRuntime=FileSystem,CallWith=ScriptExecutionContext] readonly attribute Entry[] webkitEntries;
};
diff --git a/Source/modules/filesystem/SyncCallbackHelper.h b/Source/modules/filesystem/SyncCallbackHelper.h
index 944144d..c1eedc7 100644
--- a/Source/modules/filesystem/SyncCallbackHelper.h
+++ b/Source/modules/filesystem/SyncCallbackHelper.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -35,9 +36,10 @@
#include "core/fileapi/FileError.h"
#include "core/html/VoidCallback.h"
#include "modules/filesystem/DirectoryEntry.h"
+#include "modules/filesystem/DirectoryReaderSync.h"
#include "modules/filesystem/EntriesCallback.h"
-#include "modules/filesystem/EntryArraySync.h"
#include "modules/filesystem/EntryCallback.h"
+#include "modules/filesystem/EntrySync.h"
#include "modules/filesystem/ErrorCallback.h"
#include "modules/filesystem/FileEntry.h"
#include "modules/filesystem/FileSystemCallback.h"
@@ -47,11 +49,32 @@
namespace WebCore {
-class AsyncFileSystem;
-class DirectoryEntrySync;
-class EntryArraySync;
-class EntrySync;
-class FileEntrySync;
+template <typename ResultType, typename CallbackArg>
+struct HelperResultType {
+ typedef PassRefPtr<ResultType> ReturnType;
+ typedef RefPtr<ResultType> StorageType;
+
+ static ReturnType createFromCallbackArg(CallbackArg argument)
+ {
+ return ResultType::create(argument);
+ }
+};
+
+template <>
+struct HelperResultType<EntrySyncVector, const EntryVector&> {
+ typedef EntrySyncVector ReturnType;
+ typedef EntrySyncVector StorageType;
+
+ static EntrySyncVector createFromCallbackArg(const EntryVector& entries)
+ {
+ EntrySyncVector result;
+ size_t entryCount = entries.size();
+ result.reserveInitialCapacity(entryCount);
+ for (size_t i = 0; i < entryCount; ++i)
+ result.uncheckedAppend(EntrySync::create(entries[i].get()));
+ return result;
+ }
+};
// A helper template for FileSystemSync implementation.
template <typename SuccessCallback, typename ObserverType, typename CallbackArg, typename ResultType>
@@ -59,6 +82,10 @@
WTF_MAKE_NONCOPYABLE(SyncCallbackHelper);
public:
typedef SyncCallbackHelper<SuccessCallback, ObserverType, CallbackArg, ResultType> HelperType;
+ typedef HelperResultType<ResultType, CallbackArg> ResultTypeTrait;
+ typedef typename ResultTypeTrait::StorageType ResultStorageType;
+ typedef typename ResultTypeTrait::ReturnType ResultReturnType;
+
SyncCallbackHelper(ObserverType* observer = 0)
: m_observer(observer)
, m_successCallback(SuccessCallbackImpl::create(this))
@@ -68,7 +95,7 @@
{
}
- PassRefPtr<ResultType> getResult(ExceptionState& es)
+ ResultReturnType getResult(ExceptionState& es)
{
if (m_observer) {
while (!m_completed) {
@@ -81,7 +108,7 @@
if (m_errorCode)
FileError::throwDOMException(es, m_errorCode);
- return m_result.release();
+ return m_result;
}
PassRefPtr<SuccessCallback> successCallback() { return m_successCallback; }
@@ -101,9 +128,9 @@
return true;
}
- virtual bool handleEvent(CallbackArg* arg)
+ virtual bool handleEvent(CallbackArg arg)
{
- m_helper->setResult(ResultType::create(arg));
+ m_helper->setResult(arg);
return true;
}
@@ -146,16 +173,16 @@
m_completed = true;
}
- void setResult(PassRefPtr<ResultType> result)
+ void setResult(CallbackArg result)
{
- m_result = result;
+ m_result = ResultTypeTrait::createFromCallbackArg(result);
m_completed = true;
}
ObserverType* m_observer;
RefPtr<SuccessCallbackImpl> m_successCallback;
RefPtr<ErrorCallbackImpl> m_errorCallback;
- RefPtr<ResultType> m_result;
+ ResultStorageType m_result;
FileError::ErrorCode m_errorCode;
bool m_completed;
};
@@ -174,11 +201,11 @@
}
};
-typedef SyncCallbackHelper<EntryCallback, AsyncFileSystem, Entry, EntrySync> EntrySyncCallbackHelper;
-typedef SyncCallbackHelper<EntriesCallback, AsyncFileSystem, EntryArray, EntryArraySync> EntriesSyncCallbackHelper;
-typedef SyncCallbackHelper<MetadataCallback, AsyncFileSystem, Metadata, Metadata> MetadataSyncCallbackHelper;
-typedef SyncCallbackHelper<VoidCallback, AsyncFileSystem, EmptyType, EmptyType> VoidSyncCallbackHelper;
-typedef SyncCallbackHelper<FileSystemCallback, EmptyObserverType, DOMFileSystem, DOMFileSystemSync> FileSystemSyncCallbackHelper;
+typedef SyncCallbackHelper<EntryCallback, AsyncFileSystem, Entry*, EntrySync> EntrySyncCallbackHelper;
+typedef SyncCallbackHelper<EntriesCallback, AsyncFileSystem, const EntryVector&, EntrySyncVector> EntriesSyncCallbackHelper;
+typedef SyncCallbackHelper<MetadataCallback, AsyncFileSystem, Metadata*, Metadata> MetadataSyncCallbackHelper;
+typedef SyncCallbackHelper<VoidCallback, AsyncFileSystem, EmptyType*, EmptyType> VoidSyncCallbackHelper;
+typedef SyncCallbackHelper<FileSystemCallback, EmptyObserverType, DOMFileSystem*, DOMFileSystemSync> FileSystemSyncCallbackHelper;
} // namespace WebCore
diff --git a/Source/modules/geolocation/Geolocation.cpp b/Source/modules/geolocation/Geolocation.cpp
index 17a7b27..66da490 100644
--- a/Source/modules/geolocation/Geolocation.cpp
+++ b/Source/modules/geolocation/Geolocation.cpp
@@ -165,7 +165,7 @@
}
if (m_errorCallback) {
- RefPtr<PositionError> error = PositionError::create(PositionError::TIMEOUT, ASCIILiteral("Timeout expired"));
+ RefPtr<PositionError> error = PositionError::create(PositionError::TIMEOUT, "Timeout expired");
m_errorCallback->handleEvent(error.get());
}
m_geolocation->requestTimedOut(this);
@@ -320,7 +320,7 @@
// Check whether permissions have already been denied. Note that if this is the case,
// the permission state can not change again in the lifetime of this page.
if (isDenied())
- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));
+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
else if (haveSuitableCachedPosition(notifier->options()))
notifier->setUseCachedPosition();
else if (notifier->hasZeroTimeout())
@@ -332,7 +332,7 @@
} else if (startUpdating(notifier))
notifier->startTimerIfNeeded();
else
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
}
void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
@@ -350,7 +350,7 @@
// This is called asynchronously, so the permissions could have been denied
// since we last checked in startRequest.
if (isDenied()) {
- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));
+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
return;
}
@@ -384,7 +384,7 @@
if (notifier->hasZeroTimeout() || startUpdating(notifier))
notifier->startTimerIfNeeded();
else
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
}
}
@@ -446,7 +446,7 @@
}
if (!isAllowed()) {
- RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage));
+ RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage);
error->setIsFatal(true);
handleError(error.get());
m_requestsAwaitingCachedPosition.clear();
@@ -512,7 +512,7 @@
{
GeoNotifierVector::const_iterator end = notifiers.end();
for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it)
- (*it)->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(framelessDocumentErrorMessage)));
+ (*it)->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, framelessDocumentErrorMessage));
}
void Geolocation::cancelAllRequests()
@@ -671,9 +671,10 @@
if (startUpdating(notifier))
notifier->startTimerIfNeeded();
else
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
- } else
- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));
+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
+ } else {
+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
+ }
}
}
diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp
index 80bac78..dd9f80e 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -101,7 +101,7 @@
{
position = InspectorInstrumentation::overrideGeolocationPosition(m_page, position);
if (!position) {
- errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, ASCIILiteral("PositionUnavailable")).get());
+ errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, "PositionUnavailable").get());
return;
}
m_lastPosition = position;
diff --git a/Source/modules/indexeddb/IDBDatabase.idl b/Source/modules/indexeddb/IDBDatabase.idl
index 49b6acf..3d81ed2 100644
--- a/Source/modules/indexeddb/IDBDatabase.idl
+++ b/Source/modules/indexeddb/IDBDatabase.idl
@@ -31,10 +31,10 @@
readonly attribute IDBAny version;
readonly attribute DOMStringList objectStoreNames;
- attribute EventListener onabort;
- attribute EventListener onclose;
- attribute EventListener onerror;
- attribute EventListener onversionchange;
+ attribute EventHandler onabort;
+ attribute EventHandler onclose;
+ attribute EventHandler onerror;
+ attribute EventHandler onversionchange;
[RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
[RaisesException] void deleteObjectStore(DOMString name);
diff --git a/Source/modules/indexeddb/IDBOpenDBRequest.idl b/Source/modules/indexeddb/IDBOpenDBRequest.idl
index 7dbe0d1..a77f28f 100644
--- a/Source/modules/indexeddb/IDBOpenDBRequest.idl
+++ b/Source/modules/indexeddb/IDBOpenDBRequest.idl
@@ -24,6 +24,6 @@
*/
interface IDBOpenDBRequest : IDBRequest {
- attribute EventListener onblocked;
- attribute EventListener onupgradeneeded;
+ attribute EventHandler onblocked;
+ attribute EventHandler onupgradeneeded;
};
diff --git a/Source/modules/indexeddb/IDBRequest.idl b/Source/modules/indexeddb/IDBRequest.idl
index e8f87b8..1faea26 100644
--- a/Source/modules/indexeddb/IDBRequest.idl
+++ b/Source/modules/indexeddb/IDBRequest.idl
@@ -40,6 +40,6 @@
readonly attribute DOMString readyState;
// Events
- attribute EventListener onsuccess;
- attribute EventListener onerror;
+ attribute EventHandler onsuccess;
+ attribute EventHandler onerror;
};
diff --git a/Source/modules/indexeddb/IDBTransaction.idl b/Source/modules/indexeddb/IDBTransaction.idl
index 9eac27f..1787cb4 100644
--- a/Source/modules/indexeddb/IDBTransaction.idl
+++ b/Source/modules/indexeddb/IDBTransaction.idl
@@ -38,7 +38,7 @@
[RaisesException] void abort ();
// Events
- attribute EventListener onabort;
- attribute EventListener oncomplete;
- attribute EventListener onerror;
+ attribute EventHandler onabort;
+ attribute EventHandler oncomplete;
+ attribute EventHandler onerror;
};
diff --git a/Source/modules/mediasource/MediaSourceBase.cpp b/Source/modules/mediasource/MediaSourceBase.cpp
index 98a4565..420ddd8 100644
--- a/Source/modules/mediasource/MediaSourceBase.cpp
+++ b/Source/modules/mediasource/MediaSourceBase.cpp
@@ -47,7 +47,7 @@
: ActiveDOMObject(context)
, m_readyState(closedKeyword())
, m_asyncEventQueue(GenericEventQueue::create(this))
- , m_attached(false)
+ , m_attachedElement(0)
{
}
@@ -77,7 +77,7 @@
{
ASSERT(mediaSourcePrivate);
ASSERT(!m_private);
- ASSERT(m_attached);
+ ASSERT(m_attachedElement);
m_private = mediaSourcePrivate;
setReadyState(openKeyword());
}
@@ -151,6 +151,10 @@
es.throwDOMException(InvalidStateError);
return;
}
+
+ // Synchronously process duration change algorithm to enforce any required
+ // seek is started prior to returning.
+ m_attachedElement->durationChanged(duration);
m_private->setDuration(duration);
}
@@ -164,7 +168,7 @@
if (state == closedKeyword()) {
m_private.clear();
- m_attached = false;
+ m_attachedElement = 0;
}
if (oldState == state)
@@ -221,14 +225,14 @@
setReadyState(closedKeyword());
}
-bool MediaSourceBase::attachToElement()
+bool MediaSourceBase::attachToElement(HTMLMediaElement* element)
{
- if (m_attached)
+ if (m_attachedElement)
return false;
ASSERT(isClosed());
- m_attached = true;
+ m_attachedElement = element;
return true;
}
diff --git a/Source/modules/mediasource/MediaSourceBase.h b/Source/modules/mediasource/MediaSourceBase.h
index 14e5d38..786bc2a 100644
--- a/Source/modules/mediasource/MediaSourceBase.h
+++ b/Source/modules/mediasource/MediaSourceBase.h
@@ -59,7 +59,7 @@
bool isOpen() const;
// HTMLMediaSource
- virtual bool attachToElement() OVERRIDE;
+ virtual bool attachToElement(HTMLMediaElement*) OVERRIDE;
virtual void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>) OVERRIDE;
virtual void close() OVERRIDE;
virtual bool isClosed() const OVERRIDE;
@@ -106,7 +106,7 @@
EventTargetData m_eventTargetData;
AtomicString m_readyState;
OwnPtr<GenericEventQueue> m_asyncEventQueue;
- bool m_attached;
+ HTMLMediaElement* m_attachedElement;
};
}
diff --git a/Source/modules/mediasource/SourceBuffer.cpp b/Source/modules/mediasource/SourceBuffer.cpp
index 98b23a9..5cf1e16 100644
--- a/Source/modules/mediasource/SourceBuffer.cpp
+++ b/Source/modules/mediasource/SourceBuffer.cpp
@@ -41,6 +41,9 @@
#include "modules/mediasource/MediaSource.h"
#include "wtf/ArrayBuffer.h"
#include "wtf/ArrayBufferView.h"
+#include "wtf/MathExtras.h"
+
+#include <limits>
namespace WebCore {
@@ -58,6 +61,8 @@
, m_asyncEventQueue(asyncEventQueue)
, m_updating(false)
, m_timestampOffset(0)
+ , m_appendWindowStart(0)
+ , m_appendWindowEnd(std::numeric_limits<double>::infinity())
, m_appendBufferTimer(this, &SourceBuffer::appendBufferTimerFired)
, m_removeTimer(this, &SourceBuffer::removeTimerFired)
, m_pendingRemoveStart(-1)
@@ -122,6 +127,73 @@
m_timestampOffset = offset;
}
+double SourceBuffer::appendWindowStart() const
+{
+ return m_appendWindowStart;
+}
+
+void SourceBuffer::setAppendWindowStart(double start, ExceptionState& es)
+{
+ // Enforce throwing an exception on restricted double values.
+ if (std::isnan(start)
+ || start == std::numeric_limits<double>::infinity()
+ || start == -std::numeric_limits<double>::infinity()) {
+ es.throwDOMException(TypeMismatchError);
+ return;
+ }
+
+ // Section 3.1 appendWindowStart attribute setter steps.
+ // 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
+ // InvalidStateError exception and abort these steps.
+ // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
+ if (isRemoved() || m_updating) {
+ es.throwDOMException(InvalidStateError);
+ return;
+ }
+
+ // 3. If the new value is less than 0 or greater than or equal to appendWindowEnd then throw an InvalidAccessError
+ // exception and abort these steps.
+ if (start < 0 || start >= m_appendWindowEnd) {
+ es.throwDOMException(InvalidAccessError);
+ return;
+ }
+
+ m_private->setAppendWindowStart(start);
+
+ // 4. Update the attribute to the new value.
+ m_appendWindowStart = start;
+}
+
+double SourceBuffer::appendWindowEnd() const
+{
+ return m_appendWindowEnd;
+}
+
+void SourceBuffer::setAppendWindowEnd(double end, ExceptionState& es)
+{
+ // Section 3.1 appendWindowEnd attribute setter steps.
+ // 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
+ // InvalidStateError exception and abort these steps.
+ // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
+ if (isRemoved() || m_updating) {
+ es.throwDOMException(InvalidStateError);
+ return;
+ }
+
+ // 3. If the new value equals NaN, then throw an InvalidAccessError and abort these steps.
+ // 4. If the new value is less than or equal to appendWindowStart then throw an InvalidAccessError
+ // exception and abort these steps.
+ if (std::isnan(end) || end <= m_appendWindowStart) {
+ es.throwDOMException(InvalidAccessError);
+ return;
+ }
+
+ m_private->setAppendWindowEnd(end);
+
+ // 5. Update the attribute to the new value.
+ m_appendWindowEnd = end;
+}
+
void SourceBuffer::appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionState& es)
{
// Section 3.2 appendBuffer()
@@ -167,7 +239,11 @@
// 4. Run the reset parser state algorithm.
m_private->abort();
- // FIXME(229408) Add steps 5-6 update appendWindowStart & appendWindowEnd.
+ // 5. Set appendWindowStart to 0.
+ setAppendWindowStart(0, es);
+
+ // 6. Set appendWindowEnd to positive Infinity.
+ setAppendWindowEnd(std::numeric_limits<double>::infinity(), es);
}
void SourceBuffer::remove(double start, double end, ExceptionState& es)
diff --git a/Source/modules/mediasource/SourceBuffer.h b/Source/modules/mediasource/SourceBuffer.h
index e33f0c0..590b202 100644
--- a/Source/modules/mediasource/SourceBuffer.h
+++ b/Source/modules/mediasource/SourceBuffer.h
@@ -62,6 +62,10 @@
void appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionState&);
void abort(ExceptionState&);
void remove(double start, double end, ExceptionState&);
+ double appendWindowStart() const;
+ void setAppendWindowStart(double, ExceptionState&);
+ double appendWindowEnd() const;
+ void setAppendWindowEnd(double, ExceptionState&);
void abortIfUpdating();
void removedFromMediaSource();
@@ -102,6 +106,8 @@
bool m_updating;
double m_timestampOffset;
+ double m_appendWindowStart;
+ double m_appendWindowEnd;
Vector<unsigned char> m_pendingAppendData;
Timer<SourceBuffer> m_appendBufferTimer;
diff --git a/Source/modules/mediasource/SourceBuffer.idl b/Source/modules/mediasource/SourceBuffer.idl
index 2bad546..f254f03 100644
--- a/Source/modules/mediasource/SourceBuffer.idl
+++ b/Source/modules/mediasource/SourceBuffer.idl
@@ -42,6 +42,12 @@
// Applies an offset to media segment timestamps.
[SetterRaisesException] attribute double timestampOffset;
+ // Presentation timestamp for the start of append window.
+ [SetterRaisesException] attribute double appendWindowStart;
+
+ // Presentation timestamp for the end of append window.
+ [SetterRaisesException] attribute double appendWindowEnd;
+
// Append segment data.
[RaisesException] void appendBuffer(ArrayBuffer data);
[RaisesException] void appendBuffer(ArrayBufferView data);
diff --git a/Source/modules/mediastream/MediaConstraintsImpl.cpp b/Source/modules/mediastream/MediaConstraintsImpl.cpp
index 0ba8b75..10d1c8b 100644
--- a/Source/modules/mediastream/MediaConstraintsImpl.cpp
+++ b/Source/modules/mediastream/MediaConstraintsImpl.cpp
@@ -63,8 +63,8 @@
Vector<String> names;
constraints.getOwnPropertyNames(names);
- String mandatory = ASCIILiteral("mandatory");
- String optional = ASCIILiteral("optional");
+ String mandatory("mandatory");
+ String optional("optional");
for (Vector<String>::iterator it = names.begin(); it != names.end(); ++it) {
if (*it != mandatory && *it != optional)
diff --git a/Source/modules/mediastream/MediaStream.idl b/Source/modules/mediastream/MediaStream.idl
index 5270472..62d387f 100644
--- a/Source/modules/mediastream/MediaStream.idl
+++ b/Source/modules/mediastream/MediaStream.idl
@@ -44,8 +44,8 @@
readonly attribute boolean ended;
void stop();
- attribute EventListener onended;
- attribute EventListener onaddtrack;
- attribute EventListener onremovetrack;
+ attribute EventHandler onended;
+ attribute EventHandler onaddtrack;
+ attribute EventHandler onremovetrack;
};
diff --git a/Source/modules/mediastream/MediaStreamTrack.cpp b/Source/modules/mediastream/MediaStreamTrack.cpp
index e8695fd..58c5612 100644
--- a/Source/modules/mediastream/MediaStreamTrack.cpp
+++ b/Source/modules/mediastream/MediaStreamTrack.cpp
@@ -61,8 +61,8 @@
String MediaStreamTrack::kind() const
{
- DEFINE_STATIC_LOCAL(String, audioKind, (ASCIILiteral("audio")));
- DEFINE_STATIC_LOCAL(String, videoKind, (ASCIILiteral("video")));
+ DEFINE_STATIC_LOCAL(String, audioKind, ("audio"));
+ DEFINE_STATIC_LOCAL(String, videoKind, ("video"));
switch (m_component->source()->type()) {
case MediaStreamSource::TypeAudio:
@@ -106,15 +106,15 @@
String MediaStreamTrack::readyState() const
{
if (m_stopped)
- return ASCIILiteral("ended");
+ return "ended";
switch (m_component->source()->readyState()) {
case MediaStreamSource::ReadyStateLive:
- return ASCIILiteral("live");
+ return "live";
case MediaStreamSource::ReadyStateMuted:
- return ASCIILiteral("muted");
+ return "muted";
case MediaStreamSource::ReadyStateEnded:
- return ASCIILiteral("ended");
+ return "ended";
}
ASSERT_NOT_REACHED();
diff --git a/Source/modules/mediastream/MediaStreamTrack.idl b/Source/modules/mediastream/MediaStreamTrack.idl
index c2df9f9..f5d9ea9 100644
--- a/Source/modules/mediastream/MediaStreamTrack.idl
+++ b/Source/modules/mediastream/MediaStreamTrack.idl
@@ -32,9 +32,9 @@
readonly attribute DOMString readyState;
- attribute EventListener onmute;
- attribute EventListener onunmute;
- attribute EventListener onended;
+ attribute EventHandler onmute;
+ attribute EventHandler onunmute;
+ attribute EventHandler onended;
[CallWith=ScriptExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback);
};
diff --git a/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h b/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
index 585031f..d58afeb 100644
--- a/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
+++ b/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
@@ -36,7 +36,7 @@
class MediaStreamTrackSourcesCallback : public RefCounted<MediaStreamTrackSourcesCallback> {
public:
virtual ~MediaStreamTrackSourcesCallback() { }
- virtual bool handleEvent(SourceInfoVector) = 0;
+ virtual bool handleEvent(const SourceInfoVector&) = 0;
};
} // namespace WebCore
diff --git a/Source/modules/mediastream/RTCDTMFSender.idl b/Source/modules/mediastream/RTCDTMFSender.idl
index c06a48c..375a6a5 100644
--- a/Source/modules/mediastream/RTCDTMFSender.idl
+++ b/Source/modules/mediastream/RTCDTMFSender.idl
@@ -35,5 +35,5 @@
[RaisesException] void insertDTMF(DOMString tones, optional long duration, optional long interToneGap);
- attribute EventListener ontonechange;
+ attribute EventHandler ontonechange;
};
diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
index d90f8e7..4a3a5c0 100644
--- a/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/Source/modules/mediastream/RTCDataChannel.cpp
@@ -114,13 +114,13 @@
{
switch (m_readyState) {
case ReadyStateConnecting:
- return ASCIILiteral("connecting");
+ return "connecting";
case ReadyStateOpen:
- return ASCIILiteral("open");
+ return "open";
case ReadyStateClosing:
- return ASCIILiteral("closing");
+ return "closing";
case ReadyStateClosed:
- return ASCIILiteral("closed");
+ return "closed";
}
ASSERT_NOT_REACHED();
@@ -136,9 +136,9 @@
{
switch (m_binaryType) {
case BinaryTypeBlob:
- return ASCIILiteral("blob");
+ return "blob";
case BinaryTypeArrayBuffer:
- return ASCIILiteral("arraybuffer");
+ return "arraybuffer";
}
ASSERT_NOT_REACHED();
return String();
diff --git a/Source/modules/mediastream/RTCDataChannel.idl b/Source/modules/mediastream/RTCDataChannel.idl
index b307d37..f826fb1 100644
--- a/Source/modules/mediastream/RTCDataChannel.idl
+++ b/Source/modules/mediastream/RTCDataChannel.idl
@@ -49,8 +49,8 @@
void close();
- attribute EventListener onopen;
- attribute EventListener onerror;
- attribute EventListener onclose;
- attribute EventListener onmessage;
+ attribute EventHandler onopen;
+ attribute EventHandler onerror;
+ attribute EventHandler onclose;
+ attribute EventHandler onmessage;
};
diff --git a/Source/modules/mediastream/RTCPeerConnection.cpp b/Source/modules/mediastream/RTCPeerConnection.cpp
index 9d18b71..9f99d94 100644
--- a/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -302,17 +302,17 @@
{
switch (m_signalingState) {
case SignalingStateStable:
- return ASCIILiteral("stable");
+ return "stable";
case SignalingStateHaveLocalOffer:
- return ASCIILiteral("have-local-offer");
+ return "have-local-offer";
case SignalingStateHaveRemoteOffer:
- return ASCIILiteral("have-remote-offer");
+ return "have-remote-offer";
case SignalingStateHaveLocalPrAnswer:
- return ASCIILiteral("have-local-pranswer");
+ return "have-local-pranswer";
case SignalingStateHaveRemotePrAnswer:
- return ASCIILiteral("have-remote-pranswer");
+ return "have-remote-pranswer";
case SignalingStateClosed:
- return ASCIILiteral("closed");
+ return "closed";
}
ASSERT_NOT_REACHED();
@@ -323,11 +323,11 @@
{
switch (m_iceGatheringState) {
case IceGatheringStateNew:
- return ASCIILiteral("new");
+ return "new";
case IceGatheringStateGathering:
- return ASCIILiteral("gathering");
+ return "gathering";
case IceGatheringStateComplete:
- return ASCIILiteral("complete");
+ return "complete";
}
ASSERT_NOT_REACHED();
@@ -338,19 +338,19 @@
{
switch (m_iceConnectionState) {
case IceConnectionStateNew:
- return ASCIILiteral("new");
+ return "new";
case IceConnectionStateChecking:
- return ASCIILiteral("checking");
+ return "checking";
case IceConnectionStateConnected:
- return ASCIILiteral("connected");
+ return "connected";
case IceConnectionStateCompleted:
- return ASCIILiteral("completed");
+ return "completed";
case IceConnectionStateFailed:
- return ASCIILiteral("failed");
+ return "failed";
case IceConnectionStateDisconnected:
- return ASCIILiteral("disconnected");
+ return "disconnected";
case IceConnectionStateClosed:
- return ASCIILiteral("closed");
+ return "closed";
}
ASSERT_NOT_REACHED();
diff --git a/Source/modules/mediastream/RTCPeerConnection.idl b/Source/modules/mediastream/RTCPeerConnection.idl
index a2255c8..4a8c614 100644
--- a/Source/modules/mediastream/RTCPeerConnection.idl
+++ b/Source/modules/mediastream/RTCPeerConnection.idl
@@ -69,12 +69,12 @@
[RaisesException] void close();
- attribute EventListener onnegotiationneeded;
- attribute EventListener onicecandidate;
- attribute EventListener onsignalingstatechange;
- attribute EventListener onaddstream;
- attribute EventListener onremovestream;
- attribute EventListener oniceconnectionstatechange;
- attribute EventListener ondatachannel;
+ attribute EventHandler onnegotiationneeded;
+ attribute EventHandler onicecandidate;
+ attribute EventHandler onsignalingstatechange;
+ attribute EventHandler onaddstream;
+ attribute EventHandler onremovestream;
+ attribute EventHandler oniceconnectionstatechange;
+ attribute EventHandler ondatachannel;
};
diff --git a/Source/modules/mediastream/SourceInfo.cpp b/Source/modules/mediastream/SourceInfo.cpp
index e57df18..c748d6e 100644
--- a/Source/modules/mediastream/SourceInfo.cpp
+++ b/Source/modules/mediastream/SourceInfo.cpp
@@ -51,11 +51,11 @@
{
switch (m_webSourceInfo.kind()) {
case WebKit::WebSourceInfo::SourceKindAudio:
- return ASCIILiteral("audio");
+ return "audio";
case WebKit::WebSourceInfo::SourceKindVideo:
- return ASCIILiteral("video");
+ return "video";
case WebKit::WebSourceInfo::SourceKindNone:
- return ASCIILiteral("none");
+ return "none";
}
ASSERT_NOT_REACHED();
@@ -73,9 +73,9 @@
case WebKit::WebSourceInfo::VideoFacingModeNone:
return String();
case WebKit::WebSourceInfo::VideoFacingModeUser:
- return ASCIILiteral("user");
+ return "user";
case WebKit::WebSourceInfo::VideoFacingModeEnvironment:
- return ASCIILiteral("environment");
+ return "environment";
}
ASSERT_NOT_REACHED();
diff --git a/Source/modules/mediastream/UserMediaRequest.cpp b/Source/modules/mediastream/UserMediaRequest.cpp
index ceb28b3..86f39e3 100644
--- a/Source/modules/mediastream/UserMediaRequest.cpp
+++ b/Source/modules/mediastream/UserMediaRequest.cpp
@@ -65,11 +65,11 @@
PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& es)
{
- RefPtr<MediaConstraintsImpl> audio = parseOptions(options, ASCIILiteral("audio"), es);
+ RefPtr<MediaConstraintsImpl> audio = parseOptions(options, "audio", es);
if (es.hadException())
return 0;
- RefPtr<MediaConstraintsImpl> video = parseOptions(options, ASCIILiteral("video"), es);
+ RefPtr<MediaConstraintsImpl> video = parseOptions(options, "video", es);
if (es.hadException())
return 0;
@@ -154,7 +154,7 @@
return;
if (m_errorCallback) {
- RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("PERMISSION_DENIED"), description, String());
+ RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create("PERMISSION_DENIED", description, String());
m_errorCallback->handleEvent(error.get());
}
}
@@ -166,7 +166,7 @@
return;
if (m_errorCallback) {
- RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("CONSTRAINT_NOT_SATISFIED"), description, constraintName);
+ RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create("CONSTRAINT_NOT_SATISFIED", description, constraintName);
m_errorCallback->handleEvent(error.get());
}
}
diff --git a/Source/modules/modules.gypi b/Source/modules/modules.gypi
index 2bf998e..ba24a2e 100644
--- a/Source/modules/modules.gypi
+++ b/Source/modules/modules.gypi
@@ -38,8 +38,6 @@
'filesystem/DirectoryReader.idl',
'filesystem/DirectoryReaderSync.idl',
'filesystem/Entry.idl',
- 'filesystem/EntryArray.idl',
- 'filesystem/EntryArraySync.idl',
'filesystem/EntrySync.idl',
'filesystem/FileEntry.idl',
'filesystem/FileEntrySync.idl',
@@ -300,10 +298,6 @@
'filesystem/EntriesCallback.h',
'filesystem/Entry.cpp',
'filesystem/Entry.h',
- 'filesystem/EntryArray.cpp',
- 'filesystem/EntryArray.h',
- 'filesystem/EntryArraySync.cpp',
- 'filesystem/EntryArraySync.h',
'filesystem/EntryBase.cpp',
'filesystem/EntryBase.h',
'filesystem/EntryCallback.h',
diff --git a/Source/modules/modules.target.darwin-arm.mk b/Source/modules/modules.target.darwin-arm.mk
index bb8f251..6f5c7af 100644
--- a/Source/modules/modules.target.darwin-arm.mk
+++ b/Source/modules/modules.target.darwin-arm.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -356,6 +354,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -498,6 +497,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/modules.target.darwin-mips.mk b/Source/modules/modules.target.darwin-mips.mk
index d13b21a..e53c104 100644
--- a/Source/modules/modules.target.darwin-mips.mk
+++ b/Source/modules/modules.target.darwin-mips.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -356,6 +354,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -498,6 +497,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/modules.target.darwin-x86.mk b/Source/modules/modules.target.darwin-x86.mk
index e83ef61..528f765 100644
--- a/Source/modules/modules.target.darwin-x86.mk
+++ b/Source/modules/modules.target.darwin-x86.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -358,6 +356,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -503,6 +502,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/modules.target.linux-arm.mk b/Source/modules/modules.target.linux-arm.mk
index bb8f251..6f5c7af 100644
--- a/Source/modules/modules.target.linux-arm.mk
+++ b/Source/modules/modules.target.linux-arm.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -356,6 +354,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -498,6 +497,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/modules.target.linux-mips.mk b/Source/modules/modules.target.linux-mips.mk
index d13b21a..e53c104 100644
--- a/Source/modules/modules.target.linux-mips.mk
+++ b/Source/modules/modules.target.linux-mips.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -356,6 +354,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -498,6 +497,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/modules.target.linux-x86.mk b/Source/modules/modules.target.linux-x86.mk
index e83ef61..528f765 100644
--- a/Source/modules/modules.target.linux-x86.mk
+++ b/Source/modules/modules.target.linux-x86.mk
@@ -72,8 +72,6 @@
third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp \
third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp \
third_party/WebKit/Source/modules/filesystem/Entry.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArray.cpp \
- third_party/WebKit/Source/modules/filesystem/EntryArraySync.cpp \
third_party/WebKit/Source/modules/filesystem/EntryBase.cpp \
third_party/WebKit/Source/modules/filesystem/EntrySync.cpp \
third_party/WebKit/Source/modules/filesystem/FileEntry.cpp \
@@ -358,6 +356,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
@@ -503,6 +502,7 @@
'-DSK_BUILD_FOR_ANDROID' \
'-DUSE_CHROMIUM_SKIA' \
'-DSK_USE_POSIX_THREADS' \
+ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \
'-DANDROID' \
'-D__GNU_SOURCE=1' \
'-DUSE_STLPORT=1' \
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index d8be96d..865e0f2 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -155,9 +155,9 @@
#if ENABLE(CUSTOM_SCHEME_HANDLER)
static String customHandlersStateString(const NavigatorContentUtilsClient::CustomHandlersState state)
{
- DEFINE_STATIC_LOCAL(const String, newHandler, (ASCIILiteral("new")));
- DEFINE_STATIC_LOCAL(const String, registeredHandler, (ASCIILiteral("registered")));
- DEFINE_STATIC_LOCAL(const String, declinedHandler, (ASCIILiteral("declined")));
+ DEFINE_STATIC_LOCAL(const String, newHandler, ("new"));
+ DEFINE_STATIC_LOCAL(const String, registeredHandler, ("registered"));
+ DEFINE_STATIC_LOCAL(const String, declinedHandler, ("declined"));
switch (state) {
case NavigatorContentUtilsClient::CustomHandlersNew:
diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp
index 920b156..742e6b7 100644
--- a/Source/modules/notifications/Notification.cpp
+++ b/Source/modules/notifications/Notification.cpp
@@ -238,9 +238,9 @@
const String& Notification::permissionString(NotificationClient::Permission permission)
{
- DEFINE_STATIC_LOCAL(const String, allowedPermission, (ASCIILiteral("granted")));
- DEFINE_STATIC_LOCAL(const String, deniedPermission, (ASCIILiteral("denied")));
- DEFINE_STATIC_LOCAL(const String, defaultPermission, (ASCIILiteral("default")));
+ DEFINE_STATIC_LOCAL(const String, allowedPermission, ("granted"));
+ DEFINE_STATIC_LOCAL(const String, deniedPermission, ("denied"));
+ DEFINE_STATIC_LOCAL(const String, defaultPermission, ("default"));
switch (permission) {
case NotificationClient::PermissionAllowed:
diff --git a/Source/modules/notifications/Notification.idl b/Source/modules/notifications/Notification.idl
index a8dd30a..24d25cc 100644
--- a/Source/modules/notifications/Notification.idl
+++ b/Source/modules/notifications/Notification.idl
@@ -43,11 +43,11 @@
[CallWith=ScriptExecutionContext, Conditional=NOTIFICATIONS] static readonly attribute DOMString permission;
[CallWith=ScriptExecutionContext, Conditional=NOTIFICATIONS] static void requestPermission(optional NotificationPermissionCallback callback);
- attribute EventListener onshow;
- [Conditional=LEGACY_NOTIFICATIONS] attribute EventListener ondisplay;
- attribute EventListener onerror;
- attribute EventListener onclose;
- attribute EventListener onclick;
+ attribute EventHandler onshow;
+ [Conditional=LEGACY_NOTIFICATIONS] attribute EventHandler ondisplay;
+ attribute EventHandler onerror;
+ attribute EventHandler onclose;
+ attribute EventHandler onclick;
[Conditional=LEGACY_NOTIFICATIONS] attribute DOMString dir;
[Conditional=LEGACY_NOTIFICATIONS] attribute DOMString replaceId;
diff --git a/Source/modules/speech/SpeechRecognition.idl b/Source/modules/speech/SpeechRecognition.idl
index 9f6634e..95eb5d5 100644
--- a/Source/modules/speech/SpeechRecognition.idl
+++ b/Source/modules/speech/SpeechRecognition.idl
@@ -39,15 +39,15 @@
[ImplementedAs=stopFunction] void stop();
void abort();
- attribute EventListener onaudiostart;
- attribute EventListener onsoundstart;
- attribute EventListener onspeechstart;
- attribute EventListener onspeechend;
- attribute EventListener onsoundend;
- attribute EventListener onaudioend;
- attribute EventListener onresult;
- attribute EventListener onnomatch;
- attribute EventListener onerror;
- attribute EventListener onstart;
- attribute EventListener onend;
+ attribute EventHandler onaudiostart;
+ attribute EventHandler onsoundstart;
+ attribute EventHandler onspeechstart;
+ attribute EventHandler onspeechend;
+ attribute EventHandler onsoundend;
+ attribute EventHandler onaudioend;
+ attribute EventHandler onresult;
+ attribute EventHandler onnomatch;
+ attribute EventHandler onerror;
+ attribute EventHandler onstart;
+ attribute EventHandler onend;
};
diff --git a/Source/modules/speech/SpeechRecognitionError.cpp b/Source/modules/speech/SpeechRecognitionError.cpp
index dd281e7..0fa617b 100644
--- a/Source/modules/speech/SpeechRecognitionError.cpp
+++ b/Source/modules/speech/SpeechRecognitionError.cpp
@@ -33,23 +33,23 @@
{
switch (code) {
case SpeechRecognitionError::ErrorCodeOther:
- return ASCIILiteral("other");
+ return "other";
case SpeechRecognitionError::ErrorCodeNoSpeech:
- return ASCIILiteral("no-speech");
+ return "no-speech";
case SpeechRecognitionError::ErrorCodeAborted:
- return ASCIILiteral("aborted");
+ return "aborted";
case SpeechRecognitionError::ErrorCodeAudioCapture:
- return ASCIILiteral("audio-capture");
+ return "audio-capture";
case SpeechRecognitionError::ErrorCodeNetwork:
- return ASCIILiteral("network");
+ return "network";
case SpeechRecognitionError::ErrorCodeNotAllowed:
- return ASCIILiteral("not-allowed");
+ return "not-allowed";
case SpeechRecognitionError::ErrorCodeServiceNotAllowed:
- return ASCIILiteral("service-not-allowed");
+ return "service-not-allowed";
case SpeechRecognitionError::ErrorCodeBadGrammar:
- return ASCIILiteral("bad-grammar");
+ return "bad-grammar";
case SpeechRecognitionError::ErrorCodeLanguageNotSupported:
- return ASCIILiteral("language-not-supported");
+ return "language-not-supported";
}
ASSERT_NOT_REACHED();
diff --git a/Source/modules/speech/SpeechSynthesis.cpp b/Source/modules/speech/SpeechSynthesis.cpp
index 925133e..5ac19d7 100644
--- a/Source/modules/speech/SpeechSynthesis.cpp
+++ b/Source/modules/speech/SpeechSynthesis.cpp
@@ -161,8 +161,8 @@
void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex)
{
- DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word")));
- DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, (ASCIILiteral("sentence")));
+ DEFINE_STATIC_LOCAL(const String, wordBoundaryString, ("word"));
+ DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, ("sentence"));
switch (boundary) {
case SpeechWordBoundary:
diff --git a/Source/modules/speech/SpeechSynthesisUtterance.idl b/Source/modules/speech/SpeechSynthesisUtterance.idl
index 916d51d..d9b02e6 100644
--- a/Source/modules/speech/SpeechSynthesisUtterance.idl
+++ b/Source/modules/speech/SpeechSynthesisUtterance.idl
@@ -35,11 +35,11 @@
attribute float rate;
attribute float pitch;
- attribute EventListener onstart;
- attribute EventListener onend;
- attribute EventListener onerror;
- attribute EventListener onpause;
- attribute EventListener onresume;
- attribute EventListener onmark;
- attribute EventListener onboundary;
+ attribute EventHandler onstart;
+ attribute EventHandler onend;
+ attribute EventHandler onerror;
+ attribute EventHandler onpause;
+ attribute EventHandler onresume;
+ attribute EventHandler onmark;
+ attribute EventHandler onboundary;
};
diff --git a/Source/modules/webaudio/AudioBufferSourceNode.idl b/Source/modules/webaudio/AudioBufferSourceNode.idl
index ca4982c..24c95eb 100644
--- a/Source/modules/webaudio/AudioBufferSourceNode.idl
+++ b/Source/modules/webaudio/AudioBufferSourceNode.idl
@@ -54,5 +54,5 @@
[MeasureAs=LegacyWebAudio] void noteGrainOn(double when, double grainOffset, double grainDuration);
void noteOff(double when);
- attribute EventListener onended;
+ attribute EventHandler onended;
};
diff --git a/Source/modules/webaudio/AudioContext.idl b/Source/modules/webaudio/AudioContext.idl
index c1d63ec..d1100f5 100644
--- a/Source/modules/webaudio/AudioContext.idl
+++ b/Source/modules/webaudio/AudioContext.idl
@@ -77,7 +77,7 @@
// Offline rendering
// void prepareOfflineBufferRendering(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate);
- attribute EventListener oncomplete;
+ attribute EventHandler oncomplete;
void startRendering();
[MeasureAs=LegacyWebAudio, ImplementedAs=createGain] GainNode createGainNode();
diff --git a/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp b/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
index f8f07cf..23f7ee8 100644
--- a/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
+++ b/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
@@ -50,7 +50,7 @@
ScriptWrappable::init(this);
setNodeType(NodeTypeMediaStreamAudioDestination);
- m_source = MediaStreamSource::create(ASCIILiteral("WebAudio-") + createCanonicalUUIDString(), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", MediaStreamSource::ReadyStateLive, true);
+ m_source = MediaStreamSource::create("WebAudio-" + createCanonicalUUIDString(), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", MediaStreamSource::ReadyStateLive, true);
MediaStreamSourceVector audioSources;
audioSources.append(m_source);
MediaStreamSourceVector videoSources;
diff --git a/Source/modules/webaudio/OWNERS b/Source/modules/webaudio/OWNERS
index 3b6ecd1..d591a3e 100644
--- a/Source/modules/webaudio/OWNERS
+++ b/Source/modules/webaudio/OWNERS
@@ -1 +1 @@
-crogers@google.com
+kbr@chromium.org
diff --git a/Source/modules/webaudio/OscillatorNode.idl b/Source/modules/webaudio/OscillatorNode.idl
index 46fd044..949eac6 100644
--- a/Source/modules/webaudio/OscillatorNode.idl
+++ b/Source/modules/webaudio/OscillatorNode.idl
@@ -55,5 +55,5 @@
void setPeriodicWave(PeriodicWave periodicWave);
- attribute EventListener onended;
+ attribute EventHandler onended;
};
diff --git a/Source/modules/webaudio/ScriptProcessorNode.idl b/Source/modules/webaudio/ScriptProcessorNode.idl
index 4d80d13..bc000b9 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.idl
+++ b/Source/modules/webaudio/ScriptProcessorNode.idl
@@ -27,7 +27,7 @@
Conditional=WEB_AUDIO
] interface ScriptProcessorNode : AudioNode {
// Rendering callback
- attribute EventListener onaudioprocess;
+ attribute EventHandler onaudioprocess;
readonly attribute long bufferSize;
};
diff --git a/Source/modules/webdatabase/DatabaseManager.h b/Source/modules/webdatabase/DatabaseManager.h
index 13c9b52..e657824 100644
--- a/Source/modules/webdatabase/DatabaseManager.h
+++ b/Source/modules/webdatabase/DatabaseManager.h
@@ -32,7 +32,7 @@
#include "wtf/Assertions.h"
#include "wtf/HashMap.h"
#include "wtf/PassRefPtr.h"
-#include "wtf/Threading.h"
+#include "wtf/ThreadingPrimitives.h"
namespace WebCore {
diff --git a/Source/modules/webdatabase/DatabaseThread.h b/Source/modules/webdatabase/DatabaseThread.h
index ba2de2a..5166b7f 100644
--- a/Source/modules/webdatabase/DatabaseThread.h
+++ b/Source/modules/webdatabase/DatabaseThread.h
@@ -36,6 +36,7 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
+#include "wtf/ThreadSafeRefCounted.h"
#include "wtf/Threading.h"
namespace WebCore {
diff --git a/Source/modules/webdatabase/SQLTransactionBackend.h b/Source/modules/webdatabase/SQLTransactionBackend.h
index 694dfa5..6c902f1 100644
--- a/Source/modules/webdatabase/SQLTransactionBackend.h
+++ b/Source/modules/webdatabase/SQLTransactionBackend.h
@@ -34,6 +34,7 @@
#include "modules/webdatabase/SQLTransactionStateMachine.h"
#include "wtf/Deque.h"
#include "wtf/Forward.h"
+#include "wtf/ThreadingPrimitives.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/modules/webmidi/MIDIAccess.idl b/Source/modules/webmidi/MIDIAccess.idl
index c7a51a1..a20b6bc 100644
--- a/Source/modules/webmidi/MIDIAccess.idl
+++ b/Source/modules/webmidi/MIDIAccess.idl
@@ -35,6 +35,6 @@
sequence<MIDIInput> inputs();
sequence<MIDIOutput> outputs();
- attribute EventListener onconnect;
- attribute EventListener ondisconnect;
+ attribute EventHandler onconnect;
+ attribute EventHandler ondisconnect;
};
diff --git a/Source/modules/webmidi/MIDIInput.idl b/Source/modules/webmidi/MIDIInput.idl
index 4bf7e8f..7b3e438 100644
--- a/Source/modules/webmidi/MIDIInput.idl
+++ b/Source/modules/webmidi/MIDIInput.idl
@@ -32,5 +32,5 @@
NoInterfaceObject,
ActiveDOMObject
] interface MIDIInput : MIDIPort {
- attribute EventListener onmidimessage;
+ attribute EventHandler onmidimessage;
};
diff --git a/Source/modules/webmidi/MIDIPort.cpp b/Source/modules/webmidi/MIDIPort.cpp
index c6d5878..6e8388a 100644
--- a/Source/modules/webmidi/MIDIPort.cpp
+++ b/Source/modules/webmidi/MIDIPort.cpp
@@ -61,9 +61,9 @@
{
switch (m_type) {
case MIDIPortTypeInput:
- return ASCIILiteral("input");
+ return "input";
case MIDIPortTypeOutput:
- return ASCIILiteral("output");
+ return "output";
default:
ASSERT_NOT_REACHED();
}
diff --git a/Source/modules/webmidi/MIDIPort.idl b/Source/modules/webmidi/MIDIPort.idl
index 261eb7c..944cacb 100644
--- a/Source/modules/webmidi/MIDIPort.idl
+++ b/Source/modules/webmidi/MIDIPort.idl
@@ -43,5 +43,5 @@
readonly attribute MIDIPortType type;
readonly attribute DOMString version;
- attribute EventListener ondisconnect;
+ attribute EventHandler ondisconnect;
};
diff --git a/Source/modules/webmidi/OWNERS b/Source/modules/webmidi/OWNERS
index 5121485..195c756 100644
--- a/Source/modules/webmidi/OWNERS
+++ b/Source/modules/webmidi/OWNERS
@@ -1,2 +1 @@
-crogers@google.com
toyoshim@chromium.org
diff --git a/Source/modules/websockets/WebSocket.idl b/Source/modules/websockets/WebSocket.idl
index e332465..9748b64 100644
--- a/Source/modules/websockets/WebSocket.idl
+++ b/Source/modules/websockets/WebSocket.idl
@@ -51,10 +51,10 @@
readonly attribute unsigned long bufferedAmount;
// networking
- attribute EventListener onopen;
- attribute EventListener onmessage;
- attribute EventListener onerror;
- attribute EventListener onclose;
+ attribute EventHandler onopen;
+ attribute EventHandler onmessage;
+ attribute EventHandler onerror;
+ attribute EventHandler onclose;
[TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol;
[TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions;
diff --git a/Source/modules/websockets/WebSocketPerMessageDeflate.cpp b/Source/modules/websockets/WebSocketPerMessageDeflate.cpp
index e6c65e5..43f38ae 100644
--- a/Source/modules/websockets/WebSocketPerMessageDeflate.cpp
+++ b/Source/modules/websockets/WebSocketPerMessageDeflate.cpp
@@ -64,7 +64,7 @@
};
CompressionMessageExtensionProcessor::CompressionMessageExtensionProcessor(WebSocketPerMessageDeflate& compress)
- : WebSocketExtensionProcessor(ASCIILiteral("permessage-deflate"))
+ : WebSocketExtensionProcessor("permessage-deflate")
, m_compress(compress)
, m_responseProcessed(false)
{
@@ -72,7 +72,7 @@
String CompressionMessageExtensionProcessor::handshakeString()
{
- return ASCIILiteral("permessage-deflate; c2s_max_window_bits");
+ return "permessage-deflate; c2s_max_window_bits";
}
bool CompressionMessageExtensionProcessor::processResponse(const HashMap<String, String>& parameters)