Changeset 75020 in webkit


Ignore:
Timestamp:
Jan 4, 2011 3:28:59 PM (13 years ago)
Author:
Darin Adler
Message:

2011-01-04 Darin Adler <Darin Adler>

Reviewed by Brady Eidson.

Add back/forward encoding and decoding to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51901

  • WebCore.exp.in: Export functions used in WebKit2.
  • history/HistoryItem.cpp: (WebCore::HistoryItem::encodeBackForwardTree): Use references instead of pointers. (WebCore::HistoryItem::encodeBackForwardTreeNode): Ditto. (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
  • history/HistoryItem.h: Ditto.
  • platform/network/FormData.cpp: (WebCore::encode): Ditto. (WebCore::decode): Ditto. (WebCore::FormData::encodeForBackForward): Ditto. (WebCore::FormData::decodeForBackForward): Ditto.
  • platform/network/FormData.h: Ditto.

2011-01-04 Darin Adler <Darin Adler>

Reviewed by Brady Eidson.

Add back/forward encoding and decoding to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51901

  • GNUmakefile.am: Added new source files.
  • WebKit2.pro: Ditto.
  • WebKit2.xcodeproj/project.pbxproj: Ditto.
  • win/WebKit2.vcproj: Ditto.
  • WebProcess/WebPage/DecoderAdapter.cpp: Added.
  • WebProcess/WebPage/DecoderAdapter.h: Added.
  • WebProcess/WebPage/EncoderAdapter.cpp: Added.
  • WebProcess/WebPage/EncoderAdapter.h: Added.
  • WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::updateBackForwardItem): Added code to encode the back/forward tree and send it along. The code to decode needs to wait on Brady's current project.
Location:
trunk
Files:
4 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r75018 r75020  
     12011-01-04  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Brady Eidson.
     4
     5        Add back/forward encoding and decoding to WebKit2
     6        https://bugs.webkit.org/show_bug.cgi?id=51901
     7
     8        * WebCore.exp.in: Export functions used in WebKit2.
     9
     10        * history/HistoryItem.cpp:
     11        (WebCore::HistoryItem::encodeBackForwardTree): Use references instead of pointers.
     12        (WebCore::HistoryItem::encodeBackForwardTreeNode): Ditto.
     13        (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
     14        * history/HistoryItem.h: Ditto.
     15        * platform/network/FormData.cpp:
     16        (WebCore::encode): Ditto.
     17        (WebCore::decode): Ditto.
     18        (WebCore::FormData::encodeForBackForward): Ditto.
     19        (WebCore::FormData::decodeForBackForward): Ditto.
     20        * platform/network/FormData.h: Ditto.
     21
    1222011-01-04  Xiaomei Ji  <xji@chromium.org>
    223
  • trunk/WebCore/WebCore.exp.in

    r74657 r75020  
    194194__ZN7WebCore11HistoryItem20setOriginalURLStringERKN3WTF6StringE
    195195__ZN7WebCore11HistoryItem20setTransientPropertyERKN3WTF6StringEP11objc_object
     196__ZN7WebCore11HistoryItem21decodeBackForwardTreeERKN3WTF6StringES4_S4_RNS1_7DecoderE
    196197__ZN7WebCore11HistoryItem22mergeAutoCompleteHintsEPS0_
    197198__ZN7WebCore11HistoryItem6setURLERKNS_4KURLE
     
    341342__ZN7WebCore14SecurityOrigin32removeOriginAccessWhitelistEntryERKS0_RKN3WTF6StringES6_b
    342343__ZN7WebCore14SecurityOrigin40setDomainRelaxationForbiddenForURLSchemeEbRKN3WTF6StringE
     344__ZN7WebCore14SecurityOrigin6createERKN3WTF6StringES4_i
    343345__ZN7WebCore14SecurityOrigin6createERKNS_4KURLEi
    344 __ZN7WebCore14SecurityOrigin6createERKN3WTF6StringES4_i
    345346__ZN7WebCore15ArchiveResource6createEN3WTF10PassRefPtrINS_12SharedBufferEEERKNS_4KURLERKNS1_6StringESA_SA_RKNS_16ResourceResponseE
    346347__ZN7WebCore15DOMWrapperWorld15unregisterWorldEv
     
    967968__ZNK7WebCore11HistoryItem17originalURLStringEv
    968969__ZNK7WebCore11HistoryItem20getTransientPropertyERKN3WTF6StringE
     970__ZNK7WebCore11HistoryItem21encodeBackForwardTreeERN3WTF7EncoderE
    969971__ZNK7WebCore11HistoryItem3urlEv
    970972__ZNK7WebCore11HistoryItem4copyEv
  • trunk/WebCore/history/HistoryItem.cpp

    r74956 r75020  
    626626}
    627627
    628 void HistoryItem::encodeBackForwardTree(Encoder* encoder) const
    629 {
    630     encoder->encodeUInt32(backForwardTreeEncodingVersion);
     628void HistoryItem::encodeBackForwardTree(Encoder& encoder) const
     629{
     630    encoder.encodeUInt32(backForwardTreeEncodingVersion);
    631631
    632632    encodeBackForwardTreeNode(encoder);
    633633}
    634634
    635 void HistoryItem::encodeBackForwardTreeNode(Encoder* encoder) const
     635void HistoryItem::encodeBackForwardTreeNode(Encoder& encoder) const
    636636{
    637637    size_t size = m_children.size();
    638     encoder->encodeUInt64(size);
     638    encoder.encodeUInt64(size);
    639639    for (size_t i = 0; i < size; ++i) {
    640640        const HistoryItem& child = *m_children[i];
    641641
    642         encoder->encodeString(child.m_originalURLString);
    643 
    644         encoder->encodeString(child.m_urlString);
     642        encoder.encodeString(child.m_originalURLString);
     643
     644        encoder.encodeString(child.m_urlString);
    645645
    646646        child.encodeBackForwardTreeNode(encoder);
    647647    }
    648648
    649     encoder->encodeInt64(m_documentSequenceNumber);
     649    encoder.encodeInt64(m_documentSequenceNumber);
    650650
    651651    size = m_documentState.size();
    652     encoder->encodeUInt64(size);
     652    encoder.encodeUInt64(size);
    653653    for (size_t i = 0; i < size; ++i)
    654         encoder->encodeString(m_documentState[i]);
    655 
    656     encoder->encodeString(m_formContentType);
    657 
    658     encoder->encodeBool(m_formData);
     654        encoder.encodeString(m_documentState[i]);
     655
     656    encoder.encodeString(m_formContentType);
     657
     658    encoder.encodeBool(m_formData);
    659659    if (m_formData)
    660660        m_formData->encodeForBackForward(encoder);
    661661
    662     encoder->encodeInt64(m_itemSequenceNumber);
    663 
    664     encoder->encodeString(m_originalURLString);
    665 
    666     encoder->encodeString(m_referrer);
    667 
    668     encoder->encodeInt32(m_scrollPoint.x());
    669     encoder->encodeInt32(m_scrollPoint.y());
    670 
    671     encoder->encodeBool(m_stateObject);
     662    encoder.encodeInt64(m_itemSequenceNumber);
     663
     664    encoder.encodeString(m_originalURLString);
     665
     666    encoder.encodeString(m_referrer);
     667
     668    encoder.encodeInt32(m_scrollPoint.x());
     669    encoder.encodeInt32(m_scrollPoint.y());
     670
     671    encoder.encodeBool(m_stateObject);
    672672    if (m_stateObject) {
    673673#if !USE(V8)
    674         encoder->encodeBytes(m_stateObject->data().data(), m_stateObject->data().size());
     674        encoder.encodeBytes(m_stateObject->data().data(), m_stateObject->data().size());
    675675#else
    676         encoder->encodeString(m_stateObject->toWireString());
    677 #endif
    678     }
    679 
    680     encoder->encodeString(m_target);
     676        encoder.encodeString(m_stateObject->toWireString());
     677#endif
     678    }
     679
     680    encoder.encodeString(m_target);
    681681}
    682682
     
    694694};
    695695
    696 PassRefPtr<HistoryItem> HistoryItem::decodeBackForwardTree(const String& topURLString, const String& topTitle, const String& topOriginalURLString, Decoder* decoder)
     696PassRefPtr<HistoryItem> HistoryItem::decodeBackForwardTree(const String& topURLString, const String& topTitle, const String& topOriginalURLString, Decoder& decoder)
    697697{
    698698    // Since the data stream is not trusted, the decode has to be non-recursive.
     
    700700
    701701    uint32_t version;
    702     if (!decoder->decodeUInt32(version))
     702    if (!decoder.decodeUInt32(version))
    703703        return 0;
    704704    if (version != backForwardTreeEncodingVersion)
     
    719719
    720720    uint64_t size;
    721     if (!decoder->decodeUInt64(size))
     721    if (!decoder.decodeUInt64(size))
    722722        return 0;
    723723    size_t i;
    724724    RefPtr<HistoryItem> child;
    725725    for (i = 0; i < size; ++i) {
    726         if (!decoder->decodeString(originalURLString))
     726        if (!decoder.decodeString(originalURLString))
    727727            return 0;
    728728
    729         if (!decoder->decodeString(urlString))
     729        if (!decoder.decodeString(urlString))
    730730            return 0;
    731731
     
    737737    }
    738738
    739     if (!decoder->decodeInt64(node->m_documentSequenceNumber))
    740         return 0;
    741 
    742     if (!decoder->decodeUInt64(size))
     739    if (!decoder.decodeInt64(node->m_documentSequenceNumber))
     740        return 0;
     741
     742    if (!decoder.decodeUInt64(size))
    743743        return 0;
    744744    for (i = 0; i < size; ++i) {
    745745        String state;
    746         if (!decoder->decodeString(state))
     746        if (!decoder.decodeString(state))
    747747            return 0;
    748748        node->m_documentState.append(state);
    749749    }
    750750
    751     if (!decoder->decodeString(node->m_formContentType))
     751    if (!decoder.decodeString(node->m_formContentType))
    752752        return 0;
    753753
    754754    bool hasFormData;
    755     if (!decoder->decodeBool(hasFormData))
     755    if (!decoder.decodeBool(hasFormData))
    756756        return 0;
    757757    if (hasFormData) {
     
    761761    }
    762762
    763     if (!decoder->decodeInt64(node->m_itemSequenceNumber))
    764         return 0;
    765 
    766     if (!decoder->decodeString(node->m_originalURLString))
    767         return 0;
    768 
    769     if (!decoder->decodeString(node->m_referrer))
     763    if (!decoder.decodeInt64(node->m_itemSequenceNumber))
     764        return 0;
     765
     766    if (!decoder.decodeString(node->m_originalURLString))
     767        return 0;
     768
     769    if (!decoder.decodeString(node->m_referrer))
    770770        return 0;
    771771
    772772    int32_t x;
    773     if (!decoder->decodeInt32(x))
     773    if (!decoder.decodeInt32(x))
    774774        return 0;
    775775    int32_t y;
    776     if (!decoder->decodeInt32(y))
     776    if (!decoder.decodeInt32(y))
    777777        return 0;
    778778    node->m_scrollPoint = IntPoint(x, y);
    779779
    780780    bool hasStateObject;
    781     if (!decoder->decodeBool(hasStateObject))
     781    if (!decoder.decodeBool(hasStateObject))
    782782        return 0;
    783783    if (hasStateObject) {
    784784#if !USE(V8)
    785785        Vector<uint8_t> bytes;
    786         if (!decoder->decodeBytes(bytes))
     786        if (!decoder.decodeBytes(bytes))
    787787            return 0;
    788788        node->m_stateObject = SerializedScriptValue::adopt(bytes);
    789789#else
    790790        String string;
    791         if (!decoder->decodeString(string))
     791        if (!decoder.decodeString(string))
    792792            return 0;
    793793        node->m_stateObject = SerializedScriptValue::createFromWire(string);
     
    795795    }
    796796
    797     if (!decoder->decodeString(node->m_target))
     797    if (!decoder.decodeString(node->m_target))
    798798        return 0;
    799799
  • trunk/WebCore/history/HistoryItem.h

    r74951 r75020  
    8989    PassRefPtr<HistoryItem> copy() const;
    9090
    91     void encodeBackForwardTree(Encoder*) const;
    92     static PassRefPtr<HistoryItem> decodeBackForwardTree(const String& urlString, const String& title, const String& originalURLString, Decoder*);
     91    void encodeBackForwardTree(Encoder&) const;
     92    static PassRefPtr<HistoryItem> decodeBackForwardTree(const String& urlString, const String& title, const String& originalURLString, Decoder&);
    9393
    9494    const String& originalURLString() const;
     
    227227    HistoryItem* findTargetItem();
    228228
    229     void encodeBackForwardTreeNode(Encoder*) const;
    230     static PassRefPtr<HistoryItem> decodeBackForwardTreeNode(const String& urlString, const String& title, const String& originalURLString, Decoder*);
     229    void encodeBackForwardTreeNode(Encoder&) const;
     230    static PassRefPtr<HistoryItem> decodeBackForwardTreeNode(const String& urlString, const String& title, const String& originalURLString, Decoder&);
    231231
    232232    /* When adding new member variables to this class, please notify the Qt team.
  • trunk/WebCore/platform/network/FormData.cpp

    r74952 r75020  
    330330}
    331331
    332 static void encode(Encoder* encoder, const FormDataElement& element)
    333 {
    334     encoder->encodeUInt32(element.m_type);
     332static void encode(Encoder& encoder, const FormDataElement& element)
     333{
     334    encoder.encodeUInt32(element.m_type);
    335335
    336336    switch (element.m_type) {
    337337    case FormDataElement::data:
    338         encoder->encodeBytes(reinterpret_cast<const uint8_t*>(element.m_data.data()), element.m_data.size());
     338        encoder.encodeBytes(reinterpret_cast<const uint8_t*>(element.m_data.data()), element.m_data.size());
    339339        return;
    340340
    341341    case FormDataElement::encodedFile:
    342         encoder->encodeString(element.m_filename);
    343         encoder->encodeBool(element.m_shouldGenerateFile);
    344 #if ENABLE(BLOB)
    345         encoder->encodeInt64(element.m_fileStart);
    346         encoder->encodeInt64(element.m_fileLength);
    347         encoder->encodeDouble(element.m_expectedFileModificationTime);
     342        encoder.encodeString(element.m_filename);
     343        encoder.encodeBool(element.m_shouldGenerateFile);
     344#if ENABLE(BLOB)
     345        encoder.encodeInt64(element.m_fileStart);
     346        encoder.encodeInt64(element.m_fileLength);
     347        encoder.encodeDouble(element.m_expectedFileModificationTime);
    348348#else
    349         encoder->encodeInt64(0);
    350         encoder->encodeInt64(0);
    351         encoder->encodeDouble(0);
     349        encoder.encodeInt64(0);
     350        encoder.encodeInt64(0);
     351        encoder.encodeDouble(0);
    352352#endif
    353353        return;
     
    355355#if ENABLE(BLOB)
    356356    case FormDataElement::encodedBlob:
    357         encoder->encodeString(element.m_blobURL.string());
     357        encoder.encodeString(element.m_blobURL.string());
    358358        return;
    359359#endif
     
    363363}
    364364
    365 static bool decode(Decoder* decoder, FormDataElement& element)
     365static bool decode(Decoder& decoder, FormDataElement& element)
    366366{
    367367    uint32_t type = element.m_type;
     
    371371        element.m_type = FormDataElement::data;
    372372        Vector<uint8_t> data;
    373         if (!decoder->decodeBytes(data))
     373        if (!decoder.decodeBytes(data))
    374374            return false;
    375375        size_t size = data.size();
     
    381381    case FormDataElement::encodedFile: {
    382382        element.m_type = FormDataElement::encodedFile;
    383         if (!decoder->decodeString(element.m_filename))
    384             return false;
    385         if (!decoder->decodeBool(element.m_shouldGenerateFile))
     383        if (!decoder.decodeString(element.m_filename))
     384            return false;
     385        if (!decoder.decodeBool(element.m_shouldGenerateFile))
    386386            return false;
    387387        int64_t fileStart;
    388         if (!decoder->decodeInt64(fileStart))
     388        if (!decoder.decodeInt64(fileStart))
    389389            return false;
    390390        if (fileStart < 0)
    391391            return false;
    392392        int64_t fileLength;
    393         if (!decoder->decodeInt64(fileLength))
     393        if (!decoder.decodeInt64(fileLength))
    394394            return false;
    395395        if (fileLength < fileStart)
    396396            return false;
    397397        double expectedFileModificationTime;
    398         if (!decoder->decodeDouble(expectedFileModificationTime))
     398        if (!decoder.decodeDouble(expectedFileModificationTime))
    399399            return false;
    400400#if ENABLE(BLOB)
     
    410410        element.m_type = FormDataElement::encodedBlob;
    411411        String blobURLString;
    412         if (!decoder->decodeString(blobURLString))
     412        if (!decoder.decodeString(blobURLString))
    413413            return false;
    414414        element.m_blobURL = KURL(KURL(), blobURLString);
     
    420420}
    421421
    422 void FormData::encodeForBackForward(Encoder* encoder) const
    423 {
    424     encoder->encodeBool(m_alwaysStream);
    425 
    426     encoder->encodeBytes(reinterpret_cast<const uint8_t*>(m_boundary.data()), m_boundary.size());
     422void FormData::encodeForBackForward(Encoder& encoder) const
     423{
     424    encoder.encodeBool(m_alwaysStream);
     425
     426    encoder.encodeBytes(reinterpret_cast<const uint8_t*>(m_boundary.data()), m_boundary.size());
    427427
    428428    size_t size = m_elements.size();
    429     encoder->encodeUInt64(size);
     429    encoder.encodeUInt64(size);
    430430    for (size_t i = 0; i < size; ++i)
    431431        encode(encoder, m_elements[i]);
    432432
    433     encoder->encodeBool(m_hasGeneratedFiles);
    434 
    435     encoder->encodeBool(m_identifier);
    436 }
    437 
    438 PassRefPtr<FormData> FormData::decodeForBackForward(Decoder* decoder)
     433    encoder.encodeBool(m_hasGeneratedFiles);
     434
     435    encoder.encodeBool(m_identifier);
     436}
     437
     438PassRefPtr<FormData> FormData::decodeForBackForward(Decoder& decoder)
    439439{
    440440    RefPtr<FormData> data = FormData::create();
    441441
    442     if (!decoder->decodeBool(data->m_alwaysStream))
     442    if (!decoder.decodeBool(data->m_alwaysStream))
    443443        return 0;
    444444
    445445    Vector<uint8_t> boundary;
    446     if (!decoder->decodeBytes(boundary))
     446    if (!decoder.decodeBytes(boundary))
    447447        return 0;
    448448    size_t size = boundary.size();
     
    451451
    452452    uint64_t elementsSize;
    453     if (!decoder->decodeUInt64(elementsSize))
     453    if (!decoder.decodeUInt64(elementsSize))
    454454        return 0;
    455455    for (size_t i = 0; i < elementsSize; ++i) {
     
    460460    }
    461461
    462     if (!decoder->decodeBool(data->m_hasGeneratedFiles))
     462    if (!decoder.decodeBool(data->m_hasGeneratedFiles))
    463463        return 0;
    464464
    465     if (!decoder->decodeInt64(data->m_identifier))
     465    if (!decoder.decodeInt64(data->m_identifier))
    466466        return 0;
    467467
  • trunk/WebCore/platform/network/FormData.h

    r74952 r75020  
    102102    ~FormData();
    103103
    104     void encodeForBackForward(Encoder*) const;
    105     static PassRefPtr<FormData> decodeForBackForward(Decoder*);
     104    void encodeForBackForward(Encoder&) const;
     105    static PassRefPtr<FormData> decodeForBackForward(Decoder&);
    106106
    107107    void appendData(const void* data, size_t);
  • trunk/WebKit2/ChangeLog

    r75015 r75020  
     12011-01-04  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Brady Eidson.
     4
     5        Add back/forward encoding and decoding to WebKit2
     6        https://bugs.webkit.org/show_bug.cgi?id=51901
     7
     8        * GNUmakefile.am: Added new source files.
     9        * WebKit2.pro: Ditto.
     10        * WebKit2.xcodeproj/project.pbxproj: Ditto.
     11        * win/WebKit2.vcproj: Ditto.
     12
     13        * WebProcess/WebPage/DecoderAdapter.cpp: Added.
     14        * WebProcess/WebPage/DecoderAdapter.h: Added.
     15        * WebProcess/WebPage/EncoderAdapter.cpp: Added.
     16        * WebProcess/WebPage/EncoderAdapter.h: Added.
     17
     18        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
     19        (WebKit::updateBackForwardItem): Added code to encode the back/forward
     20        tree and send it along. The code to decode needs to wait on Brady's
     21        current project.
     22
    1232011-01-04  Anders Carlsson  <andersca@apple.com>
    224
  • trunk/WebKit2/GNUmakefile.am

    r74766 r75020  
    401401        WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp \
    402402        WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h \
     403        WebKit2/WebProcess/WebPage/DecoderAdapter.cpp \
     404        WebKit2/WebProcess/WebPage/DecoderAdapter.h \
    403405        WebKit2/WebProcess/WebPage/DrawingArea.cpp \
    404406        WebKit2/WebProcess/WebPage/DrawingArea.h \
     407        WebKit2/WebProcess/WebPage/EncoderAdapter.cpp \
     408        WebKit2/WebProcess/WebPage/EncoderAdapter.h \
    405409        WebKit2/WebProcess/WebPage/FindController.cpp \
    406410        WebKit2/WebProcess/WebPage/FindController.h \
  • trunk/WebKit2/WebKit2.pro

    r74967 r75020  
    633633    WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp \
    634634    WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp \
     635    WebProcess/WebPage/DecoderAdapter.cpp \
    635636    WebProcess/WebPage/DrawingArea.cpp \
     637    WebProcess/WebPage/EncoderAdapter.cpp \
    636638    WebProcess/WebPage/FindController.cpp \
    637639    WebProcess/WebPage/PageOverlay.cpp \
  • trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r75010 r75020  
    273273                9391F2CA121B679A00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9391F284121B38F500EBF7E8 /* WebFrameNetworkingContext.mm */; };
    274274                9391F2CB121B67AD00EBF7E8 /* WebFrameNetworkingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 9391F283121B38F500EBF7E8 /* WebFrameNetworkingContext.h */; };
     275                93FC67BD12D3CCF200A60610 /* DecoderAdapter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FC679D12D3CC7400A60610 /* DecoderAdapter.cpp */; };
     276                93FC67BE12D3CCF200A60610 /* DecoderAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC679E12D3CC7400A60610 /* DecoderAdapter.h */; };
     277                93FC67BF12D3CCF200A60610 /* EncoderAdapter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */; };
     278                93FC67C012D3CCF200A60610 /* EncoderAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC67A012D3CC7400A60610 /* EncoderAdapter.h */; };
    275279                BC0092F7115837A300E0AE2A /* RunLoopMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0092F5115837A300E0AE2A /* RunLoopMac.mm */; };
    276280                BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0092F6115837A300E0AE2A /* WorkQueueMac.cpp */; };
     
    950954                9391F283121B38F500EBF7E8 /* WebFrameNetworkingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameNetworkingContext.h; sourceTree = "<group>"; };
    951955                9391F284121B38F500EBF7E8 /* WebFrameNetworkingContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFrameNetworkingContext.mm; sourceTree = "<group>"; };
     956                93FC679D12D3CC7400A60610 /* DecoderAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DecoderAdapter.cpp; sourceTree = "<group>"; };
     957                93FC679E12D3CC7400A60610 /* DecoderAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecoderAdapter.h; sourceTree = "<group>"; };
     958                93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EncoderAdapter.cpp; sourceTree = "<group>"; };
     959                93FC67A012D3CC7400A60610 /* EncoderAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncoderAdapter.h; sourceTree = "<group>"; };
    952960                A72D5D7F1236CBA800A88B15 /* WebSerializedScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSerializedScriptValue.h; sourceTree = "<group>"; };
    953961                BC0092F5115837A300E0AE2A /* RunLoopMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RunLoopMac.mm; sourceTree = "<group>"; };
     
    18861894                                BC5F7BB21182376C0052C02C /* ChunkedUpdateDrawingArea.cpp */,
    18871895                                BC5F7BB31182376C0052C02C /* ChunkedUpdateDrawingArea.h */,
     1896                                93FC679D12D3CC7400A60610 /* DecoderAdapter.cpp */,
     1897                                93FC679E12D3CC7400A60610 /* DecoderAdapter.h */,
    18881898                                BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */,
    18891899                                BC8452A61162C80900CAB9B5 /* DrawingArea.h */,
     1900                                93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */,
     1901                                93FC67A012D3CC7400A60610 /* EncoderAdapter.h */,
    18901902                                1A90C1F31264FD71003E44D4 /* FindController.cpp */,
    18911903                                1A90C1F21264FD71003E44D4 /* FindController.h */,
     
    28252837                                BCAC111F12C92C1F00B08EEE /* WebDatabaseManagerProxyClient.h in Headers */,
    28262838                                BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
     2839                                93FC67BE12D3CCF200A60610 /* DecoderAdapter.h in Headers */,
     2840                                93FC67C012D3CCF200A60610 /* EncoderAdapter.h in Headers */,
    28272841                                1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */,
    28282842                        );
     
    32553269                                BCCF6AC912C91F59008F9C35 /* WKImageCG.cpp in Sources */,
    32563270                                BCAC112012C92C1F00B08EEE /* WebDatabaseManagerProxyClient.cpp in Sources */,
     3271                                93FC67BD12D3CCF200A60610 /* DecoderAdapter.cpp in Sources */,
     3272                                93FC67BF12D3CCF200A60610 /* EncoderAdapter.cpp in Sources */,
    32573273                        );
    32583274                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp

    r74999 r75020  
    2626#include "WebBackForwardListProxy.h"
    2727
     28#include "EncoderAdapter.h"
    2829#include "WebCoreArgumentCoders.h"
    2930#include "WebPage.h"
     
    8889    const String& title = item->title();
    8990
    90     // FIXME: Pass the encoded backForwardData to the message here.
    91     WebProcess::shared().connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, originalURLString, urlString, title, Vector<uint8_t>()), 0);
     91    // FIXME: We only want to do this work for top level back/forward items.
     92    // The best way to do that is probably to arrange for this entire function to only be called by top leve back/forward items.
     93    EncoderAdapter encoder;
     94    item->encodeBackForwardTree(encoder);
     95
     96    WebProcess::shared().connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, originalURLString, urlString, title, encoder.data()), 0);
    9297}
    9398
  • trunk/WebKit2/win/WebKit2.vcproj

    r75010 r75020  
    13671367                                </File>
    13681368                                <File
     1369                                        RelativePath="..\WebProcess\WebPage\DecoderAdapter.cpp"
     1370                                        >
     1371                                </File>
     1372                                <File
     1373                                        RelativePath="..\WebProcess\WebPage\DecoderAdapter.h"
     1374                                        >
     1375                                </File>
     1376                                <File
    13691377                                        RelativePath="..\WebProcess\WebPage\DrawingArea.cpp"
    13701378                                        >
     
    13721380                                <File
    13731381                                        RelativePath="..\WebProcess\WebPage\DrawingArea.h"
     1382                                        >
     1383                                </File>
     1384                                <File
     1385                                        RelativePath="..\WebProcess\WebPage\EncoderAdapter.cpp"
     1386                                        >
     1387                                </File>
     1388                                <File
     1389                                        RelativePath="..\WebProcess\WebPage\EncoderAdapter.h"
    13741390                                        >
    13751391                                </File>
Note: See TracChangeset for help on using the changeset viewer.