2010-08-27 Michael Nordman <michaeln@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2010 19:42:20 +0000 (19:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2010 19:42:20 +0000 (19:42 +0000)
commit4b471dc0c48db0d3a5299f9eccda234d36d8778a
treed33a28cd50045759b3fa5bd4408184013bd3282d
parent17a82b469d0c26865aa8bf21c513cf8676e07a3b
2010-08-27  Michael Nordman  <michaeln@google.com>

        Reviewed by David Levin.

        https://bugs.webkit.org/show_bug.cgi?id=44133
        IDL bindings for XmlHttpRequest.responseBlob support, doesn't do anything yet.
        Adds two new attributes, asBlob and responseBlob.
        Runtime disabled by default, also behind a new ENABLE_XHR_RESPONSE_BLOB compile time guard.

        No new tests, just adding some stubs.

        * bindings/generic/RuntimeEnabledFeatures.cpp:
        * bindings/generic/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setResponseBlobEnabled):
        (WebCore::RuntimeEnabledFeatures::responseBlobEnabled):
        (WebCore::RuntimeEnabledFeatures::asBlobEnabled):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::responseText): Changed to allow an exceptional return path.
        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
        (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): Changed to allow an exceptional return path.
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::responseText): Changed to raise an exception when accessed with asBlob set to true.
        (WebCore::XMLHttpRequest::responseXML): Changed to raise an exception when accessed with asBlob set to true.
        (WebCore::XMLHttpRequest::responseBlob): Added stub method, returns 0 for now.
        (WebCore::XMLHttpRequest::setAsBlob): Sets the asBlob attribute, raises exception if called at an inappropriate time.
        (WebCore::XMLHttpRequest::open): Resets asBlob to false, the default value.
        (WebCore::XMLHttpRequest::abort): Clears m_responseBlob.
        (WebCore::XMLHttpRequest::clearResponse): Clears m_responseBlob.
        (WebCore::XMLHttpRequest::didFinishLoading): Added a FIXME to populate m_responseBlob.
        * xml/XMLHttpRequest.h:
        (WebCore::XMLHttpRequest::asBlob):
        * xml/XMLHttpRequest.idl:
2010-08-27  Michael Nordman  <michaeln@google.com>

        Reviewed by David Levin.

        https://bugs.webkit.org/show_bug.cgi?id=44133
        WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob.

        * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB.
        * public/WebRuntimeFeatures.h:
        * src/WebRuntimeFeatures.cpp:
        (WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
        (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog
WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
WebCore/bindings/generic/RuntimeEnabledFeatures.h
WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
WebCore/xml/XMLHttpRequest.cpp
WebCore/xml/XMLHttpRequest.h
WebCore/xml/XMLHttpRequest.idl
WebKit/chromium/ChangeLog
WebKit/chromium/features.gypi
WebKit/chromium/public/WebRuntimeFeatures.h
WebKit/chromium/src/WebRuntimeFeatures.cpp