Migrate createObjectURL & revokeObjectURL to static (Class) methods.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 14:39:18 +0000 (14:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 14:39:18 +0000 (14:39 +0000)
commit8cd6827846a5e5d09e89e1d01d235cabf55b2ea5
tree50235fb2e2d136a6149c9591863129f1a96b2fcf
parent92df7afbdb5c0c59d9af0bc9e72e5f9754e9b255
Migrate createObjectURL & revokeObjectURL to static (Class) methods.
https://bugs.webkit.org/show_bug.cgi?id=74386

Patch by Kaustubh Atrawalkar <kaustubh@motorola.com> on 2012-02-08
Reviewed by Kentaro Hara.

Source/WebCore:

Move createObjectURL & revokeObjectURL from DOMURL implementation to
static methods as per specs - http://www.w3.org/TR/FileAPI/#creating-revoking

Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html
Already Existing:
    fast/files/revoke-blob-url.html
    fast/dom/window-domurl-crash.html
    fast/files/apply-blob-url-to-img.html
    fast/files/create-blob-url-crash.html
    fast/files/workers/inline-worker-via-blob-url.html

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
(WebCore::ScriptExecutionContext::fileThread):
(WebCore):
(WebCore::ScriptExecutionContext::publicURLManager):
* dom/ScriptExecutionContext.h:
(WebCore):
(ScriptExecutionContext):
* html/DOMURL.cpp:
(WebCore):
(WebCore::DOMURL::createObjectURL): Changed to static.
(WebCore::DOMURL::revokeObjectURL): ditto.
* html/DOMURL.h:
(DOMURL):
(WebCore::DOMURL::create):
* html/DOMURL.idl:
* html/PublicURLManager.h: Added.
(WebCore):
(PublicURLManager):
(WebCore::PublicURLManager::create):
(WebCore::PublicURLManager::contextDestroyed):
(WebCore::PublicURLManager::blobURLs):
(WebCore::PublicURLManager::streamURLs):
* page/DOMWindow.cpp: Removed object initialization for DOMURL.
(WebCore):
* page/DOMWindow.h: ditto.
(DOMWindow):
* page/DOMWindow.idl:
* workers/WorkerContext.cpp:
(WebCore):
* workers/WorkerContext.h:
(WorkerContext):
* workers/WorkerContext.idl:

LayoutTests:

Added test to check if createObjectURL & revokeObjectURL are static functions.

* fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Added.
* fast/dom/DOMURL/check-instanceof-domurl-functions.html: Added.
* platform/gtk/fast/dom/prototype-inheritance-2-expected.txt: GTK Rebaseline.
* platform/gtk/fast/js/global-constructors-expected.txt: ditto.
* platform/qt/fast/dom/constructed-objects-prototypes-expected.txt: Qt Rebaseline.
* platform/qt/fast/dom/prototype-inheritance-2-expected.txt: ditto.
* platform/qt/fast/js/global-constructors-expected.txt: ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions.html [new file with mode: 0644]
LayoutTests/platform/gtk/fast/dom/prototype-inheritance-2-expected.txt
LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt
LayoutTests/platform/qt/fast/dom/constructed-objects-prototypes-expected.txt
LayoutTests/platform/qt/fast/dom/prototype-inheritance-2-expected.txt
LayoutTests/platform/qt/fast/js/global-constructors-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/html/DOMURL.cpp
Source/WebCore/html/DOMURL.h
Source/WebCore/html/DOMURL.idl
Source/WebCore/html/PublicURLManager.h [new file with mode: 0644]
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/workers/WorkerContext.cpp
Source/WebCore/workers/WorkerContext.h
Source/WebCore/workers/WorkerContext.idl