- Revision
- 140882
- Author
- [email protected]
- Date
- 2013-01-25 16:54:33 -0800 (Fri, 25 Jan 2013)
Log 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 <[email protected]> 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 <[email protected]> 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (140881 => 140882)
--- trunk/LayoutTests/ChangeLog 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/LayoutTests/ChangeLog 2013-01-26 00:54:33 UTC (rev 140882)
@@ -1,3 +1,13 @@
+2013-01-25 Pan Deng <[email protected]>
+
+ [User Timing] Class name of user timing entries should be PerformanceMark/PerformanceMeasure.
+ https://bugs.webkit.org/show_bug.cgi?id=107925.
+
+ 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.
+
2013-01-24 Ojan Vafai <[email protected]>
MathML preferred widths should not depend on layout information
Added: trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type-expected.txt (0 => 140882)
--- trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type-expected.txt 2013-01-26 00:54:33 UTC (rev 140882)
@@ -0,0 +1,8 @@
+Description
+
+This test validates the user timing entry type, PerformanceMark and PerformanceMeasure.
+
+
+PASS Class name of mark entry should be PerformanceMark.
+PASS Class name of measure entry should be PerformanceMeasure.
+
Added: trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html (0 => 140882)
--- trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html (rev 0)
+++ trunk/LayoutTests/http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html 2013-01-26 00:54:33 UTC (rev 140882)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>user timing entry type</title>
+ <link rel="author" title="Intel" href="" />
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <h1>Description</h1>
+ <p>This test validates the user timing entry type, PerformanceMark and PerformanceMeasure.</p>
+
+ <div id="log"></div>
+ <script>
+ var context = new PerformanceContext(window.performance);
+ context.mark('mark');
+ context.measure('measure');
+ var mark_entry = context.getEntriesByName('mark')[0];
+ var measure_entry = context.getEntriesByName('measure')[0];
+
+ test_equals(Object.prototype.toString.call(mark_entry), '[object PerformanceMark]', 'Class name of mark entry should be PerformanceMark.');
+ test_equals(Object.prototype.toString.call(measure_entry), '[object PerformanceMeasure]', 'Class name of measure entry should be PerformanceMeasure.');
+ </script>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (140881 => 140882)
--- trunk/Source/WebCore/ChangeLog 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/Source/WebCore/ChangeLog 2013-01-26 00:54:33 UTC (rev 140882)
@@ -1,3 +1,27 @@
+2013-01-25 Pan Deng <[email protected]>
+
+ [User Timing]Change class name that presented in _javascript_ for user timing entry.
+ https://bugs.webkit.org/show_bug.cgi?id=107925.
+
+ 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):
+
2013-01-24 Roger Fong <[email protected]>
Updated WebCore property sheets and added a WebCore solution file.
Modified: trunk/Source/WebCore/bindings/v8/custom/V8PerformanceEntryCustom.cpp (140881 => 140882)
--- trunk/Source/WebCore/bindings/v8/custom/V8PerformanceEntryCustom.cpp 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/Source/WebCore/bindings/v8/custom/V8PerformanceEntryCustom.cpp 2013-01-26 00:54:33 UTC (rev 140882)
@@ -34,9 +34,13 @@
#if ENABLE(PERFORMANCE_TIMELINE)
#include "Performance.h"
+#include "PerformanceMark.h"
+#include "PerformanceMeasure.h"
#include "PerformanceResourceTiming.h"
#include "V8PerformanceEntry.h"
+#include "V8PerformanceMark.h"
+#include "V8PerformanceMeasure.h"
#include "V8PerformanceResourceTiming.h"
#include <wtf/RefPtr.h>
@@ -50,6 +54,15 @@
if (impl->isResource())
return wrap(static_cast<PerformanceResourceTiming*>(impl), creationContext, isolate);
#endif
+
+#if ENABLE(USER_TIMING)
+ if (impl->isMark())
+ return wrap(static_cast<PerformanceMark*>(impl), creationContext, isolate);
+
+ if (impl->isMeasure())
+ return wrap(static_cast<PerformanceMeasure*>(impl), creationContext, isolate);
+#endif
+
return V8PerformanceEntry::createWrapper(impl, creationContext, isolate);
}
Modified: trunk/Source/WebCore/page/PerformanceEntry.h (140881 => 140882)
--- trunk/Source/WebCore/page/PerformanceEntry.h 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/Source/WebCore/page/PerformanceEntry.h 2013-01-26 00:54:33 UTC (rev 140882)
@@ -51,6 +51,8 @@
double duration() const;
virtual bool isResource() { return false; }
+ virtual bool isMark() { return false; }
+ virtual bool isMeasure() { return false; }
static bool startTimeCompareLessThan(PassRefPtr<PerformanceEntry> a, PassRefPtr<PerformanceEntry> b)
{
Modified: trunk/Source/WebCore/page/PerformanceMark.h (140881 => 140882)
--- trunk/Source/WebCore/page/PerformanceMark.h 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/Source/WebCore/page/PerformanceMark.h 2013-01-26 00:54:33 UTC (rev 140882)
@@ -38,6 +38,8 @@
public:
static PassRefPtr<PerformanceMark> create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); }
+ virtual bool isMark() { return true; }
+
private:
PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { }
~PerformanceMark() { }
Modified: trunk/Source/WebCore/page/PerformanceMeasure.h (140881 => 140882)
--- trunk/Source/WebCore/page/PerformanceMeasure.h 2013-01-26 00:47:02 UTC (rev 140881)
+++ trunk/Source/WebCore/page/PerformanceMeasure.h 2013-01-26 00:54:33 UTC (rev 140882)
@@ -38,6 +38,8 @@
public:
static PassRefPtr<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(new PerformanceMeasure(name, startTime, duration)); }
+ virtual bool isMeasure() { return true; }
+
private:
PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
~PerformanceMeasure() { }