Changeset 64939 in webkit


Ignore:
Timestamp:
Aug 7, 2010 11:19:48 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-08-07 Mihai Parparita <mihaip@chromium.org>

Reviewed by Adam Barth.

WebTiming does not take page cache into account
https://bugs.webkit.org/show_bug.cgi?id=42772

Adds tests that simulates flow from a page that's in the page cache to
one that's not, and then back to the page cached page (where the
DocumentLoader is reused, but we should have a new DocumentLoadTiming
struct).

  • fast/events/onunload-back-to-page-cache-expected.txt: Added.
  • fast/events/onunload-back-to-page-cache.html: Added.

2010-08-07 Mihai Parparita <mihaip@chromium.org>

Reviewed by Adam Barth.

WebTiming does not take page cache into account
https://bugs.webkit.org/show_bug.cgi?id=42772

When restoring a page from the page cache, reset its DocumentLoadTiming
struct and record navigationStart.

Test: fast/events/onunload-back-to-page-cache.html

  • loader/DocumentLoadTiming.h: removed Noncopyable, since it's just a simple struct.
  • loader/DocumentLoader.h: (WebCore::DocumentLoader::resetTiming): Added method.
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Uncommented assert. (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): Added resetTiming() call.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64929 r64939  
     12010-08-07  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        WebTiming does not take page cache into account
     6        https://bugs.webkit.org/show_bug.cgi?id=42772
     7       
     8        Adds tests that simulates flow from a page that's in the page cache to
     9        one that's not, and then back to the page cached page (where the
     10        DocumentLoader is reused, but we should have a new DocumentLoadTiming
     11        struct).
     12
     13        * fast/events/onunload-back-to-page-cache-expected.txt: Added.
     14        * fast/events/onunload-back-to-page-cache.html: Added.
     15
    1162010-08-07  Sam Weinig  <sam@webkit.org>
    217
  • trunk/WebCore/ChangeLog

    r64936 r64939  
     12010-08-07  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        WebTiming does not take page cache into account
     6        https://bugs.webkit.org/show_bug.cgi?id=42772
     7
     8        When restoring a page from the page cache, reset its DocumentLoadTiming
     9        struct and record navigationStart.
     10   
     11        Test: fast/events/onunload-back-to-page-cache.html
     12
     13        * loader/DocumentLoadTiming.h: removed Noncopyable, since it's just a simple struct.
     14        * loader/DocumentLoader.h:
     15        (WebCore::DocumentLoader::resetTiming): Added method.
     16        * loader/FrameLoader.cpp:
     17        (WebCore::FrameLoader::stopLoading): Uncommented assert.
     18        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): Added resetTiming() call.
     19
    1202010-08-07  Zoltan Horvath  <zoltan@webkit.org>
    221
  • trunk/WebCore/loader/DocumentLoadTiming.h

    r64051 r64939  
    2727#define DocumentLoadTiming_h
    2828
    29 #include <wtf/Noncopyable.h>
    30 
    3129namespace WebCore {
    3230
    33 struct DocumentLoadTiming : public Noncopyable {
     31struct DocumentLoadTiming {
    3432    DocumentLoadTiming()
    3533        : navigationStart(0.0)
  • trunk/WebCore/loader/DocumentLoader.h

    r64051 r64939  
    208208
    209209        DocumentLoadTiming* timing() { return &m_documentLoadTiming; }
     210        void resetTiming() { m_documentLoadTiming = DocumentLoadTiming(); }
    210211
    211212#if ENABLE(OFFLINE_WEB_APPLICATIONS)
  • trunk/WebCore/loader/FrameLoader.cpp

    r64735 r64939  
    454454                            DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing();
    455455                            ASSERT(timing->navigationStart);
    456                             // FIXME: This fails in Safari (https://bugs.webkit.org/show_bug.cgi?id=42772). Understand why.
    457                             // ASSERT(!timing->unloadEventEnd);
     456                            ASSERT(!timing->unloadEventEnd);
    458457                            timing->unloadEventEnd = currentTime();
    459458                            ASSERT(timing->unloadEventEnd >= timing->navigationStart);
     
    31453144
    31463145    m_loadingFromCachedPage = true;
     3146   
     3147    // Should have timing data from previous time(s) the page was shown.
     3148    ASSERT(provisionalLoader->timing()->navigationStart);
     3149    provisionalLoader->resetTiming();
     3150    provisionalLoader->timing()->navigationStart = currentTime();   
    31473151
    31483152    provisionalLoader->setCommitted(true);
Note: See TracChangeset for help on using the changeset viewer.