Changeset 140882 in webkit


Ignore:
Timestamp:
Jan 25, 2013 4:54:33 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: [User Timing]Change class name that presented in Javascript for user timing entry.
https://bugs.webkit.org/show_bug.cgi?id=107925.

Patch by Pan Deng <pan.deng@intel.com> on 2013-01-25
Reviewed by Tony Gentilcore.

In current implementation, class type of user timing entries are PerformanceEntry, according
to W3C spec, they should be PerformanceMark and PerformanceMeasure.

Test: http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html

  • bindings/v8/custom/V8PerformanceEntryCustom.cpp:

(WebCore::wrap):

  • page/PerformanceEntry.h:

(WebCore::PerformanceEntry::isMark):
(WebCore::PerformanceEntry::isMeasure):

  • page/PerformanceMark.h:

(WebCore::PerformanceMark::isMark):
(PerformanceMark):

  • page/PerformanceMeasure.h:

(WebCore::PerformanceMeasure::isMeasure):
(PerformanceMeasure):

LayoutTests: [User Timing] Class name of user timing entries should be PerformanceMark/PerformanceMeasure.
https://bugs.webkit.org/show_bug.cgi?id=107925.

Patch by Pan Deng <pan.deng@intel.com> on 2013-01-25
Reviewed by Tony Gentilcore.

  • http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type-expected.txt: Added.
  • http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html: Added.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140880 r140882  
     12013-01-25  Pan Deng  <pan.deng@intel.com>
     2
     3        [User Timing] Class name of user timing entries should be PerformanceMark/PerformanceMeasure.
     4        https://bugs.webkit.org/show_bug.cgi?id=107925.
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        * http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type-expected.txt: Added.
     9        * http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html: Added.
     10
    1112013-01-24  Ojan Vafai  <ojan@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r140881 r140882  
     12013-01-25  Pan Deng  <pan.deng@intel.com>
     2
     3        [User Timing]Change class name that presented in Javascript for user timing entry.
     4        https://bugs.webkit.org/show_bug.cgi?id=107925.
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        In current implementation, class type of user timing entries are PerformanceEntry, according
     9        to W3C spec, they should be PerformanceMark and PerformanceMeasure.
     10
     11        Test: http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html
     12
     13        * bindings/v8/custom/V8PerformanceEntryCustom.cpp:
     14        (WebCore::wrap):
     15        * page/PerformanceEntry.h:
     16        (WebCore::PerformanceEntry::isMark):
     17        (WebCore::PerformanceEntry::isMeasure):
     18        * page/PerformanceMark.h:
     19        (WebCore::PerformanceMark::isMark):
     20        (PerformanceMark):
     21        * page/PerformanceMeasure.h:
     22        (WebCore::PerformanceMeasure::isMeasure):
     23        (PerformanceMeasure):
     24
    1252013-01-24  Roger Fong  <roger_fong@apple.com>
    226
  • trunk/Source/WebCore/bindings/v8/custom/V8PerformanceEntryCustom.cpp

    r134696 r140882  
    3535
    3636#include "Performance.h"
     37#include "PerformanceMark.h"
     38#include "PerformanceMeasure.h"
    3739#include "PerformanceResourceTiming.h"
    3840
    3941#include "V8PerformanceEntry.h"
     42#include "V8PerformanceMark.h"
     43#include "V8PerformanceMeasure.h"
    4044#include "V8PerformanceResourceTiming.h"
    4145
     
    5155        return wrap(static_cast<PerformanceResourceTiming*>(impl), creationContext, isolate);
    5256#endif
     57
     58#if ENABLE(USER_TIMING)
     59    if (impl->isMark())
     60        return wrap(static_cast<PerformanceMark*>(impl), creationContext, isolate);
     61
     62    if (impl->isMeasure())
     63        return wrap(static_cast<PerformanceMeasure*>(impl), creationContext, isolate);
     64#endif
     65
    5366    return V8PerformanceEntry::createWrapper(impl, creationContext, isolate);
    5467}
  • trunk/Source/WebCore/page/PerformanceEntry.h

    r135458 r140882  
    5252
    5353    virtual bool isResource() { return false; }
     54    virtual bool isMark() { return false; }
     55    virtual bool isMeasure() { return false; }
    5456
    5557    static bool startTimeCompareLessThan(PassRefPtr<PerformanceEntry> a, PassRefPtr<PerformanceEntry> b)
  • trunk/Source/WebCore/page/PerformanceMark.h

    r136561 r140882  
    3939    static PassRefPtr<PerformanceMark> create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); }
    4040
     41    virtual bool isMark() { return true; }
     42   
    4143private:
    4244    PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { }
  • trunk/Source/WebCore/page/PerformanceMeasure.h

    r131693 r140882  
    3939    static PassRefPtr<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(new PerformanceMeasure(name, startTime, duration)); }
    4040
     41    virtual bool isMeasure() { return true; }
     42
    4143private:
    4244    PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
Note: See TracChangeset for help on using the changeset viewer.