Changeset 150757 in webkit


Ignore:
Timestamp:
May 27, 2013, 8:37:16 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Remove encoding parameter from FrameLoaderClientBlackBerry::receivedData()
https://bugs.webkit.org/show_bug.cgi?id=116598

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-27
Reviewed by Rob Buis.

It's no longer needed since the encoder now checks the override encoding.

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::committedLoad): Call
receivedData() passing the DocumentLoader instead of the text
encoding.
(WebCore::FrameLoaderClientBlackBerry::receivedData): Call
DocumentLoader::commitData() directly.

  • WebCoreSupport/FrameLoaderClientBlackBerry.h:

(FrameLoaderClientBlackBerry):

Location:
trunk/Source/WebKit/blackberry
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r150756 r150757  
     12013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [BlackBerry] Remove encoding parameter from FrameLoaderClientBlackBerry::receivedData()
     4        https://bugs.webkit.org/show_bug.cgi?id=116598
     5
     6        Reviewed by Rob Buis.
     7
     8        It's no longer needed since the encoder now checks the override encoding.
     9
     10        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     11        (WebCore::FrameLoaderClientBlackBerry::committedLoad): Call
     12        receivedData() passing the DocumentLoader instead of the text
     13        encoding.
     14        (WebCore::FrameLoaderClientBlackBerry::receivedData): Call
     15        DocumentLoader::commitData() directly.
     16        * WebCoreSupport/FrameLoaderClientBlackBerry.h:
     17        (FrameLoaderClientBlackBerry):
     18
    1192013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
    220
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r150628 r150757  
    290290    // to receivedData.
    291291
    292     if (!m_pluginView) {
    293         const String& textEncoding = loader->response().textEncodingName();
    294         receivedData(data, length, textEncoding);
    295     }
     292    if (!m_pluginView)
     293        receivedData(loader, data, length);
    296294
    297295    if (m_pluginView) {
     
    348346}
    349347
    350 void FrameLoaderClientBlackBerry::receivedData(const char* data, int length, const String& textEncoding)
     348void FrameLoaderClientBlackBerry::receivedData(DocumentLoader* loader, const char* data, int length)
    351349{
    352350    if (!m_frame)
     
    360358    }
    361359
    362     // Set the encoding. This only needs to be done once, but it's harmless to do it again later.
    363     String encoding = m_frame->loader()->documentLoader()->overrideEncoding();
    364     bool userChosen = !encoding.isNull();
    365     if (encoding.isNull())
    366         encoding = textEncoding;
    367     m_frame->loader()->documentLoader()->writer()->setEncoding(encoding, userChosen);
    368     m_frame->loader()->documentLoader()->writer()->addData(data, length);
     360    // The encoder now checks the override encoding and sets everything on our behalf.
     361    loader->commitData(data, length);
    369362}
    370363
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h

    r149830 r150757  
    182182
    183183private:
    184     void receivedData(const char*, int, const String&);
     184    void receivedData(DocumentLoader*, const char*, int, const String&);
    185185    void didFinishOrFailLoading(const ResourceError&);
    186186    bool isMainFrame() const;
Note: See TracChangeset for help on using the changeset viewer.