Changeset 74157 in webkit


Ignore:
Timestamp:
Dec 15, 2010 3:55:22 PM (13 years ago)
Author:
weinig@apple.com
Message:

Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
<rdar://problem/8774683>
https://bugs.webkit.org/show_bug.cgi?id=51143

Reviewed by Brady Eidson.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
are not a custom representation (eg. a PDF).
(WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Enable the page cache.

Location:
trunk/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r74152 r74157  
     12010-12-15  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Brady Eidson.
     4
     5        Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
     6        <rdar://problem/8774683>
     7        https://bugs.webkit.org/show_bug.cgi?id=51143
     8
     9        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     10        (WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
     11        are not a custom representation (eg. a PDF).
     12        (WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.
     13        * WebProcess/WebPage/WebPage.cpp:
     14        (WebKit::WebPage::updatePreferences): Enable the page cache.
     15
    1162010-12-15  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r73666 r74157  
    10671067bool WebFrameLoaderClient::canCachePage() const
    10681068{
    1069     notImplemented();
    1070     return false;
     1069    // We cannot cache frames that have custom representations because they are
     1070    // rendered in the UIProcess.
     1071    return !m_frameHasCustomRepresentation;
    10711072}
    10721073
     
    12231224bool WebFrameLoaderClient::shouldCacheResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const unsigned char* data, unsigned long long length)
    12241225{
     1226    return true;
     1227}
     1228
     1229#endif
     1230
     1231bool WebFrameLoaderClient::shouldUsePluginDocument(const String& /*mimeType*/) const
     1232{
    12251233    notImplemented();
    12261234    return false;
    12271235}
    12281236
    1229 #endif
    1230 
    1231 bool WebFrameLoaderClient::shouldUsePluginDocument(const String& /*mimeType*/) const
    1232 {
    1233     notImplemented();
    1234     return false;
    1235 }
    1236 
    12371237PassRefPtr<FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
    12381238{
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r74152 r74157  
    982982    AbstractDatabase::setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
    983983#endif
    984    
     984
     985    settings->setUsesPageCache(true);
     986
    985987    platformPreferencesDidChange(store);
    986988}
Note: See TracChangeset for help on using the changeset viewer.