Changeset 120574 in webkit


Ignore:
Timestamp:
Jun 18, 2012 12:06:39 AM (12 years ago)
Author:
kinuko@chromium.org
Message:

XHR_RESPONSE_BLOB is not enabled on some platforms
https://bugs.webkit.org/show_bug.cgi?id=88859

Reviewed by Adam Barth.

Source/WebCore:

Removing XHR_RESPONSE_BLOB since the current implementation has
no platform-specific part.

Test: http/tests/xmlhttprequest/blob-response-size.html

  • bindings/generic/RuntimeEnabledFeatures.cpp:

(WebCore):

  • bindings/generic/RuntimeEnabledFeatures.h:

(RuntimeEnabledFeatures):

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::visitChildren):
(WebCore::JSXMLHttpRequest::response):

  • bindings/v8/custom/V8XMLHttpRequestCustom.cpp:

(WebCore::V8XMLHttpRequest::responseAccessorGetter):

  • platform/chromium/PlatformSupport.h:

(PlatformSupport):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseBlob):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didReceiveData):

  • xml/XMLHttpRequest.h:

(XMLHttpRequest):

  • xml/XMLHttpRequest.idl:

Source/WebKit/chromium:

Removing XHR_RESPONSE_BLOB since the current implementation has
no platform-specific part.

  • src/PlatformSupport.cpp:
  • src/WebRuntimeFeatures.cpp:

(WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
(WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):

LayoutTests:

Removing xhr.Blob related test from Skipped files.

  • platform/efl/Skipped:
  • platform/gtk/TestExpectations:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:
  • platform/wincairo/Skipped:
Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r120573 r120574  
     12012-06-15  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        XHR_RESPONSE_BLOB is not enabled on some platforms
     4        https://bugs.webkit.org/show_bug.cgi?id=88859
     5
     6        Reviewed by Adam Barth.
     7
     8        Removing xhr.Blob related test from Skipped files.
     9
     10        * platform/efl/Skipped:
     11        * platform/gtk/TestExpectations:
     12        * platform/mac/Skipped:
     13        * platform/qt/Skipped:
     14        * platform/win/Skipped:
     15        * platform/wincairo/Skipped:
     16
    1172012-06-17  Christophe Dumez  <christophe.dumez@intel.com>
    218
  • trunk/LayoutTests/platform/efl/Skipped

    r120493 r120574  
    11761176# Needs a text rebaseline: 30px height difference.
    11771177fast/block/basic/fieldset-stretch-to-legend.html
    1178 
    1179 # Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    1180 # https://bugs.webkit.org/show_bug.cgi?id=88859
    1181 http/tests/xmlhttprequest/response-blob-size.html
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r120493 r120574  
    324324// UndoManager is not yet enabled.
    325325BUGWK87908 SKIP : editing/undomanager = PASS
    326 
    327 // Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    328 // https://bugs.webkit.org/show_bug.cgi?id=88859
    329 BUGWK88859 : http/tests/xmlhttprequest/response-blob-size.html = TEXT
    330326
    331327// New test infrastructure required -- need isolated worlds
  • trunk/LayoutTests/platform/mac/Skipped

    r120493 r120574  
    891891# https://bugs.webkit.org/show_bug.cgi?id=88736
    892892http/tests/security/mixedContent/blob-url-in-iframe.html
    893 
    894 # Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    895 # https://bugs.webkit.org/show_bug.cgi?id=88859
    896 http/tests/xmlhttprequest/response-blob-size.html
  • trunk/LayoutTests/platform/qt/Skipped

    r120493 r120574  
    25132513fast/block/basic/fieldset-stretch-to-legend.html
    25142514
    2515 # Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    2516 # https://bugs.webkit.org/show_bug.cgi?id=88859
    2517 http/tests/xmlhttprequest/response-blob-size.html
    2518 
    25192515# [Qt]REGRESSION(r120107): It made http/tests/xmlhttprequest/origin-exact-matching.html fails
    25202516# https://bugs.webkit.org/show_bug.cgi?id=88913
  • trunk/LayoutTests/platform/win/Skipped

    r120341 r120574  
    19461946svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg
    19471947svg/W3C-SVG-1.1-SE/text-intro-05-t.svg
    1948 
    1949 # Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    1950 # https://bugs.webkit.org/show_bug.cgi?id=88859
    1951 http/tests/xmlhttprequest/response-blob-size.html
  • trunk/LayoutTests/platform/wincairo/Skipped

    r120177 r120574  
    21182118# https://bugs.webkit.org/show_bug.cgi?id=86000
    21192119http/tests/security/referrer-policy-redirect-link.html
    2120 
    2121 # Fail until ENABLE_XHR_RESPONSE_BLOB is enabled after r120042
    2122 # https://bugs.webkit.org/show_bug.cgi?id=88859
    2123 http/tests/xmlhttprequest/response-blob-size.html
  • trunk/Source/WebCore/ChangeLog

    r120572 r120574  
     12012-06-15  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        XHR_RESPONSE_BLOB is not enabled on some platforms
     4        https://bugs.webkit.org/show_bug.cgi?id=88859
     5
     6        Reviewed by Adam Barth.
     7
     8        Removing XHR_RESPONSE_BLOB since the current implementation has
     9        no platform-specific part.
     10
     11        Test: http/tests/xmlhttprequest/blob-response-size.html
     12
     13        * bindings/generic/RuntimeEnabledFeatures.cpp:
     14        (WebCore):
     15        * bindings/generic/RuntimeEnabledFeatures.h:
     16        (RuntimeEnabledFeatures):
     17        * bindings/js/JSXMLHttpRequestCustom.cpp:
     18        (WebCore::JSXMLHttpRequest::visitChildren):
     19        (WebCore::JSXMLHttpRequest::response):
     20        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
     21        (WebCore::V8XMLHttpRequest::responseAccessorGetter):
     22        * platform/chromium/PlatformSupport.h:
     23        (PlatformSupport):
     24        * xml/XMLHttpRequest.cpp:
     25        (WebCore::XMLHttpRequest::responseBlob):
     26        (WebCore::XMLHttpRequest::setResponseType):
     27        (WebCore::XMLHttpRequest::clearResponseBuffers):
     28        (WebCore::XMLHttpRequest::didReceiveData):
     29        * xml/XMLHttpRequest.h:
     30        (XMLHttpRequest):
     31        * xml/XMLHttpRequest.idl:
     32
    1332012-06-17  Martin Robinson  <mrobinson@igalia.com>
    234
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r115341 r120574  
    7171#endif
    7272
    73 #if ENABLE(XHR_RESPONSE_BLOB)
    74 bool RuntimeEnabledFeatures::isXHRResponseBlobEnabled = false;
    75 #endif
    76 
    7773#if ENABLE(FILE_SYSTEM)
    7874bool RuntimeEnabledFeatures::isFileSystemEnabled = false;
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r120030 r120574  
    170170#endif
    171171
    172 #if ENABLE(XHR_RESPONSE_BLOB)
    173     static bool xhrResponseBlobEnabled() { return isXHRResponseBlobEnabled; }
    174     static void setXHRResponseBlobEnabled(bool isEnabled) { isXHRResponseBlobEnabled = isEnabled; }
    175     static bool responseBlobEnabled() { return isXHRResponseBlobEnabled; }
    176     static bool asBlobEnabled()  { return isXHRResponseBlobEnabled; }
    177 #endif
    178 
    179172#if ENABLE(FILE_SYSTEM)
    180173    static bool fileSystemEnabled();
     
    260253    static bool isScriptedSpeechEnabled;
    261254#endif
    262 #if ENABLE(XHR_RESPONSE_BLOB)
    263     static bool isXHRResponseBlobEnabled;
    264 #endif
    265 
    266255#if ENABLE(FILE_SYSTEM)
    267256    static bool isFileSystemEnabled;
  • trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp

    r117646 r120574  
    7272        visitor.addOpaqueRoot(responseArrayBuffer);
    7373
    74 #if ENABLE(XHR_RESPONSE_BLOB)
    7574    if (Blob* responseBlob = thisObject->m_impl->optionalResponseBlob())
    7675        visitor.addOpaqueRoot(responseBlob);
    77 #endif
    7876
    7977    thisObject->m_impl->visitJSEventListeners(visitor);
     
    175173
    176174    case XMLHttpRequest::ResponseTypeBlob:
    177 #if ENABLE(XHR_RESPONSE_BLOB)
    178175        {
    179176            ExceptionCode ec = 0;
     
    185182            return toJS(exec, globalObject(), blob);
    186183        }
    187 #else
    188         return jsUndefined();
    189 #endif
    190184
    191185    case XMLHttpRequest::ResponseTypeArrayBuffer:
  • trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

    r119070 r120574  
    8181
    8282    case XMLHttpRequest::ResponseTypeBlob:
    83 #if ENABLE(XHR_RESPONSE_BLOB)
    8483        {
    8584            ExceptionCode ec = 0;
     
    8988            return toV8(blob, info.GetIsolate());
    9089        }
    91 #else
    92         return v8::Undefined();
    93 #endif
    9490
    9591    case XMLHttpRequest::ResponseTypeArrayBuffer:
  • trunk/Source/WebCore/platform/chromium/PlatformSupport.h

    r119997 r120574  
    6666namespace WebCore {
    6767
    68 class AsyncFileSystem;
    6968class Color;
    7069class Cursor;
     
    10099    static bool cookiesEnabled(const Document*);
    101100
    102 #if ENABLE(FILE_SYSTEM)
    103     static PassOwnPtr<AsyncFileSystem> createAsyncFileSystem();
    104 #endif
    105 
    106101    // Font ---------------------------------------------------------------
    107102#if OS(WINDOWS)
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r120168 r120574  
    265265}
    266266
    267 #if ENABLE(XHR_RESPONSE_BLOB)
    268267Blob* XMLHttpRequest::responseBlob(ExceptionCode& ec)
    269268{
     
    300299    return m_responseBlob.get();
    301300}
    302 #endif
    303301
    304302ArrayBuffer* XMLHttpRequest::responseArrayBuffer(ExceptionCode& ec)
     
    343341    else if (responseType == "document")
    344342        m_responseTypeCode = ResponseTypeDocument;
    345     else if (responseType == "blob") {
    346 #if ENABLE(XHR_RESPONSE_BLOB)
     343    else if (responseType == "blob")
    347344        m_responseTypeCode = ResponseTypeBlob;
    348 #endif
    349     } else if (responseType == "arraybuffer") {
     345    else if (responseType == "arraybuffer")
    350346        m_responseTypeCode = ResponseTypeArrayBuffer;
    351     } else
     347    else
    352348        ec = SYNTAX_ERR;
    353349}
     
    414410    m_includeCredentials = value;
    415411}
    416 
    417 #if ENABLE(XHR_RESPONSE_BLOB)
    418 void XMLHttpRequest::setAsBlob(bool value, ExceptionCode& ec)
    419 {
    420     if (m_state != OPENED || m_loader) {
    421         ec = INVALID_STATE_ERR;
    422         return;
    423     }
    424    
    425     m_responseTypeCode = value ? ResponseTypeBlob : ResponseTypeDefault;
    426 }
    427 #endif
    428412
    429413bool XMLHttpRequest::isAllowedHTTPMethod(const String& method)
     
    816800    m_createdDocument = false;
    817801    m_responseDocument = 0;
    818 #if ENABLE(XHR_RESPONSE_BLOB)
    819802    m_responseBlob = 0;
    820 #endif
    821803    m_binaryResponseBuilder.clear();
    822804    m_responseArrayBuffer.clear();
     
    11371119    if (useDecoder)
    11381120        m_responseBuilder.append(m_decoder->decode(data, len));
    1139     else if (m_responseTypeCode == ResponseTypeArrayBuffer
    1140 #if ENABLE(XHR_RESPONSE_BLOB)
    1141              || m_responseTypeCode == ResponseTypeBlob
    1142 #endif
    1143              ) {
     1121    else if (m_responseTypeCode == ResponseTypeArrayBuffer || m_responseTypeCode == ResponseTypeBlob) {
    11441122        // Buffer binary data.
    11451123        if (!m_binaryResponseBuilder)
  • trunk/Source/WebCore/xml/XMLHttpRequest.h

    r109635 r120574  
    8484    bool withCredentials() const { return m_includeCredentials; }
    8585    void setWithCredentials(bool, ExceptionCode&);
    86 #if ENABLE(XHR_RESPONSE_BLOB)
    87     bool asBlob() const { return m_responseTypeCode == ResponseTypeBlob; }
    88     void setAsBlob(bool, ExceptionCode&);
    89 #endif
    9086    void open(const String& method, const KURL&, ExceptionCode&);
    9187    void open(const String& method, const KURL&, bool async, ExceptionCode&);
     
    106102    Document* responseXML(ExceptionCode&);
    107103    Document* optionalResponseXML() const { return m_responseDocument.get(); }
    108 #if ENABLE(XHR_RESPONSE_BLOB)
    109104    Blob* responseBlob(ExceptionCode&);
    110105    Blob* optionalResponseBlob() const { return m_responseBlob.get(); }
    111 #endif
    112106
    113107    // Expose HTTP validation methods for other untrusted requests.
     
    194188    bool m_async;
    195189    bool m_includeCredentials;
    196 #if ENABLE(XHR_RESPONSE_BLOB)
    197190    RefPtr<Blob> m_responseBlob;
    198 #endif
    199191
    200192    RefPtr<ThreadableLoader> m_loader;
  • trunk/Source/WebCore/xml/XMLHttpRequest.idl

    r107312 r120574  
    5959        readonly attribute unsigned short readyState;
    6060
    61         // request
    62         attribute [Conditional=XHR_RESPONSE_BLOB, V8EnabledAtRuntime] boolean asBlob
    63             setter raises(DOMException);
    64 
    6561        attribute boolean withCredentials
    6662            setter raises(DOMException);
     
    9894        readonly attribute Document responseXML
    9995            getter raises(DOMException);
    100         readonly attribute [Conditional=XHR_RESPONSE_BLOB, V8EnabledAtRuntime] Blob responseBlob
     96        readonly attribute Blob responseBlob
    10197            getter raises(DOMException);
    10298
  • trunk/Source/WebKit/chromium/ChangeLog

    r120564 r120574  
     12012-06-15  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        XHR_RESPONSE_BLOB is not enabled on some platforms
     4        https://bugs.webkit.org/show_bug.cgi?id=88859
     5
     6        Reviewed by Adam Barth.
     7
     8        Removing XHR_RESPONSE_BLOB since the current implementation has
     9        no platform-specific part.
     10
     11        * src/PlatformSupport.cpp:
     12        * src/WebRuntimeFeatures.cpp:
     13        (WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
     14        (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):
     15
    1162012-06-17  MORITA Hajime  <morrita@google.com>
    217
  • trunk/Source/WebKit/chromium/src/PlatformSupport.cpp

    r119997 r120574  
    7979#include "NativeImageSkia.h"
    8080
    81 #include "AsyncFileSystemChromium.h"
    8281#include "BitmapImage.h"
    8382#include "Cookie.h"
     
    207206    return result;
    208207}
    209 
    210 // File ------------------------------------------------------------------------
    211 
    212 #if ENABLE(FILE_SYSTEM)
    213 PassOwnPtr<AsyncFileSystem> PlatformSupport::createAsyncFileSystem()
    214 {
    215     return AsyncFileSystemChromium::create();
    216 }
    217 #endif
    218208
    219209// Font -----------------------------------------------------------------------
  • trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp

    r120030 r120574  
    279279void WebRuntimeFeatures::enableXHRResponseBlob(bool enable)
    280280{
    281 #if ENABLE(XHR_RESPONSE_BLOB)
    282     RuntimeEnabledFeatures::setXHRResponseBlobEnabled(enable);
    283 #endif
    284281}
    285282
    286283bool WebRuntimeFeatures::isXHRResponseBlobEnabled()
    287284{
    288 #if ENABLE(XHR_RESPONSE_BLOB)
    289     return RuntimeEnabledFeatures::xhrResponseBlobEnabled();
    290 #else
    291     return false;
    292 #endif
     285    return true;
    293286}
    294287
Note: See TracChangeset for help on using the changeset viewer.