Changeset 51630 in webkit


Ignore:
Timestamp:
Dec 3, 2009 4:31:28 AM (14 years ago)
Author:
benm@google.com
Message:

[Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
https://bugs.webkit.org/show_bug.cgi?id=31915

Reviewed by Brady Eidson.

WebCore:

No change in functionality so no new tests required.

  • history/HistoryItem.cpp:

(WebCore::defaultNotifyHistoryItemChanged): Update this function to pass the HistoryItem that is being changed.
(WebCore::HistoryItem::setAlternateTitle): Update call to notifyHistoryItemChanged to include the new parameter.
(WebCore::HistoryItem::setURLString): ditto.
(WebCore::HistoryItem::setOriginalURLString): ditto.
(WebCore::HistoryItem::setReferrer): ditto.
(WebCore::HistoryItem::setTitle): ditto.
(WebCore::HistoryItem::setTarget): ditto.
(WebCore::HistoryItem::setDocumentState): On Android, add a call to notifyHistoryItemChanged. See bug for a discussion of why this is needed.
(WebCore::HistoryItem::clearDocumentState): ditto.
(WebCore::HistoryItem::setIsTargetItem): ditto.
(WebCore::HistoryItem::addChildItem): ditto.
(WebCore::HistoryItem::setFormInfoFromRequest): ditto.

  • history/HistoryItem.h: Update signature of notifyHistoryItemChanged.

WebKit/mac:

  • History/WebHistoryItem.mm:

(WKNotifyHistoryItemChanged): Update WKNotifyHistoryItemChanged() to add the new HistoryItem parameter added in the WebCore portion of this patch.

  • History/WebHistoryItemInternal.h: ditto.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51629 r51630  
     12009-12-03  Ben Murdoch  <benm@google.com>
     2
     3        Reviewed by Brady Eidson.
     4
     5        [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
     6        https://bugs.webkit.org/show_bug.cgi?id=31915
     7
     8        No change in functionality so no new tests required.
     9
     10        * history/HistoryItem.cpp:
     11        (WebCore::defaultNotifyHistoryItemChanged): Update this function to pass the HistoryItem that is being changed.
     12        (WebCore::HistoryItem::setAlternateTitle): Update call to notifyHistoryItemChanged to include the new parameter.
     13        (WebCore::HistoryItem::setURLString): ditto.
     14        (WebCore::HistoryItem::setOriginalURLString): ditto.
     15        (WebCore::HistoryItem::setReferrer): ditto.
     16        (WebCore::HistoryItem::setTitle): ditto.
     17        (WebCore::HistoryItem::setTarget): ditto.
     18        (WebCore::HistoryItem::setDocumentState): On Android, add a call to notifyHistoryItemChanged. See bug for a discussion of why this is needed.
     19        (WebCore::HistoryItem::clearDocumentState): ditto.
     20        (WebCore::HistoryItem::setIsTargetItem): ditto.
     21        (WebCore::HistoryItem::addChildItem): ditto.
     22        (WebCore::HistoryItem::setFormInfoFromRequest): ditto.
     23        * history/HistoryItem.h: Update signature of notifyHistoryItemChanged.
     24
    1252009-12-03  Ben Murdoch  <benm@google.com>
    226
  • trunk/WebCore/history/HistoryItem.cpp

    r47907 r51630  
    3737namespace WebCore {
    3838
    39 static void defaultNotifyHistoryItemChanged()
    40 {
    41 }
    42 
    43 void (*notifyHistoryItemChanged)() = defaultNotifyHistoryItemChanged;
     39static void defaultNotifyHistoryItemChanged(HistoryItem*)
     40{
     41}
     42
     43void (*notifyHistoryItemChanged)(HistoryItem*) = defaultNotifyHistoryItemChanged;
    4444
    4545HistoryItem::HistoryItem()
     
    199199{
    200200    m_displayTitle = alternateTitle;
    201     notifyHistoryItemChanged();
     201    notifyHistoryItemChanged(this);
    202202}
    203203
     
    210210    }
    211211   
    212     notifyHistoryItemChanged();
     212    notifyHistoryItemChanged(this);
    213213}
    214214
     
    223223{
    224224    m_originalURLString = urlString;
    225     notifyHistoryItemChanged();
     225    notifyHistoryItemChanged(this);
    226226}
    227227
     
    229229{
    230230    m_referrer = referrer;
    231     notifyHistoryItemChanged();
     231    notifyHistoryItemChanged(this);
    232232}
    233233
     
    235235{
    236236    m_title = title;
    237     notifyHistoryItemChanged();
     237    notifyHistoryItemChanged(this);
    238238}
    239239
     
    241241{
    242242    m_target = target;
    243     notifyHistoryItemChanged();
     243    notifyHistoryItemChanged(this);
    244244}
    245245
     
    357357{
    358358    m_documentState = state;
     359#if PLATFORM(ANDROID)
     360    notifyHistoryItemChanged(this);
     361#endif
    359362}
    360363
     
    367370{
    368371    m_documentState.clear();
     372#if PLATFORM(ANDROID)
     373    notifyHistoryItemChanged(this);
     374#endif
    369375}
    370376
     
    377383{
    378384    m_isTargetItem = flag;
     385#if PLATFORM(ANDROID)
     386    notifyHistoryItemChanged(this);
     387#endif
    379388}
    380389
     
    383392    ASSERT(!childItemWithTarget(child->target()));
    384393    m_children.append(child);
     394#if PLATFORM(ANDROID)
     395    notifyHistoryItemChanged(this);
     396#endif
    385397}
    386398
     
    461473        m_formContentType = String();
    462474    }
     475#if PLATFORM(ANDROID)
     476    notifyHistoryItemChanged(this);
     477#endif
    463478}
    464479
  • trunk/WebCore/history/HistoryItem.h

    r51628 r51630  
    5959typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
    6060
    61 extern void (*notifyHistoryItemChanged)();
     61extern void (*notifyHistoryItemChanged)(HistoryItem*);
    6262
    6363enum VisitCountBehavior {
  • trunk/WebKit/mac/ChangeLog

    r51629 r51630  
     12009-12-03  Ben Murdoch  <benm@google.com>
     2
     3        Reviewed by Brady Eidson.
     4
     5        [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
     6        https://bugs.webkit.org/show_bug.cgi?id=31915
     7
     8        * History/WebHistoryItem.mm:
     9        (WKNotifyHistoryItemChanged): Update WKNotifyHistoryItemChanged() to add the new HistoryItem parameter added in the WebCore portion of this patch.
     10        * History/WebHistoryItemInternal.h: ditto.
     11
    1122009-12-03  Ben Murdoch  <benm@google.com>
    213
  • trunk/WebKit/mac/History/WebHistoryItem.mm

    r45675 r51630  
    8585}
    8686
    87 void WKNotifyHistoryItemChanged()
     87void WKNotifyHistoryItemChanged(HistoryItem*)
    8888{
    8989    [[NSNotificationCenter defaultCenter]
  • trunk/WebKit/mac/History/WebHistoryItemInternal.h

    r45675 r51630  
    3838WebHistoryItem *kit(WebCore::HistoryItem* item);
    3939
    40 extern void WKNotifyHistoryItemChanged();
     40extern void WKNotifyHistoryItemChanged(WebCore::HistoryItem*);
    4141
    4242@interface WebHistoryItem (WebInternal)
Note: See TracChangeset for help on using the changeset viewer.