| Index: Source/core/fileapi/FileError.cpp
|
| diff --git a/Source/core/dom/NodeList.cpp b/Source/core/fileapi/FileError.cpp
|
| similarity index 63%
|
| copy from Source/core/dom/NodeList.cpp
|
| copy to Source/core/fileapi/FileError.cpp
|
| index fb06c70817bff7406297e671ca5dd5f5ff7f29e6..671b3090a8cc9ec198e7107f6b0a3136afb00eec 100644
|
| --- a/Source/core/dom/NodeList.cpp
|
| +++ b/Source/core/fileapi/FileError.cpp
|
| @@ -29,29 +29,43 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/dom/NodeList.h"
|
| -
|
| -#include "core/dom/Node.h"
|
| +#include "core/fileapi/FileError.h"
|
|
|
| namespace WebCore {
|
|
|
| -void NodeList::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtr<Node>& returnValue0, bool& returnValue1Enabled, unsigned& returnValue1)
|
| +ExceptionCode FileError::ErrorCodeToExceptionCode(ErrorCode code)
|
| {
|
| - // Length property cannot be overridden.
|
| - DEFINE_STATIC_LOCAL(const AtomicString, length, ("length", AtomicString::ConstructFromLiteral));
|
| - if (name == length) {
|
| - returnValue1Enabled = true;
|
| - returnValue1 = this->length();
|
| - return;
|
| + switch (code) {
|
| + case OK:
|
| + return 0;
|
| + case NOT_FOUND_ERR:
|
| + return FSNotFoundError;
|
| + case SECURITY_ERR:
|
| + return FSSecurityError;
|
| + case ABORT_ERR:
|
| + return FSAbortError;
|
| + case NOT_READABLE_ERR:
|
| + return FSNotReadableError;
|
| + case ENCODING_ERR:
|
| + return FSEncodingError;
|
| + case NO_MODIFICATION_ALLOWED_ERR:
|
| + return FSNoModificationAllowedError;
|
| + case INVALID_STATE_ERR:
|
| + return FSInvalidStateError;
|
| + case SYNTAX_ERR:
|
| + return FSSyntaxError;
|
| + case INVALID_MODIFICATION_ERR:
|
| + return FSInvalidModificationError;
|
| + case QUOTA_EXCEEDED_ERR:
|
| + return FSQuotaExceededError;
|
| + case TYPE_MISMATCH_ERR:
|
| + return FSTypeMismatchError;
|
| + case PATH_EXISTS_ERR:
|
| + return FSPathExistsError;
|
| + default:
|
| + ASSERT_NOT_REACHED();
|
| + return 0;
|
| }
|
| -
|
| - Node* result = namedItem(name);
|
| - if (!result)
|
| - return;
|
| -
|
| - returnValue0Enabled = true;
|
| - returnValue0 = result;
|
| }
|
|
|
| -
|
| } // namespace WebCore
|
|
|