Changeset 74315 in webkit


Ignore:
Timestamp:
Dec 18, 2010 1:23:56 AM (13 years ago)
Author:
tonyg@chromium.org
Message:

2010-12-18 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Laszlo Gombos.

[Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
https://bugs.webkit.org/show_bug.cgi?id=50943

  • fast/dom/Window/window-properties-performance-expected.txt:
  • fast/dom/script-tests/webtiming.js: (checkTimingBeforeLoad): (checkTimingWhileDeferred): (checkWebTimingOnDOMContentLoaded): (checkWebTimingWhileAsync): (checkWebTimingOnLoad): (checkWebTimingAfterLoad):
  • fast/dom/webtiming-document-open-expected.txt:
  • fast/dom/webtiming-expected.txt:
  • fast/dom/webtiming-navigate-within-document-expected.txt:

2010-12-18 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Laszlo Gombos.

[Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
https://bugs.webkit.org/show_bug.cgi?id=50943

See: http://test.w3.org/webperf/specs/NavigationTiming/#nt-dom-content-event-start

  • dom/Document.cpp: (WebCore::Document::finishedParsing):
  • dom/DocumentTiming.h: (WebCore::DocumentTiming::DocumentTiming):
  • page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::domContentLoadedEventStart): (WebCore::PerformanceTiming::domContentLoadedEventEnd):
  • page/PerformanceTiming.h:
  • page/PerformanceTiming.idl:

2010-12-18 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Laszlo Gombos.

[Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
https://bugs.webkit.org/show_bug.cgi?id=50943

Exposes all dom* times to the chromium port. I'm particularly interested in
domContentLoadedEventEnd as it compares to the FinishDoc metric.

  • public/WebPerformance.h:
  • src/WebPerformance.cpp: (WebKit::WebPerformance::domLoading): (WebKit::WebPerformance::domInteractive): (WebKit::WebPerformance::domContentLoadedEventStart): (WebKit::WebPerformance::domContentLoadedEventEnd): (WebKit::WebPerformance::domComplete):
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r74314 r74315  
     12010-12-18  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
     6        https://bugs.webkit.org/show_bug.cgi?id=50943
     7
     8        * fast/dom/Window/window-properties-performance-expected.txt:
     9        * fast/dom/script-tests/webtiming.js:
     10        (checkTimingBeforeLoad):
     11        (checkTimingWhileDeferred):
     12        (checkWebTimingOnDOMContentLoaded):
     13        (checkWebTimingWhileAsync):
     14        (checkWebTimingOnLoad):
     15        (checkWebTimingAfterLoad):
     16        * fast/dom/webtiming-document-open-expected.txt:
     17        * fast/dom/webtiming-expected.txt:
     18        * fast/dom/webtiming-navigate-within-document-expected.txt:
     19
    1202010-12-17  Tony Gentilcore  <tonyg@chromium.org>
    221
  • trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt

    r74242 r74315  
    1616window.webkitPerformance.timing.connectStart [number]
    1717window.webkitPerformance.timing.domComplete [number]
    18 window.webkitPerformance.timing.domContentLoadedEnd [number]
    19 window.webkitPerformance.timing.domContentLoadedStart [number]
     18window.webkitPerformance.timing.domContentLoadedEventEnd [number]
     19window.webkitPerformance.timing.domContentLoadedEventStart [number]
    2020window.webkitPerformance.timing.domInteractive [number]
    2121window.webkitPerformance.timing.domLoading [number]
  • trunk/LayoutTests/fast/dom/script-tests/webtiming.js

    r74242 r74315  
    4343    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    4444    shouldBe("timing.domInteractive", "0");
    45     shouldBe("timing.domContentLoadedStart", "0");
    46     shouldBe("timing.domContentLoadedEnd", "0");
     45    shouldBe("timing.domContentLoadedEventStart", "0");
     46    shouldBe("timing.domContentLoadedEventEnd", "0");
    4747    shouldBe("timing.domComplete", "0");
    4848
     
    7878    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    7979    shouldBeGreaterThanOrEqual("timing.domInteractive", "timing.domLoading");
    80     shouldBe("timing.domContentLoadedStart", "0");
    81     shouldBe("timing.domContentLoadedEnd", "0");
     80    shouldBe("timing.domContentLoadedEventStart", "0");
     81    shouldBe("timing.domContentLoadedEventEnd", "0");
    8282    shouldBe("timing.domComplete", "0");
    8383
     
    114114    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    115115    shouldBeGreaterThanOrEqual("timing.domInteractive", "timing.domLoading");
    116     shouldBeGreaterThanOrEqual("timing.domContentLoadedStart", "timing.domInteractive");
    117     shouldBe("timing.domContentLoadedEnd", "0");
     116    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventStart", "timing.domInteractive");
     117    shouldBe("timing.domContentLoadedEventEnd", "0");
    118118    shouldBe("timing.domComplete", "0");
    119119
     
    156156    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    157157    shouldBeGreaterThanOrEqual("timing.domInteractive", "timing.responseEnd");
    158     shouldBeGreaterThanOrEqual("timing.domContentLoadedStart", "timing.domInteractive");
    159     shouldBeGreaterThanOrEqual("timing.domContentLoadedEnd", "timing.domContentLoadedStart");
     158    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventStart", "timing.domInteractive");
     159    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventEnd", "timing.domContentLoadedEventStart");
    160160    shouldBe("timing.domComplete", "0");
    161161
     
    194194    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    195195    shouldBeGreaterThanOrEqual("timing.domInteractive", "timing.responseEnd");
    196     shouldBeGreaterThanOrEqual("timing.domContentLoadedStart", "timing.domInteractive");
    197     shouldBeGreaterThanOrEqual("timing.domContentLoadedEnd", "timing.domContentLoadedStart");
    198     shouldBeGreaterThanOrEqual("timing.domComplete", "timing.domContentLoadedEnd");
     196    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventStart", "timing.domInteractive");
     197    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventEnd", "timing.domContentLoadedEventStart");
     198    shouldBeGreaterThanOrEqual("timing.domComplete", "timing.domContentLoadedEventEnd");
    199199
    200200    shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.responseEnd");
     
    232232    shouldBeGreaterThanOrEqual("timing.domLoading", "timing.fetchStart");
    233233    shouldBeGreaterThanOrEqual("timing.domInteractive", "timing.responseEnd");
    234     shouldBeGreaterThanOrEqual("timing.domContentLoadedStart", "timing.domInteractive");
    235     shouldBeGreaterThanOrEqual("timing.domContentLoadedEnd", "timing.domContentLoadedStart");
    236     shouldBeGreaterThanOrEqual("timing.domComplete", "timing.domContentLoadedEnd");
     234    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventStart", "timing.domInteractive");
     235    shouldBeGreaterThanOrEqual("timing.domContentLoadedEventEnd", "timing.domContentLoadedEventStart");
     236    shouldBeGreaterThanOrEqual("timing.domComplete", "timing.domContentLoadedEventEnd");
    237237
    238238    shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.responseEnd");
  • trunk/LayoutTests/fast/dom/webtiming-document-open-expected.txt

    r74242 r74315  
    77PASS timing.connectStart is originalTiming.connectStart
    88PASS timing.domComplete is originalTiming.domComplete
    9 PASS timing.domContentLoadedEnd is originalTiming.domContentLoadedEnd
    10 PASS timing.domContentLoadedStart is originalTiming.domContentLoadedStart
     9PASS timing.domContentLoadedEventEnd is originalTiming.domContentLoadedEventEnd
     10PASS timing.domContentLoadedEventStart is originalTiming.domContentLoadedEventStart
    1111PASS timing.domInteractive is originalTiming.domInteractive
    1212PASS timing.domLoading is originalTiming.domLoading
  • trunk/LayoutTests/fast/dom/webtiming-expected.txt

    r74242 r74315  
    2020PASS timing.domLoading is >= timing.fetchStart
    2121PASS timing.domInteractive is 0
    22 PASS timing.domContentLoadedStart is 0
    23 PASS timing.domContentLoadedEnd is 0
     22PASS timing.domContentLoadedEventStart is 0
     23PASS timing.domContentLoadedEventEnd is 0
    2424PASS timing.domComplete is 0
    2525PASS timing.loadEventStart is 0
     
    4141PASS timing.domLoading is >= timing.fetchStart
    4242PASS timing.domInteractive is >= timing.domLoading
    43 PASS timing.domContentLoadedStart is 0
    44 PASS timing.domContentLoadedEnd is 0
     43PASS timing.domContentLoadedEventStart is 0
     44PASS timing.domContentLoadedEventEnd is 0
    4545PASS timing.domComplete is 0
    4646PASS timing.loadEventStart is 0
     
    6262PASS timing.domLoading is >= timing.fetchStart
    6363PASS timing.domInteractive is >= timing.domLoading
    64 PASS timing.domContentLoadedStart is >= timing.domInteractive
    65 PASS timing.domContentLoadedEnd is 0
     64PASS timing.domContentLoadedEventStart is >= timing.domInteractive
     65PASS timing.domContentLoadedEventEnd is 0
    6666PASS timing.domComplete is 0
    6767PASS timing.loadEventStart is 0
     
    8383PASS timing.domLoading is >= timing.fetchStart
    8484PASS timing.domInteractive is >= timing.responseEnd
    85 PASS timing.domContentLoadedStart is >= timing.domInteractive
    86 PASS timing.domContentLoadedEnd is >= timing.domContentLoadedStart
     85PASS timing.domContentLoadedEventStart is >= timing.domInteractive
     86PASS timing.domContentLoadedEventEnd is >= timing.domContentLoadedEventStart
    8787PASS timing.domComplete is 0
    8888PASS timing.loadEventStart is 0
     
    105105PASS timing.domLoading is >= timing.fetchStart
    106106PASS timing.domInteractive is >= timing.responseEnd
    107 PASS timing.domContentLoadedStart is >= timing.domInteractive
    108 PASS timing.domContentLoadedEnd is >= timing.domContentLoadedStart
    109 PASS timing.domComplete is >= timing.domContentLoadedEnd
     107PASS timing.domContentLoadedEventStart is >= timing.domInteractive
     108PASS timing.domContentLoadedEventEnd is >= timing.domContentLoadedEventStart
     109PASS timing.domComplete is >= timing.domContentLoadedEventEnd
    110110PASS timing.loadEventStart is >= timing.responseEnd
    111111PASS timing.loadEventEnd is 0
     
    127127PASS timing.domLoading is >= timing.fetchStart
    128128PASS timing.domInteractive is >= timing.responseEnd
    129 PASS timing.domContentLoadedStart is >= timing.domInteractive
    130 PASS timing.domContentLoadedEnd is >= timing.domContentLoadedStart
    131 PASS timing.domComplete is >= timing.domContentLoadedEnd
     129PASS timing.domContentLoadedEventStart is >= timing.domInteractive
     130PASS timing.domContentLoadedEventEnd is >= timing.domContentLoadedEventStart
     131PASS timing.domComplete is >= timing.domContentLoadedEventEnd
    132132PASS timing.loadEventStart is >= timing.responseEnd
    133133PASS timing.loadEventEnd is >= timing.loadEventStart + 50
  • trunk/LayoutTests/fast/dom/webtiming-navigate-within-document-expected.txt

    r74242 r74315  
    77PASS connectStart is unchanged.
    88PASS domComplete is unchanged.
    9 PASS domContentLoadedEnd is unchanged.
    10 PASS domContentLoadedStart is unchanged.
     9PASS domContentLoadedEventEnd is unchanged.
     10PASS domContentLoadedEventStart is unchanged.
    1111PASS domInteractive is unchanged.
    1212PASS domLoading is unchanged.
  • trunk/WebCore/ChangeLog

    r74312 r74315  
     12010-12-18  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
     6        https://bugs.webkit.org/show_bug.cgi?id=50943
     7
     8        See: http://test.w3.org/webperf/specs/NavigationTiming/#nt-dom-content-event-start
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::finishedParsing):
     12        * dom/DocumentTiming.h:
     13        (WebCore::DocumentTiming::DocumentTiming):
     14        * page/PerformanceTiming.cpp:
     15        (WebCore::PerformanceTiming::domContentLoadedEventStart):
     16        (WebCore::PerformanceTiming::domContentLoadedEventEnd):
     17        * page/PerformanceTiming.h:
     18        * page/PerformanceTiming.idl:
     19
    1202010-12-17  Justin Schuh  <jschuh@chromium.org>
    221
  • trunk/WebCore/dom/Document.cpp

    r74093 r74315  
    42094209    ASSERT(!scriptableDocumentParser() || m_readyState != Loading);
    42104210    setParsing(false);
    4211     if (!m_documentTiming.domContentLoadedStart)
    4212         m_documentTiming.domContentLoadedStart = currentTime();
     4211    if (!m_documentTiming.domContentLoadedEventStart)
     4212        m_documentTiming.domContentLoadedEventStart = currentTime();
    42134213    dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false));
    4214     if (!m_documentTiming.domContentLoadedEnd)
    4215         m_documentTiming.domContentLoadedEnd = currentTime();
     4214    if (!m_documentTiming.domContentLoadedEventEnd)
     4215        m_documentTiming.domContentLoadedEventEnd = currentTime();
    42164216
    42174217    if (Frame* f = frame()) {
  • trunk/WebCore/dom/DocumentTiming.h

    r71608 r74315  
    3333        : domLoading(0.0)
    3434        , domInteractive(0.0)
    35         , domContentLoadedStart(0.0)
    36         , domContentLoadedEnd(0.0)
     35        , domContentLoadedEventStart(0.0)
     36        , domContentLoadedEventEnd(0.0)
    3737        , domComplete(0.0)
    3838    {
     
    4141    double domLoading;
    4242    double domInteractive;
    43     double domContentLoadedStart;
    44     double domContentLoadedEnd;
     43    double domContentLoadedEventStart;
     44    double domContentLoadedEventEnd;
    4545    double domComplete;
    4646};
  • trunk/WebCore/page/PerformanceTiming.cpp

    r74242 r74315  
    282282}
    283283
    284 unsigned long long PerformanceTiming::domContentLoadedStart() const
    285 {
    286     const DocumentTiming* timing = documentTiming();
    287     if (!timing)
    288         return 0;
    289 
    290     return toIntegerMilliseconds(timing->domContentLoadedStart);
    291 }
    292 
    293 unsigned long long PerformanceTiming::domContentLoadedEnd() const
    294 {
    295     const DocumentTiming* timing = documentTiming();
    296     if (!timing)
    297         return 0;
    298 
    299     return toIntegerMilliseconds(timing->domContentLoadedEnd);
     284unsigned long long PerformanceTiming::domContentLoadedEventStart() const
     285{
     286    const DocumentTiming* timing = documentTiming();
     287    if (!timing)
     288        return 0;
     289
     290    return toIntegerMilliseconds(timing->domContentLoadedEventStart);
     291}
     292
     293unsigned long long PerformanceTiming::domContentLoadedEventEnd() const
     294{
     295    const DocumentTiming* timing = documentTiming();
     296    if (!timing)
     297        return 0;
     298
     299    return toIntegerMilliseconds(timing->domContentLoadedEventEnd);
    300300}
    301301
  • trunk/WebCore/page/PerformanceTiming.h

    r74242 r74315  
    6868    unsigned long long domLoading() const;
    6969    unsigned long long domInteractive() const;
    70     unsigned long long domContentLoadedStart() const;
    71     unsigned long long domContentLoadedEnd() const;
     70    unsigned long long domContentLoadedEventStart() const;
     71    unsigned long long domContentLoadedEventEnd() const;
    7272    unsigned long long domComplete() const;
    7373    unsigned long long loadEventStart() const;
  • trunk/WebCore/page/PerformanceTiming.idl

    r74242 r74315  
    4949        readonly attribute unsigned long long domLoading;
    5050        readonly attribute unsigned long long domInteractive;
    51         readonly attribute unsigned long long domContentLoadedStart;
    52         readonly attribute unsigned long long domContentLoadedEnd;
     51        readonly attribute unsigned long long domContentLoadedEventStart;
     52        readonly attribute unsigned long long domContentLoadedEventEnd;
    5353        readonly attribute unsigned long long domComplete;
    5454        readonly attribute unsigned long long loadEventStart;
  • trunk/WebKit/chromium/ChangeLog

    r74307 r74315  
     12010-12-18  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
     6        https://bugs.webkit.org/show_bug.cgi?id=50943
     7
     8        Exposes all dom* times to the chromium port. I'm particularly interested in
     9        domContentLoadedEventEnd as it compares to the FinishDoc metric.
     10
     11        * public/WebPerformance.h:
     12        * src/WebPerformance.cpp:
     13        (WebKit::WebPerformance::domLoading):
     14        (WebKit::WebPerformance::domInteractive):
     15        (WebKit::WebPerformance::domContentLoadedEventStart):
     16        (WebKit::WebPerformance::domContentLoadedEventEnd):
     17        (WebKit::WebPerformance::domComplete):
     18
    1192010-12-17  Tony Gentilcore  <tonyg@chromium.org>
    220
  • trunk/WebKit/chromium/public/WebPerformance.h

    r71612 r74315  
    7474    WEBKIT_API double responseStart() const;
    7575    WEBKIT_API double responseEnd() const;
     76    WEBKIT_API double domLoading() const;
     77    WEBKIT_API double domInteractive() const;
     78    WEBKIT_API double domContentLoadedEventStart() const;
     79    WEBKIT_API double domContentLoadedEventEnd() const;
     80    WEBKIT_API double domComplete() const;
    7681    WEBKIT_API double loadEventStart() const;
    7782    WEBKIT_API double loadEventEnd() const;
  • trunk/WebKit/chromium/src/WebPerformance.cpp

    r74241 r74315  
    134134}
    135135
     136double WebPerformance::domLoading() const
     137{
     138    return millisecondsToSeconds(m_private->timing()->domLoading());
     139}
     140
     141double WebPerformance::domInteractive() const
     142{
     143    return millisecondsToSeconds(m_private->timing()->domInteractive());
     144}
     145
     146double WebPerformance::domContentLoadedEventStart() const
     147{
     148    return millisecondsToSeconds(m_private->timing()->domContentLoadedEventStart());
     149}
     150
     151double WebPerformance::domContentLoadedEventEnd() const
     152{
     153    return millisecondsToSeconds(m_private->timing()->domContentLoadedEventEnd());
     154}
     155
     156double WebPerformance::domComplete() const
     157{
     158    return millisecondsToSeconds(m_private->timing()->domComplete());
     159}
     160
    136161double WebPerformance::loadEventStart() const
    137162{
Note: See TracChangeset for help on using the changeset viewer.