[Webkit-unassigned] [Bug 154742] Add support for playbackControlsManager
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 26 13:11:31 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=154742
--- Comment #5 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 272362
--> https://bugs.webkit.org/attachment.cgi?id=272362
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=272362&action=review
> Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm:289
> + uint64_t contextId;
> +
> + auto addResult = m_videoElements.add(&videoElement, 0);
> + if (addResult.isNewEntry)
> + addResult.iterator->value = nextContextId();
> + contextId = addResult.iterator->value;
There is new fangled way to do this using HashMap::ensure(..)
uint64_t contextId = m_videoElements.add(&videoElement, [&] { return nextContextId(); }).iterator->value;
or in two lines:
auto addResult = m_videoElements.add(&videoElement, [&] { return nextContextId(); });
auto contextId = addResult.iterator->value;
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160226/7df8c43f/attachment.html>
More information about the webkit-unassigned
mailing list