Summary: | Add HTMLMediaElement behavior and attribute value restrictions for MediaStream | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matthew Daiter <mdaiter> | ||||
Component: | WebCore Misc. | Assignee: | Eric Carlson <eric.carlson> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bfulgham, commit-queue, eric.carlson, jer.noble, jonlee, mdaiter, webkit-bug-importer, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 146788 | ||||||
Attachments: |
|
Description
Matthew Daiter
2015-07-10 13:36:50 PDT
Created attachment 264601 [details]
Proposed patch.
Comment on attachment 264601 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=264601&action=review r=me, with the most minor of nits. (Don't feel like you have to change the patch though.) > Source/WebCore/Modules/mediastream/MediaStream.cpp:287 > + bool active = false; > + for (auto& track : m_trackSet.values()) { > + if (!track->ended()) { > + active = true; > + break; > + } > + } It's not really worth it, but you could do: auto& tracks = m_trackSet.values(); bool active = std::any_of(tracks.begin(), tracks.end(), [] (Track* track) { return !track->ended(); }); I wish we had those STL algorithms directly on our storage classes so we could do `m_trackSet.values().any_of([](auto track) { return !track->ended(); });` Comment on attachment 264601 [details] Proposed patch. Clearing flags on attachment: 264601 Committed r191909: <http://trac.webkit.org/changeset/191909> All reviewed patches have been landed. Closing bug. |