WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 225305
236155
PerformanceObserver should work with {type: 'paint', buffered: true }
https://bugs.webkit.org/show_bug.cgi?id=236155
Summary
PerformanceObserver should work with {type: 'paint', buffered: true }
Andrew Scheuermann
Reported
2022-02-04 13:32:41 PST
** Steps to reproduce: ** 1. Navigate to example.com (or any web page) in Safari and run the following code in the console: ``` new PerformanceObserver((list) => { console.log('callback invoked'); list.getEntries().forEach(console.log); }).observe({ type: 'paint', buffered: true }); ``` ** Actual Results: ** Nothing is logged and the callback is not invoked. ** Expected Results: ** A PerformancePaintTiming entry should be logged. The paint entry is logged with this other approach... ``` performance.getEntriesByType('paint').forEach(console.log); ``` ** Additional Information: ** Related Stack Overflow question ->
https://stackoverflow.com/questions/70989089/new-performanceobservercb-observe-type-paint-buffered-true-doesnt-w
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-04 16:14:19 PST
<
rdar://problem/88513217
>
Simon Fraser (smfr)
Comment 2
2022-02-07 11:58:01 PST
*** This bug has been marked as a duplicate of
bug 78011
***
Simon Fraser (smfr)
Comment 3
2022-02-08 16:57:46 PST
Not a dup.
Noam Rosenthal
Comment 4
2022-02-08 22:34:41 PST
This is already covered in a web platform test:
https://wpt.live/paint-timing/fcp-only/fcp-iframe.html
From what I checked it works as expected in safari. I also tested it manually in a fresh page. Note that the observer needs to be added before the paint happens - in your example steps that's not the case. Can you post a test page where you add an observer before the paint and the observer is not called?
Andrew Scheuermann
Comment 5
2022-02-09 09:48:36 PST
To clarify, the "Steps to reproduce" show a PerformanceObserver that is created with {type: 'paint', buffered: true}. The presence of the buffered parameter means that the PerformanceObserver callback should invoke with paint entries that occurred ~before~ the observer is added. You can reproduce this buffered behavior on Chrome, Firefox, Opera, and Edge by copying in the code at any time after the initial paint occurs. I've updated the bug description to "PerformanceObserver should work with {type: 'paint', buffered: true }"
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe#parameters
Noam Rosenthal
Comment 6
2022-02-09 09:58:57 PST
(In reply to Andrew Scheuermann from
comment #5
)
> To clarify, the "Steps to reproduce" show a PerformanceObserver that is > created with {type: 'paint', buffered: true}. The presence of the buffered > parameter means that the PerformanceObserver callback should invoke with > paint entries that occurred ~before~ the observer is added. > > You can reproduce this buffered behavior on Chrome, Firefox, Opera, and Edge > by copying in the code at any time after the initial paint occurs. > > > I've updated the bug description to "PerformanceObserver should work with > {type: 'paint', buffered: true }" > >
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/
> observe#parameters
Ah. I think this is a dup of
https://bugs.webkit.org/show_bug.cgi?id=225305
Noam Rosenthal
Comment 7
2022-02-09 10:05:46 PST
*** This bug has been marked as a duplicate of
bug 225305
***
Noam Rosenthal
Comment 8
2022-02-09 10:08:33 PST
I marked it as dup, and found an existing failing WPT for this
https://wpt.fyi/results/paint-timing/fcp-only/buffered-flag.window.html?label=experimental&label=master&aligned
which would make it easier to reproduce and fix.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug