Changeset 18049 in webkit


Ignore:
Timestamp:
Dec 6, 2006 4:41:17 PM (17 years ago)
Author:
beidson
Message:

Reviewed by John Sullivan

Fixes http://bugs.webkit.org/show_bug.cgi?id=11675 and <rdar://4857669>
Now we need to explicitly set the data source when loading from a page cache

  • History/WebHistoryItem.mm: (-[WebHistoryItem _scheduleRelease]): Enhanced a logging message (+[WebHistoryItem _releasePageCache:]): Ditto (+[WebHistoryItem _releaseAllPendingPageCaches]): Ditto
  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setDocumentViewFromPageCache): Reset the View's DataSource from the cache, effectively reopening it
  • WebView/WebHTMLView.m: (-[NSArray setDataSource:]): Properly Handle resetting the DataSource and "reopening" the view
Location:
trunk/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r18046 r18049  
     12006-12-06  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by John Sullivan
     4
     5        Fixes http://bugs.webkit.org/show_bug.cgi?id=11675 and <rdar://4857669>
     6        Now we need to explicitly set the data source when loading from a page cache
     7
     8        * History/WebHistoryItem.mm:
     9        (-[WebHistoryItem _scheduleRelease]): Enhanced a logging message
     10        (+[WebHistoryItem _releasePageCache:]): Ditto
     11        (+[WebHistoryItem _releaseAllPendingPageCaches]): Ditto
     12        * WebCoreSupport/WebFrameLoaderClient.mm:
     13        (WebFrameLoaderClient::setDocumentViewFromPageCache): Reset the View's DataSource from the cache, effectively reopening it
     14        * WebView/WebHTMLView.m:
     15        (-[NSArray setDataSource:]): Properly Handle resetting the DataSource and "reopening" the view
     16
    1172006-12-06  Brady Eidson  <beidson@apple.com>
    218
  • trunk/WebKit/History/WebHistoryItem.mm

    r17795 r18049  
    578578- (void)_scheduleRelease
    579579{
    580     LOG (PageCache, "Scheduling release of %@", [self URLString]);
     580    LOG (PageCache, "WebKitPageCache - Scheduling release of %@ (0x%x)", [self URLString], _private->pageCache);
    581581    [WebHistoryItem _scheduleReleaseTimer];
    582582
     
    625625
    626626    if ((userDelta < 0.5 || loadDelta < 1.25) && [_pendingPageCacheToRelease count] < 42){
    627         LOG (PageCache, "postponing again because not quiescent for more than a second (%f since last input, %f since last load).", userDelta, loadDelta);
     627        LOG (PageCache, "WebKitPageCache - postponing again because not quiescent for more than a second (%f since last input, %f since last load).", userDelta, loadDelta);
    628628        [self _scheduleReleaseTimer];
    629629        return;
    630630    }
    631631    else
    632         LOG (PageCache, "releasing, quiescent for more than a second (%f since last input, %f since last load).", userDelta, loadDelta);
     632        LOG (PageCache, "WebKitPageCache - releasing, quiescent for more than a second (%f since last input, %f since last load).", userDelta, loadDelta);
    633633
    634634    [WebHistoryItem _releaseAllPendingPageCaches];
     
    720720+ (void)_releaseAllPendingPageCaches
    721721{
    722     LOG (PageCache, "releasing %d items\n", [_pendingPageCacheToRelease count]);
     722    LOG (PageCache, "WebKitPageCache - releasing %d items\n", [_pendingPageCacheToRelease count]);
    723723    [WebHistoryItem _invalidateReleaseTimer];
    724724    [self _closeObjectsInPendingPageCaches];
  • trunk/WebKit/WebCoreSupport/WebFrameLoaderClient.mm

    r18012 r18049  
    214214void WebFrameLoaderClient::setDocumentViewFromPageCache(NSDictionary *pageCache)
    215215{
     216    WebDataSource *cachedDataSource = [pageCache objectForKey:WebPageCacheDataSourceKey];
     217    ASSERT(cachedDataSource != nil);
    216218    NSView <WebDocumentView> *cachedView = [pageCache objectForKey:WebPageCacheDocumentViewKey];
    217219    ASSERT(cachedView != nil);
     220    [cachedView setDataSource:cachedDataSource];
    218221    [m_webFrame->_private->webFrameView _setDocumentView:cachedView];
    219222}
  • trunk/WebKit/WebView/WebHTMLView.m

    r18046 r18049  
    31923192- (void)setDataSource:(WebDataSource *)dataSource
    31933193{
     3194    ASSERT(dataSource);
     3195    if (_private->dataSource == dataSource)
     3196        return;
    31943197    ASSERT(!_private->dataSource);
     3198    _private->closed = NO; // setting a data source reopens a closed view
    31953199    _private->dataSource = [dataSource retain];
    31963200    [_private->pluginController setDataSource:dataSource];
Note: See TracChangeset for help on using the changeset viewer.