mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata implemented deprecated window.timing functionality created ResourceTimingListener trait fixed w3c links in navigation timing updated include.ini to run resource timing tests on ci
This commit is contained in:
parent
3fe83f1d06
commit
26007fddd3
103 changed files with 1881 additions and 322 deletions
|
@ -10,14 +10,10 @@ typedef double DOMHighResTimeStamp;
|
|||
typedef sequence<PerformanceEntry> PerformanceEntryList;
|
||||
|
||||
[Exposed=(Window, Worker)]
|
||||
interface Performance {
|
||||
interface Performance : EventTarget {
|
||||
DOMHighResTimeStamp now();
|
||||
};
|
||||
|
||||
[Exposed=(Window)]
|
||||
partial interface Performance {
|
||||
readonly attribute PerformanceTiming timing;
|
||||
/* readonly attribute PerformanceNavigation navigation; */
|
||||
readonly attribute DOMHighResTimeStamp timeOrigin;
|
||||
// [Default] object toJSON();
|
||||
};
|
||||
|
||||
// https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
|
||||
|
@ -39,3 +35,10 @@ partial interface Performance {
|
|||
void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
|
||||
void clearMeasures(optional DOMString measureName);
|
||||
};
|
||||
|
||||
// FIXME(avada): this should be deprecated, but is currently included for web compat
|
||||
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#performance-timing-attribute
|
||||
[Exposed=(Window)]
|
||||
partial interface Performance {
|
||||
PerformanceNavigationTiming timing();
|
||||
};
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://w3c.github.io/navigation-timing/#dom-performancenavigationtiming
|
||||
*/
|
||||
|
||||
enum NavigationType {
|
||||
"navigate",
|
||||
"reload",
|
||||
"back_forward",
|
||||
"prerender"
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface PerformanceNavigationTiming : PerformanceResourceTiming {
|
||||
readonly attribute DOMHighResTimeStamp unloadEventStart;
|
||||
readonly attribute DOMHighResTimeStamp unloadEventEnd;
|
||||
readonly attribute DOMHighResTimeStamp domInteractive;
|
||||
readonly attribute DOMHighResTimeStamp domContentLoadedEventStart;
|
||||
readonly attribute DOMHighResTimeStamp domContentLoadedEventEnd;
|
||||
readonly attribute DOMHighResTimeStamp domComplete;
|
||||
readonly attribute DOMHighResTimeStamp loadEventStart;
|
||||
readonly attribute DOMHighResTimeStamp loadEventEnd;
|
||||
readonly attribute NavigationType type;
|
||||
readonly attribute unsigned short redirectCount;
|
||||
// [Default] object toJSON();
|
||||
/* Servo-only attribute for measuring when the top-level document (not iframes) is complete. */
|
||||
[Pref="dom.testperf.enabled"]
|
||||
readonly attribute DOMHighResTimeStamp topLevelDomComplete;
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://w3c.github.io/resource-timing/
|
||||
*/
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface PerformanceResourceTiming : PerformanceEntry {
|
||||
readonly attribute DOMString initiatorType;
|
||||
readonly attribute DOMString nextHopProtocol;
|
||||
// readonly attribute DOMHighResTimeStamp workerStart;
|
||||
// readonly attribute DOMHighResTimeStamp redirectStart;
|
||||
// readonly attribute DOMHighResTimeStamp redirectEnd;
|
||||
// readonly attribute DOMHighResTimeStamp fetchStart;
|
||||
// readonly attribute DOMHighResTimeStamp domainLookupStart;
|
||||
// readonly attribute DOMHighResTimeStamp domainLookupEnd;
|
||||
// readonly attribute DOMHighResTimeStamp connectStart;
|
||||
// readonly attribute DOMHighResTimeStamp connectEnd;
|
||||
// readonly attribute DOMHighResTimeStamp secureConnectionStart;
|
||||
readonly attribute DOMHighResTimeStamp requestStart;
|
||||
readonly attribute DOMHighResTimeStamp responseStart;
|
||||
// readonly attribute DOMHighResTimeStamp responseEnd;
|
||||
/// readonly attribute unsigned long long transferSize;
|
||||
/// readonly attribute unsigned long long encodedBodySize;
|
||||
/// readonly attribute unsigned long long decodedBodySize;
|
||||
// [Default] object toJSON();
|
||||
};
|
||||
|
||||
// partial interface Performance {
|
||||
// void clearResourceTimings();
|
||||
// void setResourceTimingBufferSize(unsigned long maxSize);
|
||||
// attribute EventHandler onresourcetimingbufferfull;
|
||||
// };
|
|
@ -1,35 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#sec-navigation-timing-interface
|
||||
*/
|
||||
|
||||
[Exposed=(Window)]
|
||||
interface PerformanceTiming {
|
||||
readonly attribute unsigned long long navigationStart;
|
||||
/* readonly attribute unsigned long long unloadEventStart;
|
||||
readonly attribute unsigned long long unloadEventEnd;
|
||||
readonly attribute unsigned long long redirectStart;
|
||||
readonly attribute unsigned long long redirectEnd;
|
||||
readonly attribute unsigned long long fetchStart;
|
||||
readonly attribute unsigned long long domainLookupStart;
|
||||
readonly attribute unsigned long long domainLookupEnd;
|
||||
readonly attribute unsigned long long connectStart;
|
||||
readonly attribute unsigned long long connectEnd;
|
||||
readonly attribute unsigned long long secureConnectionStart;
|
||||
readonly attribute unsigned long long requestStart;
|
||||
readonly attribute unsigned long long responseStart;
|
||||
readonly attribute unsigned long long responseEnd; */
|
||||
readonly attribute unsigned long long domLoading;
|
||||
readonly attribute unsigned long long domInteractive;
|
||||
readonly attribute unsigned long long domContentLoadedEventStart;
|
||||
readonly attribute unsigned long long domContentLoadedEventEnd;
|
||||
readonly attribute unsigned long long domComplete;
|
||||
readonly attribute unsigned long long loadEventStart;
|
||||
readonly attribute unsigned long long loadEventEnd;
|
||||
/* Servo-onnly attribute for measuring when the top-level document (not iframes) is complete. */
|
||||
[Pref="dom.testperf.enabled"]
|
||||
readonly attribute unsigned long long topLevelDomComplete;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue