Changeset 51629 in webkit
- Timestamp:
- Dec 3, 2009 4:18:23 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51628 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 This change adds three new methods on the FrameLoaderClient interface to receive notifications when the BackForwardList changes. 9 10 No new tests required. Functionality on all platforms upstream remains the same. Android is the first platform to make use of these callbacks. 11 12 * history/BackForwardList.cpp: 13 (WebCore::BackForwardList::addItem): Execute the callback. 14 (WebCore::BackForwardList::goBack): ditto. 15 (WebCore::BackForwardList::goForward): ditto. 16 (WebCore::BackForwardList::goToItem): ditto. 17 (WebCore::BackForwardList::setCapacity): dito. 18 * loader/EmptyClients.h: 19 (WebCore::EmptyFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation for the callback that does nothing. 20 (WebCore::EmptyFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto. 21 (WebCore::EmptyFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto. 22 * loader/FrameLoaderClient.h: 23 1 24 2009-12-03 Ben Murdoch <benm@google.com> 2 25 -
trunk/WebCore/history/BackForwardList.cpp
r46539 r51629 28 28 #include "BackForwardList.h" 29 29 30 #include "Frame.h" 31 #include "FrameLoader.h" 32 #include "FrameLoaderClient.h" 30 33 #include "HistoryItem.h" 31 34 #include "Logging.h" 35 #include "Page.h" 32 36 #include "PageCache.h" 33 37 … … 78 82 pageCache()->remove(item.get()); 79 83 m_current--; 84 m_page->mainFrame()->loader()->client()->dispatchDidRemoveBackForwardItem(item.get()); 80 85 } 81 86 … … 83 88 m_entryHash.add(m_entries.last()); 84 89 m_current++; 90 m_page->mainFrame()->loader()->client()->dispatchDidAddBackForwardItem(currentItem()); 85 91 } 86 92 … … 88 94 { 89 95 ASSERT(m_current > 0); 90 if (m_current > 0) 96 if (m_current > 0) { 91 97 m_current--; 98 m_page->mainFrame()->loader()->client()->dispatchDidChangeBackForwardIndex(); 99 } 92 100 } 93 101 … … 95 103 { 96 104 ASSERT(m_current < m_entries.size() - 1); 97 if (m_current < m_entries.size() - 1) 105 if (m_current < m_entries.size() - 1) { 98 106 m_current++; 107 m_page->mainFrame()->loader()->client()->dispatchDidChangeBackForwardIndex(); 108 } 99 109 } 100 110 … … 108 118 if (m_entries[index] == item) 109 119 break; 110 if (index < m_entries.size()) 120 if (index < m_entries.size()) { 111 121 m_current = index; 122 m_page->mainFrame()->loader()->client()->dispatchDidChangeBackForwardIndex(); 123 } 112 124 } 113 125 … … 175 187 if (!size) 176 188 m_current = NoCurrentItemIndex; 177 else if (m_current > m_entries.size() - 1) 189 else if (m_current > m_entries.size() - 1) { 178 190 m_current = m_entries.size() - 1; 179 191 m_page->mainFrame()->loader()->client()->dispatchDidChangeBackForwardIndex(); 192 } 180 193 m_capacity = size; 181 194 } -
trunk/WebCore/loader/EmptyClients.h
r50973 r51629 282 282 virtual void updateGlobalHistoryRedirectLinks() { } 283 283 virtual bool shouldGoToHistoryItem(HistoryItem*) const { return false; } 284 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const { } 285 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const { }; 286 virtual void dispatchDidChangeBackForwardIndex() const { } 284 287 virtual void saveViewStateToItem(HistoryItem*) { } 285 288 virtual bool canCachePage() const { return false; } -
trunk/WebCore/loader/FrameLoaderClient.h
r50993 r51629 167 167 168 168 virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0; 169 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const = 0; 170 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const = 0; 171 virtual void dispatchDidChangeBackForwardIndex() const = 0; 169 172 170 173 // This frame has displayed inactive content (such as an image) from an -
trunk/WebKit/chromium/ChangeLog
r51623 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * src/FrameLoaderClientImpl.cpp: 9 (WebKit::FrameLoaderClientImpl::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebKit::FrameLoaderClientImpl::dispatchDidRemoveBackForwardItem): ditto. 11 (WebKit::FrameLoaderClientImpl::dispatchDidChangeBackForwardIndex): dito. 12 * src/FrameLoaderClientImpl.h: 13 1 14 2009-12-02 Yusuke Sato <yusukes@chromium.org> 2 15 -
trunk/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r51548 r51629 1057 1057 } 1058 1058 1059 void FrameLoaderClientImpl::dispatchDidAddBackForwardItem(HistoryItem*) const 1060 { 1061 } 1062 1063 void FrameLoaderClientImpl::dispatchDidRemoveBackForwardItem(HistoryItem*) const 1064 { 1065 } 1066 1067 void FrameLoaderClientImpl::dispatchDidChangeBackForwardIndex() const 1068 { 1069 } 1070 1059 1071 void FrameLoaderClientImpl::didDisplayInsecureContent() 1060 1072 { -
trunk/WebKit/chromium/src/FrameLoaderClientImpl.h
r50993 r51629 132 132 virtual void updateGlobalHistoryRedirectLinks(); 133 133 virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; 134 virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; 135 virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; 136 virtual void dispatchDidChangeBackForwardIndex() const; 134 137 virtual void didDisplayInsecureContent(); 135 138 virtual void didRunInsecureContent(WebCore::SecurityOrigin*); -
trunk/WebKit/gtk/ChangeLog
r51567 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebCoreSupport/FrameLoaderClientGtk.cpp: 9 (WebKit::FrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebKit::FrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto. 11 (WebKit::FrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto. 12 * WebCoreSupport/FrameLoaderClientGtk.h: 13 1 14 2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com> 2 15 -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r51104 r51629 585 585 } 586 586 587 void FrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const 588 { 589 } 590 591 void FrameLoaderClient::dispatchDidRemoveBackForwardItem(HistoryItem*) const 592 { 593 } 594 595 void FrameLoaderClient::dispatchDidChangeBackForwardIndex() const 596 { 597 } 598 587 599 void FrameLoaderClient::didDisplayInsecureContent() 588 600 { -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
r50973 r51629 136 136 virtual void updateGlobalHistoryRedirectLinks(); 137 137 virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; 138 virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; 139 virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; 140 virtual void dispatchDidChangeBackForwardIndex() const; 138 141 139 142 virtual void didDisplayInsecureContent(); -
trunk/WebKit/haiku/ChangeLog
r50973 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebCoreSupport/FrameLoaderClientHaiku.cpp: 9 (WebCore::FrameLoaderClientHaiku::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebCore::FrameLoaderClientHaiku::dispatchDidRemoveBackForwardItem): ditto. 11 (WebCore::FrameLoaderClientHaiku::dispatchDidChangeBackForwardIndex): ditto. 12 * WebCoreSupport/FrameLoaderClientHaiku.h: 13 1 14 2009-11-13 Adam Roben <aroben@apple.com> 2 15 -
trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
r50973 r51629 463 463 } 464 464 465 void FrameLoaderClientHaiku::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const 466 { 467 } 468 469 void FrameLoaderClientHaiku::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const 470 { 471 } 472 473 void FrameLoaderClientHaiku::dispatchDidChangeBackForwardIndex() const 474 { 475 } 476 465 477 void FrameLoaderClientHaiku::saveScrollPositionAndViewStateToItem(WebCore::HistoryItem*) 466 478 { -
trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
r50973 r51629 151 151 virtual void updateGlobalHistoryRedirectLinks(); 152 152 virtual bool shouldGoToHistoryItem(HistoryItem*) const; 153 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; 154 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; 155 virtual void dispatchDidChangeBackForwardIndex() const; 153 156 virtual void saveScrollPositionAndViewStateToItem(HistoryItem*); 154 157 virtual bool canCachePage() const; -
trunk/WebKit/mac/ChangeLog
r51620 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebCoreSupport/WebFrameLoaderClient.h: 9 * WebCoreSupport/WebFrameLoaderClient.mm: 10 (WebFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 11 (WebFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto. 12 (WebFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto. 13 1 14 2009-12-02 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
r50973 r51629 144 144 145 145 virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; 146 virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; 147 virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; 148 virtual void dispatchDidChangeBackForwardIndex() const; 146 149 147 150 virtual void didDisplayInsecureContent(); -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r51617 r51629 878 878 } 879 879 880 void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const 881 { 882 } 883 884 void WebFrameLoaderClient::dispatchDidRemoveBackForwardItem(HistoryItem*) const 885 { 886 } 887 888 void WebFrameLoaderClient::dispatchDidChangeBackForwardIndex() const 889 { 890 } 891 880 892 void WebFrameLoaderClient::didDisplayInsecureContent() 881 893 { -
trunk/WebKit/qt/ChangeLog
r51568 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebCoreSupport/FrameLoaderClientQt.cpp: 9 (WebCore::FrameLoaderClientQt::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebCore::FrameLoaderClientQt::dispatchDidRemoveBackForwardItem): ditto. 11 (WebCore::FrameLoaderClientQt::dispatchDidChangeBackForwardIndex): ditto. 12 * WebCoreSupport/FrameLoaderClientQt.h: 13 1 14 2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com> 2 15 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r51409 r51629 641 641 { 642 642 return true; 643 } 644 645 void FrameLoaderClientQt::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const 646 { 647 } 648 649 void FrameLoaderClientQt::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const 650 { 651 } 652 653 void FrameLoaderClientQt::dispatchDidChangeBackForwardIndex() const 654 { 643 655 } 644 656 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
r50973 r51629 149 149 virtual void updateGlobalHistoryRedirectLinks(); 150 150 virtual bool shouldGoToHistoryItem(HistoryItem*) const; 151 151 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; 152 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; 153 virtual void dispatchDidChangeBackForwardIndex() const; 152 154 virtual void didDisplayInsecureContent(); 153 155 virtual void didRunInsecureContent(SecurityOrigin*); -
trunk/WebKit/win/ChangeLog
r51607 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebCoreSupport/WebFrameLoaderClient.cpp: 9 (WebFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto. 11 (WebFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto. 12 * WebCoreSupport/WebFrameLoaderClient.h: 13 1 14 2009-12-02 Timothy Hatcher <timothy@apple.com> 2 15 -
trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
r51510 r51629 565 565 } 566 566 567 void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const 568 { 569 } 570 571 void WebFrameLoaderClient::dispatchDidRemoveBackForwardItem(HistoryItem*) const 572 { 573 } 574 575 void WebFrameLoaderClient::dispatchDidChangeBackForwardIndex() const 576 { 577 } 578 567 579 void WebFrameLoaderClient::didDisplayInsecureContent() 568 580 { -
trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
r49320 r51629 92 92 virtual void updateGlobalHistoryRedirectLinks(); 93 93 virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; 94 virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; 95 virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; 96 virtual void dispatchDidChangeBackForwardIndex() const; 94 97 95 98 virtual void didDisplayInsecureContent(); -
trunk/WebKit/wx/ChangeLog
r51336 r51629 1 2009-12-03 Ben Murdoch <benm@google.com> 2 3 Reviewed by Brady Eidson. 4 5 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 6 https://bugs.webkit.org/show_bug.cgi?id=31914 7 8 * WebKitSupport/FrameLoaderClientWx.cpp: 9 (WebCore::FrameLoaderClientWx::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 10 (WebCore::FrameLoaderClientWx::dispatchDidRemoveBackForwardItem): ditto. 11 (WebCore::FrameLoaderClientWx::dispatchDidChangeBackForwardIndex): ditto. 12 * WebKitSupport/FrameLoaderClientWx.h: 13 1 14 2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 15 -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
r51143 r51629 548 548 } 549 549 550 void FrameLoaderClientWx::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const 551 { 552 } 553 554 void FrameLoaderClientWx::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const 555 { 556 } 557 558 void FrameLoaderClientWx::dispatchDidChangeBackForwardIndex() const 559 { 560 } 561 550 562 void FrameLoaderClientWx::didDisplayInsecureContent() 551 563 { -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
r51143 r51629 150 150 virtual void updateGlobalHistoryRedirectLinks(); 151 151 virtual bool shouldGoToHistoryItem(HistoryItem*) const; 152 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; 153 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; 154 virtual void dispatchDidChangeBackForwardIndex() const; 152 155 virtual void saveScrollPositionAndViewStateToItem(HistoryItem*); 153 156 virtual bool canCachePage() const;
Note: See TracChangeset
for help on using the changeset viewer.