| Index: Source/core/html/DOMURL.cpp
|
| diff --git a/Source/core/html/DOMURL.cpp b/Source/core/html/DOMURL.cpp
|
| index a7b7f7175cbd97dc2faed6c1d0564bcd552ae7b5..3c7e30444d8cd3e20de71d5b5efd02680d836708 100644
|
| --- a/Source/core/html/DOMURL.cpp
|
| +++ b/Source/core/html/DOMURL.cpp
|
| @@ -25,19 +25,44 @@
|
| */
|
|
|
| #include "config.h"
|
| -
|
| #include "core/html/DOMURL.h"
|
|
|
| +#include "bindings/v8/ExceptionMessages.h"
|
| +#include "bindings/v8/ExceptionState.h"
|
| +#include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ScriptExecutionContext.h"
|
| #include "core/fetch/MemoryCache.h"
|
| #include "core/fileapi/Blob.h"
|
| #include "core/fileapi/BlobURL.h"
|
| #include "core/html/PublicURLManager.h"
|
| -#include "weborigin/KURL.h"
|
| +#include "weborigin/SecurityOrigin.h"
|
| #include "wtf/MainThread.h"
|
|
|
| namespace WebCore {
|
|
|
| +DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& es)
|
| +{
|
| + ScriptWrappable::init(this);
|
| + if (!base.isValid())
|
| + es.throwDOMException(SyntaxError, ExceptionMessages::failedToConstruct("URL", "Invalid base URL"));
|
| +
|
| + m_url = KURL(base, url);
|
| + if (!m_url.isValid())
|
| + es.throwDOMException(SyntaxError, ExceptionMessages::failedToConstruct("URL", "Invalid URL"));
|
| +}
|
| +
|
| +void DOMURL::setInput(const String& value)
|
| +{
|
| + KURL url(blankURL(), value);
|
| + if (url.isValid()) {
|
| + m_url = url;
|
| + m_input = String();
|
| + } else {
|
| + m_url = KURL();
|
| + m_input = value;
|
| + }
|
| +}
|
| +
|
| String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, Blob* blob)
|
| {
|
| if (!scriptExecutionContext || !blob)
|
|
|