mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #18176 - rtbo:perf_observer_buffered, r=ferjm
PerformanceObserverInit.buffered Per #18108, add `buffered` flag in the `PerformanceObserverInit` dict. Per W3C spec, when `buffered` is set, `PerformanceObserver.observe()` method adds the entries buffered in the `Performance` instance into the observer's entry buffer. One step is the implementation of the [filter by name and type](https://w3c.github.io/performance-timeline/#filter-buffer-by-name-and-type) algorithm. Don't think that the sort operation is useful in this case, but the spec states that this algorithm is to be used. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18108 - [X] These changes do not require tests (yet) because the timeline API is not powered. <!-- 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/18176) <!-- Reviewable:end -->
This commit is contained in:
commit
ced303b9cb
4 changed files with 35 additions and 2 deletions
|
@ -51,6 +51,10 @@ impl PerformanceEntry {
|
|||
pub fn name(&self) -> &DOMString {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn start_time(&self) -> f64 {
|
||||
self.start_time
|
||||
}
|
||||
}
|
||||
|
||||
impl PerformanceEntryMethods for PerformanceEntry {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue