| Summary: | Simplify the mechanism to paint captions in video fullscreen and picture-in-picture | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Peng Liu <peng.liu6> | ||||
| Component: | Media | Assignee: | Peng Liu <peng.liu6> | ||||
| Status: | CLOSED WONTFIX | ||||||
| Severity: | Normal | CC: | calvaris, cdumez, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kangil.han, philipj, sergio, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Peng Liu
2020-03-15 11:27:16 PDT
Created attachment 393621 [details]
Patch
Comment on attachment 393621 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393621&action=review > Source/WebCore/html/shadow/MediaControlElements.cpp:1331 > + if (document().page()) { Nit: "if (auto* page = document().page())" would be slightly more efficient. > Source/WebCore/page/Page.cpp:1368 > + for (auto& callback : m_updateRenderingCallbacks.values()) A callback could mutate m_updateRenderingCallbacks so you should iterate over a copy. It is also possible for an existing callback to be removed during a client callback, so you should probably copy the keys to a vector and make a callback only if an identifier is still in m_updateRenderingCallbacks. > Source/WebCore/page/Page.h:952 > + uint64_t m_nextUpdateRenderingCallbackID { 0 }; An ObjectIdentifier would be better than a uint64_t. Comment on attachment 393621 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393621&action=review Seems OK but let's see another patch. > Source/WebCore/page/Page.cpp:1367 > #if ENABLE(VIDEO_TRACK) This shouldn't be inside the #ifdef any more. Because of concerns about arbitrary callbacks running post-updateRendering, e.g., it will encourage people to run code that will dirty layout. Let's close this bug without landing the patch. |