Changeset 74970 in webkit


Ignore:
Timestamp:
Jan 4, 2011 9:05:37 AM (13 years ago)
Author:
beidson@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=51856
Pass encoded back/forward tree data from the WebProcess to the UIProcess

Reviewed by Darin Adler.

Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:

  • UIProcess/API/C/WKBackForwardListItem.cpp:
  • UIProcess/API/C/WKBackForwardListItem.h:
  • UIProcess/API/qt/qwkhistory.cpp:
  • UIProcess/API/qt/qwkhistory.h:


  • UIProcess/WebBackForwardListItem.cpp:

(WebKit::WebBackForwardListItem::WebBackForwardListItem):

  • UIProcess/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::backForwardData):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::addBackForwardItem):

  • UIProcess/WebProcessProxy.h:


  • UIProcess/WebProcessProxy.messages.in:


  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::updateBackForwardItem):

Location:
trunk/WebKit2
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r74967 r74970  
     12011-01-04  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=51856
     6        Pass encoded back/forward tree data from the WebProcess to the UIProcess
     7
     8        Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
     9        * UIProcess/API/C/WKBackForwardListItem.cpp:
     10        * UIProcess/API/C/WKBackForwardListItem.h:
     11        * UIProcess/API/qt/qwkhistory.cpp:
     12        * UIProcess/API/qt/qwkhistory.h:
     13       
     14        * UIProcess/WebBackForwardListItem.cpp:
     15        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
     16        * UIProcess/WebBackForwardListItem.h:
     17        (WebKit::WebBackForwardListItem::create):
     18        (WebKit::WebBackForwardListItem::setBackForwardData):
     19        (WebKit::WebBackForwardListItem::backForwardData):
     20       
     21        * UIProcess/WebProcessProxy.cpp:
     22        (WebKit::WebProcessProxy::addBackForwardItem):
     23        * UIProcess/WebProcessProxy.h:
     24       
     25        * UIProcess/WebProcessProxy.messages.in:
     26       
     27        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
     28        (WebKit::updateBackForwardItem):
     29
    1302011-01-04  Balazs Kelemen  <kbalazs@webkit.org>
    231
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp

    r69214 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3636}
    3737
    38 WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef itemRef)
    39 {
    40     return toCopiedURLAPI(toImpl(itemRef)->originalURL());
    41 }
    42 
    4338WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef itemRef)
    4439{
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardListItem.h

    r65780 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3535WK_EXPORT WKTypeID WKBackForwardListItemGetTypeID();
    3636
    37 WK_EXPORT WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef item);
    3837WK_EXPORT WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef item);
    3938WK_EXPORT WKStringRef WKBackForwardListItemCopyTitle(WKBackForwardListItemRef item);
  • trunk/WebKit2/UIProcess/API/qt/qwkhistory.cpp

    r71596 r74970  
    8282        return QUrl();
    8383    WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyURL(d->m_backForwardListItem.get());
    84     return WKURLCopyQUrl(url.get());
    85 }
    86 
    87 QUrl QWKHistoryItem::originalUrl() const
    88 {
    89     if (!d->m_backForwardListItem)
    90         return QUrl();
    91     WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyOriginalURL(d->m_backForwardListItem.get());
    9284    return WKURLCopyQUrl(url.get());
    9385}
  • trunk/WebKit2/UIProcess/API/qt/qwkhistory.h

    r71596 r74970  
    4848    QString title() const;
    4949    QUrl url() const;
    50     QUrl originalUrl() const;
    5150
    5251private:
  • trunk/WebKit2/UIProcess/WebBackForwardListItem.cpp

    r65465 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2828namespace WebKit {
    2929
    30 WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, uint64_t itemID)
     30WebBackForwardListItem::WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
    3131    : m_originalURL(originalURL)
    3232    , m_url(url)
    3333    , m_title(title)
    3434    , m_itemID(itemID)
     35    , m_backForwardData(backForwardData)
    3536{
    3637}
  • trunk/WebKit2/UIProcess/WebBackForwardListItem.h

    r70723 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3939    static const Type APIType = TypeBackForwardListItem;
    4040
    41     static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, uint64_t itemID)
     41    static PassRefPtr<WebBackForwardListItem> create(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID)
    4242    {
    43         return adoptRef(new WebBackForwardListItem(originalURL, url, title, itemID));
     43        return adoptRef(new WebBackForwardListItem(originalURL, url, title, backForwardData, itemID));
    4444    }
    4545
     
    5656    void setTitle(const String& title) { m_title = title; }
    5757    const String& title() const { return m_title; }
     58   
     59    void setBackForwardData(const Vector<uint8_t>& backForwardData) { m_backForwardData = backForwardData; }
     60    const Vector<uint8_t>& backForwardData() const { return m_backForwardData; }
    5861
    5962private:
    60     WebBackForwardListItem(const String& originalURL, const String& url, const String& title, uint64_t itemID);
     63    WebBackForwardListItem(const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData, uint64_t itemID);
    6164
    6265    virtual Type type() const { return APIType; }
     
    6669    String m_title;
    6770    uint64_t m_itemID;
     71    Vector<uint8_t> m_backForwardData;
    6872};
    6973
  • trunk/WebKit2/UIProcess/WebProcessProxy.cpp

    r74528 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    182182}
    183183
    184 void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title)
     184void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const Vector<uint8_t>& backForwardData)
    185185{
    186186    std::pair<WebBackForwardListItemMap::iterator, bool> result = m_backForwardListItemMap.add(itemID, 0);
    187187    if (result.second) {
    188188        // New item.
    189         result.first->second = WebBackForwardListItem::create(originalURL, url, title, itemID);
     189        result.first->second = WebBackForwardListItem::create(originalURL, url, title, backForwardData, itemID);
    190190        return;
    191191    }
     
    195195    result.first->second->setURL(url);
    196196    result.first->second->setTitle(title);
     197    result.first->second->setBackForwardData(backForwardData);
    197198}
    198199
  • trunk/WebKit2/UIProcess/WebProcessProxy.h

    r74528 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    110110    bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::ArgumentEncoder>);
    111111
    112     void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title);
     112    void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title, const Vector<uint8_t>& encodedData);
    113113
    114114#if ENABLE(PLUGIN_PROCESS)
  • trunk/WebKit2/UIProcess/WebProcessProxy.messages.in

    r74224 r74970  
    1 # Copyright (C) 2010 Apple Inc. All rights reserved.
     1# Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    2323messages -> WebProcessProxy {
    2424
    25     AddBackForwardItem(uint64_t itemID, WTF::String originalURL, WTF::String url, WTF::String title)
     25    AddBackForwardItem(uint64_t itemID, WTF::String originalURL, WTF::String url, WTF::String title, WTF::Vector<uint8_t> backForwardData)
    2626    DidDestroyFrame(uint64_t frameID)
    2727
  • trunk/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp

    r71423 r74970  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    8888    const String& title = item->title();
    8989
    90     WebProcess::shared().connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, originalURLString, urlString, title), 0);
     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);
    9192}
    9293
Note: See TracChangeset for help on using the changeset viewer.