mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Auto merge of #18283 - ferjm:user.timing.api, r=jdm
User Timing API - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18109 - [X] There are tests for these changes. I enabled the peformance-timeline API WPTs but some of them are still failing because of implementation bugs or missing APIs (Resource Timing, for instance) the tests are dependent of. I'll file issues to fix them. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18283) <!-- Reviewable:end -->
This commit is contained in:
commit
1e93749941
18 changed files with 272 additions and 13 deletions
|
@ -28,3 +28,14 @@ partial interface Performance {
|
|||
PerformanceEntryList getEntriesByName(DOMString name,
|
||||
optional DOMString type);
|
||||
};
|
||||
|
||||
// https://w3c.github.io/user-timing/#extensions-performance-interface
|
||||
[Exposed=(Window,Worker)]
|
||||
partial interface Performance {
|
||||
[Throws]
|
||||
void mark(DOMString markName);
|
||||
void clearMarks(optional DOMString markName);
|
||||
[Throws]
|
||||
void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
|
||||
void clearMeasures(optional DOMString measureName);
|
||||
};
|
||||
|
|
11
components/script/dom/webidls/PerformanceMark.webidl
Normal file
11
components/script/dom/webidls/PerformanceMark.webidl
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* 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/user-timing/#performancemark
|
||||
*/
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface PerformanceMark : PerformanceEntry {
|
||||
};
|
11
components/script/dom/webidls/PerformanceMeasure.webidl
Normal file
11
components/script/dom/webidls/PerformanceMeasure.webidl
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* 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/user-timing/#performancemeasure
|
||||
*/
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface PerformanceMeasure : PerformanceEntry {
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue