Title: [106914] trunk
Revision
106914
Author
hara...@chromium.org
Date
2012-02-07 01:44:25 -0800 (Tue, 07 Feb 2012)

Log Message

Unreviewed, rolling out r106912.
http://trac.webkit.org/changeset/106912
https://bugs.webkit.org/show_bug.cgi?id=77947

"AppleWebKit build is broken" (Requested by haraken on
#webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-02-07

Source/WebCore:

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
(WebCore):
* dom/ScriptExecutionContext.h:
(WebCore):
(ScriptExecutionContext):
* html/DOMURL.cpp:
(WebCore::DOMURL::DOMURL):
(WebCore):
(WebCore::DOMURL::~DOMURL):
(WebCore::DOMURL::contextDestroyed):
(WebCore::DOMURL::createObjectURL):
(WebCore::DOMURL::revokeObjectURL):
* html/DOMURL.h:
(WebCore::DOMURL::create):
(DOMURL):
* html/DOMURL.idl:
* html/PublicURLManager.h: Removed.
* page/DOMWindow.cpp:
(WebCore):
(WebCore::DOMWindow::webkitURL):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* workers/WorkerContext.cpp:
(WebCore):
(WebCore::WorkerContext::webkitURL):
* workers/WorkerContext.h:
(WorkerContext):
* workers/WorkerContext.idl:

LayoutTests:

* fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Removed.
* fast/dom/DOMURL/check-instanceof-domurl-functions.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106913 => 106914)


--- trunk/LayoutTests/ChangeLog	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/LayoutTests/ChangeLog	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,3 +1,15 @@
+2012-02-07  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r106912.
+        http://trac.webkit.org/changeset/106912
+        https://bugs.webkit.org/show_bug.cgi?id=77947
+
+        "AppleWebKit build is broken" (Requested by haraken on
+        #webkit).
+
+        * fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Removed.
+        * fast/dom/DOMURL/check-instanceof-domurl-functions.html: Removed.
+
 2012-02-07  Kaustubh Atrawalkar  <kaust...@motorola.com>
 
         Migrate createObjectURL & revokeObjectURL to static (Class) methods.

Deleted: trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt (106913 => 106914)


--- trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,15 +0,0 @@
-Test instanceof functions and properties of webkitURL.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS 'createObjectURL' in webkitURL is true
-PASS 'revokeObjectURL' in webkitURL is true
-PASS url.createObjectURL is undefined.
-PASS url.revokeObjectURL is undefined.
-PASS window.webkitURL.createObjectURL is defined.
-PASS window.webkitURL.revokeObjectURL is defined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions.html (106913 => 106914)


--- trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions.html	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions.html	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script>
-description("Test instanceof functions and properties of webkitURL.");
-
-var url = "" webkitURL;
-
-shouldBeTrue("'createObjectURL' in webkitURL");
-shouldBeTrue("'revokeObjectURL' in webkitURL");
-
-shouldBeUndefined("url.createObjectURL");
-shouldBeUndefined("url.revokeObjectURL");
-
-shouldBeDefined("window.webkitURL.createObjectURL");
-shouldBeDefined("window.webkitURL.revokeObjectURL");
-
-
-</script>
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (106913 => 106914)


--- trunk/Source/WebCore/ChangeLog	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/ChangeLog	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,3 +1,43 @@
+2012-02-07  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r106912.
+        http://trac.webkit.org/changeset/106912
+        https://bugs.webkit.org/show_bug.cgi?id=77947
+
+        "AppleWebKit build is broken" (Requested by haraken on
+        #webkit).
+
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
+        (WebCore):
+        * dom/ScriptExecutionContext.h:
+        (WebCore):
+        (ScriptExecutionContext):
+        * html/DOMURL.cpp:
+        (WebCore::DOMURL::DOMURL):
+        (WebCore):
+        (WebCore::DOMURL::~DOMURL):
+        (WebCore::DOMURL::contextDestroyed):
+        (WebCore::DOMURL::createObjectURL):
+        (WebCore::DOMURL::revokeObjectURL):
+        * html/DOMURL.h:
+        (WebCore::DOMURL::create):
+        (DOMURL):
+        * html/DOMURL.idl:
+        * html/PublicURLManager.h: Removed.
+        * page/DOMWindow.cpp:
+        (WebCore):
+        (WebCore::DOMWindow::webkitURL):
+        * page/DOMWindow.h:
+        (DOMWindow):
+        * page/DOMWindow.idl:
+        * workers/WorkerContext.cpp:
+        (WebCore):
+        (WebCore::WorkerContext::webkitURL):
+        * workers/WorkerContext.h:
+        (WorkerContext):
+        * workers/WorkerContext.idl:
+
 2012-02-07  Kentaro Hara  <hara...@chromium.org>
 
         Unreviewed, rolling out r106862.

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (106913 => 106914)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2012-02-07 09:44:25 UTC (rev 106914)
@@ -38,7 +38,6 @@
 #include "EventTarget.h"
 #include "FileThread.h"
 #include "MessagePort.h"
-#include "PublicURLManager.h"
 #include "ScriptCallStack.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
@@ -127,10 +126,6 @@
         m_fileThread = 0;
     }
 #endif
-#if ENABLE(BLOB)
-    if (m_publicURLManager)
-        m_publicURLManager->contextDestroyed();
-#endif
 }
 
 #if ENABLE(SQL_DATABASE)
@@ -390,15 +385,6 @@
 }
 #endif
 
-#if ENABLE(BLOB)
-PublicURLManager& ScriptExecutionContext::publicURLManager()
-{
-    if (!m_publicURLManager)
-        m_publicURLManager = PublicURLManager::create();
-    return *m_publicURLManager;
-}
-#endif
-
 void ScriptExecutionContext::adjustMinimumTimerInterval(double oldMinimumTimerInterval)
 {
     if (minimumTimerInterval() != oldMinimumTimerInterval) {

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (106913 => 106914)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.h	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h	2012-02-07 09:44:25 UTC (rev 106914)
@@ -30,7 +30,6 @@
 #include "ActiveDOMObject.h"
 #include "ConsoleTypes.h"
 #include "KURL.h"
-#include "PublicURLManager.h"
 #include "ScriptCallStack.h"
 #include "SecurityContext.h"
 #include <wtf/Forward.h>
@@ -54,9 +53,6 @@
 class EventTarget;
 class MessagePort;
 
-#if ENABLE(BLOB)
-class PublicURLManager;
-#endif
 #if ENABLE(SQL_DATABASE)
 class Database;
 class DatabaseTaskSynchronizer;
@@ -107,9 +103,6 @@
     virtual void resumeActiveDOMObjects();
     virtual void stopActiveDOMObjects();
 
-#if ENABLE(BLOB)
-    PublicURLManager& publicURLManager();
-#endif
     void didCreateActiveDOMObject(ActiveDOMObject*, void* upcastPointer);
     void willDestroyActiveDOMObject(ActiveDOMObject*);
 
@@ -212,9 +205,6 @@
     bool m_inDispatchErrorEvent;
     class PendingException;
     OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions;
-#if ENABLE(BLOB)
-    OwnPtr<PublicURLManager> m_publicURLManager;
-#endif
 
 #if ENABLE(SQL_DATABASE)
     RefPtr<DatabaseThread> m_databaseThread;

Modified: trunk/Source/WebCore/html/DOMURL.cpp (106913 => 106914)


--- trunk/Source/WebCore/html/DOMURL.cpp	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/html/DOMURL.cpp	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 Motorola Mobility Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,15 +29,11 @@
 
 #include "DOMURL.h"
 
-#include "ActiveDOMObject.h"
 #include "Blob.h"
 #include "BlobURL.h"
 #include "KURL.h"
-#include "PublicURLManager.h"
 #include "ScriptExecutionContext.h"
-#include "SecurityOrigin.h"
 #include "ThreadableBlobRegistry.h"
-#include <wtf/PassOwnPtr.h>
 #include <wtf/MainThread.h>
 
 #if ENABLE(MEDIA_STREAM)
@@ -48,13 +43,37 @@
 
 namespace WebCore {
 
+DOMURL::DOMURL(ScriptExecutionContext* scriptExecutionContext)
+    : ContextDestructionObserver(scriptExecutionContext)
+{
+}
+
+DOMURL::~DOMURL()
+{
+}
+
+void DOMURL::contextDestroyed()
+{
+    ContextDestructionObserver::contextDestroyed();
+
+    HashSet<String>::iterator publicBlobURLsEnd = m_publicBlobURLs.end();
+    for (HashSet<String>::iterator iter = m_publicBlobURLs.begin(); iter != publicBlobURLsEnd; ++iter)
+        ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter));
+
 #if ENABLE(MEDIA_STREAM)
-String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaStream* stream)
+    HashSet<String>::iterator publicStreamURLsEnd = m_publicStreamURLs.end();
+    for (HashSet<String>::iterator iter = m_publicStreamURLs.begin(); iter != publicStreamURLsEnd; ++iter)
+        MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter));
+#endif
+}
+
+#if ENABLE(MEDIA_STREAM)
+String DOMURL::createObjectURL(MediaStream* stream)
 {
-    if (!scriptExecutionContext || !stream)
+    if (!m_scriptExecutionContext || !stream)
         return String();
 
-    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
+    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin());
     if (publicURL.isEmpty())
         return String();
 
@@ -62,48 +81,46 @@
     ASSERT(isMainThread());
 
     MediaStreamRegistry::registry().registerMediaStreamURL(publicURL, stream);
-    scriptExecutionContext->publicURLManager().streamURLs().add(publicURL.string());
+    m_publicStreamURLs.add(publicURL.string());
 
     return publicURL.string();
 }
 #endif
 
-String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, Blob* blob)
+String DOMURL::createObjectURL(Blob* blob)
 {
-    if (!scriptExecutionContext || !blob)
+    if (!m_scriptExecutionContext || !blob)
         return String();
 
-    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
+    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin());
     if (publicURL.isEmpty())
         return String();
 
     ThreadableBlobRegistry::registerBlobURL(publicURL, blob->url());
-    scriptExecutionContext->publicURLManager().blobURLs().add(publicURL.string());
+    m_publicBlobURLs.add(publicURL.string());
 
     return publicURL.string();
 }
 
-void DOMURL::revokeObjectURL(ScriptExecutionContext* scriptExecutionContext, const String& urlString)
+void DOMURL::revokeObjectURL(const String& urlString)
 {
-    if (!scriptExecutionContext)
+    if (!m_scriptExecutionContext)
         return;
 
     KURL url(KURL(), urlString);
 
-    HashSet<String>& blobURLs = scriptExecutionContext->publicURLManager().blobURLs();
-    if (blobURLs.contains(url.string())) {
+    if (m_publicBlobURLs.contains(url.string())) {
         ThreadableBlobRegistry::unregisterBlobURL(url);
-        blobURLs.remove(url.string());
+        m_publicBlobURLs.remove(url.string());
     }
 
 #if ENABLE(MEDIA_STREAM)
-    HashSet<String>& streamURLs = scriptExecutionContext->publicURLManager().streamURLs();
-    if (streamURLs.contains(url.string())) {
+    if (m_publicStreamURLs.contains(url.string())) {
         // FIXME: make sure of this assertion below. Raise a spec question if required.
         // Since WebWorkers cannot obtain Stream objects, we should be on the main thread.
         ASSERT(isMainThread());
         MediaStreamRegistry::registry().unregisterMediaStreamURL(url);
-        streamURLs.remove(url.string());
+        m_publicStreamURLs.remove(url.string());
     }
 #endif
 }

Modified: trunk/Source/WebCore/html/DOMURL.h (106913 => 106914)


--- trunk/Source/WebCore/html/DOMURL.h	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/html/DOMURL.h	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 Motorola Mobility Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,7 +26,9 @@
 #ifndef DOMURL_h
 #define DOMURL_h
 
-#include "KURL.h"
+#if ENABLE(BLOB)
+
+#include "ActiveDOMObject.h"
 #include "PlatformString.h"
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
@@ -39,22 +40,30 @@
 class MediaStream;
 class ScriptExecutionContext;
 
-class DOMURL : public RefCounted<DOMURL> {
-
+class DOMURL : public RefCounted<DOMURL>, public ContextDestructionObserver {
 public:
-    static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); }
+    static PassRefPtr<DOMURL> create(ScriptExecutionContext* scriptExecutionContext) { return adoptRef(new DOMURL(scriptExecutionContext)); }
+    ~DOMURL();
 
-#if ENABLE(BLOB)
-    static void contextDestroyed(ScriptExecutionContext*);
+#if ENABLE(MEDIA_STREAM)
+    String createObjectURL(MediaStream*);
+#endif
+    String createObjectURL(Blob*);
+    void revokeObjectURL(const String&);
 
-    static String createObjectURL(ScriptExecutionContext*, Blob*);
-    static void revokeObjectURL(ScriptExecutionContext*, const String&);
+private:
+    explicit DOMURL(ScriptExecutionContext*);
+
+    virtual void contextDestroyed();
+
+    HashSet<String> m_publicBlobURLs;
 #if ENABLE(MEDIA_STREAM)
-    static String createObjectURL(ScriptExecutionContext*, MediaStream*);
+    HashSet<String> m_publicStreamURLs;
 #endif
-#endif
 };
 
 } // namespace WebCore
 
+#endif // ENABLE(BLOB)
+
 #endif // DOMURL_h

Modified: trunk/Source/WebCore/html/DOMURL.idl (106913 => 106914)


--- trunk/Source/WebCore/html/DOMURL.idl	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/html/DOMURL.idl	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 Motorola Mobility Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,15 +26,15 @@
 module html {
     interface [
         Conditional=BLOB,
-        Constructor,
+        OmitConstructor,
         GenerateNativeConverter,
         JSGenerateToJS,
         JSNoStaticTables
     ] DOMURL {
 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
-        static [CallWith=ScriptExecutionContext,ConvertNullStringTo=Undefined] DOMString createObjectURL(in MediaStream stream);
+        [ConvertNullStringTo=Undefined] DOMString createObjectURL(in MediaStream stream);
 #endif
-        static [CallWith=ScriptExecutionContext,ConvertNullStringTo=Undefined] DOMString createObjectURL(in Blob blob);
-        static [CallWith=ScriptExecutionContext] void revokeObjectURL(in DOMString url);
+        [ConvertNullStringTo=Undefined] DOMString createObjectURL(in Blob blob);
+        void revokeObjectURL(in DOMString url);
     };
 }

Deleted: trunk/Source/WebCore/html/PublicURLManager.h (106913 => 106914)


--- trunk/Source/WebCore/html/PublicURLManager.h	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/html/PublicURLManager.h	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2012 Motorola Mobility Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 PublicURLManager_h
-#define PublicURLManager_h
-
-#if ENABLE(BLOB)
-#include "PlatformString.h"
-#include "ScriptExecutionContext.h"
-#include "ThreadableBlobRegistry.h"
-#include <wtf/HashSet.h>
-
-#if ENABLE(MEDIA_STREAM)
-#include "MediaStream.h"
-#include "MediaStreamRegistry.h"
-#endif
-
-namespace WebCore {
-
-class ScriptExecutionContext;
-
-class PublicURLManager {
-
-public:
-    static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
-    void contextDestroyed()
-    {
-        HashSet<String>::iterator blobURLsEnd = m_blobURLs.end();
-        for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobURLsEnd; ++iter)
-            ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter));
-
-#if ENABLE(MEDIA_STREAM)
-        HashSet<String>::iterator streamURLsEnd = m_streamURLs.end();
-        for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != streamURLsEnd; ++iter)
-            MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter));
-#endif
-    }
-
-    HashSet<String>& blobURLs() { return m_blobURLs; }
-#if ENABLE(MEDIA_STREAM)
-    HashSet<String>& streamURLs() { return m_streamURLs; }
-#endif
-
-private:
-    HashSet<String> m_blobURLs;
-#if ENABLE(MEDIA_STREAM)
-    HashSet<String> m_streamURLs;
-#endif
-};
-
-} // namespace WebCore
-
-#endif // BLOB
-#endif // PUBLICURLMANAGER_h

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (106913 => 106914)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2012-02-07 09:44:25 UTC (rev 106914)
@@ -1897,6 +1897,15 @@
     dialogFrame->page()->chrome()->runModal();
 }
 
+#if ENABLE(BLOB)
+DOMURL* DOMWindow::webkitURL() const
+{
+    if (!m_domURL && isCurrentlyDisplayedInFrame())
+        m_domURL = DOMURL::create(this->scriptExecutionContext());
+    return m_domURL.get();
+}
+#endif
+
 #if ENABLE(QUOTA)
 StorageInfo* DOMWindow::webkitStorageInfo() const
 {

Modified: trunk/Source/WebCore/page/DOMWindow.h (106913 => 106914)


--- trunk/Source/WebCore/page/DOMWindow.h	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/page/DOMWindow.h	2012-02-07 09:44:25 UTC (rev 106914)
@@ -351,6 +351,10 @@
         using RefCounted<DOMWindow>::ref;
         using RefCounted<DOMWindow>::deref;
 
+#if ENABLE(BLOB)
+        DOMURL* webkitURL() const;
+#endif
+
 #if ENABLE(DEVICE_ORIENTATION)
         DEFINE_ATTRIBUTE_EVENT_LISTENER(devicemotion);
         DEFINE_ATTRIBUTE_EVENT_LISTENER(deviceorientation);

Modified: trunk/Source/WebCore/page/DOMWindow.idl (106913 => 106914)


--- trunk/Source/WebCore/page/DOMWindow.idl	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2012-02-07 09:44:25 UTC (rev 106914)
@@ -782,7 +782,7 @@
 
         attribute [Conditional=BLOB] WebKitBlobBuilderConstructor WebKitBlobBuilder;
 
-        attribute [Conditional=BLOB] DOMURLConstructor webkitURL;
+        readonly attribute [Conditional=BLOB] DOMURL webkitURL;
 
 #if defined(ENABLE_QUOTA) && ENABLE_QUOTA
         readonly attribute [V8EnabledAtRuntime=Quota] StorageInfo webkitStorageInfo;

Modified: trunk/Source/WebCore/workers/WorkerContext.cpp (106913 => 106914)


--- trunk/Source/WebCore/workers/WorkerContext.cpp	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/workers/WorkerContext.cpp	2012-02-07 09:44:25 UTC (rev 106914)
@@ -377,6 +377,15 @@
     return &m_eventTargetData;
 }
 
+#if ENABLE(BLOB)
+DOMURL* WorkerContext::webkitURL() const
+{
+    if (!m_domURL)
+        m_domURL = DOMURL::create(this->scriptExecutionContext());
+    return m_domURL.get();
+}
+#endif
+
 #if ENABLE(FILE_SYSTEM)
 void WorkerContext::webkitRequestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {

Modified: trunk/Source/WebCore/workers/WorkerContext.h (106913 => 106914)


--- trunk/Source/WebCore/workers/WorkerContext.h	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/workers/WorkerContext.h	2012-02-07 09:44:25 UTC (rev 106914)
@@ -131,6 +131,10 @@
         virtual bool isContextThread() const;
         virtual bool isJSExecutionForbidden() const;
 
+#if ENABLE(BLOB)
+        DOMURL* webkitURL() const;
+#endif
+
 #if ENABLE(FILE_SYSTEM)
         enum FileSystemType {
             TEMPORARY,

Modified: trunk/Source/WebCore/workers/WorkerContext.idl (106913 => 106914)


--- trunk/Source/WebCore/workers/WorkerContext.idl	2012-02-07 08:54:04 UTC (rev 106913)
+++ trunk/Source/WebCore/workers/WorkerContext.idl	2012-02-07 09:44:25 UTC (rev 106914)
@@ -101,7 +101,7 @@
         attribute FileReaderSyncConstructor FileReaderSync;
 #endif
 
-        attribute [Conditional=BLOB] DOMURLConstructor webkitURL;
+        readonly attribute [Conditional=BLOB] DOMURL webkitURL;
 
 #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
         const unsigned short TEMPORARY = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to