NEW 173897
Unify post-painting callbacks
https://bugs.webkit.org/show_bug.cgi?id=173897
Summary Unify post-painting callbacks
Tim Horton
Reported 2017-06-27 17:30:32 PDT
Unify post-painting callbacks
Attachments
Patch (15.85 KB, patch)
2017-06-27 17:32 PDT, Tim Horton
darin: review+
Tim Horton
Comment 1 2017-06-27 17:32:29 PDT
Darin Adler
Comment 2 2017-06-27 17:38:50 PDT
Comment on attachment 313964 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313964&action=review r=me assuming everything works as well as I expect it will. > Source/WebCore/page/FrameView.cpp:1238 > + frame().page()->addOneShotPostPaintCallback([protectedThis = makeRef(*this)] { > + InspectorInstrumentation::didComposite(protectedThis.get().frame()); > + }); I probably would have just protected the frame, not the frame view. > Source/WebCore/page/Page.cpp:2425 > + while (!m_oneShotPostPaintCallbacks.isEmpty()) { > + auto callback = m_oneShotPostPaintCallbacks.takeLast(); > + callback(); > + } I would have written this as a one-liner, I think. > Source/WebCore/page/Page.h:604 > + WEBCORE_EXPORT void addOneShotPostPaintCallback(WTF::Function<void()>&&); Can this be on MainFrame instead of Page? Would avoid having to do null checks. Or maybe if there was a MainFrameView. > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:1128 > + if (auto corePage = [webView page]) > + corePage->dispatchAndClearPostPaintCallbacks(); Annoying to capture the web view just so we can get its page. Makes me wish the function was on MainFrame so we could just capture that. > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:91 > + void scheduleOneShotPostPaintCallback() override; final?
Note You need to log in before you can comment on or make changes to this bug.