[webkit-changes] [WebKit/WebKit] 6cfe0a: Update MediaSessionInfo media elements with a srcO...
Cameron McCormack
noreply at github.com
Wed Sep 28 02:06:46 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6cfe0a4e9efc3217d24a30f17e312b951695782b
https://github.com/WebKit/WebKit/commit/6cfe0a4e9efc3217d24a30f17e312b951695782b
Author: Cameron McCormack <heycam at apple.com>
Date: 2022-09-28 (Wed, 28 Sep 2022)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/platform/graphics/MediaUsageInfo.h
Log Message:
-----------
Update MediaSessionInfo media elements with a srcObject
https://bugs.webkit.org/show_bug.cgi?id=245753
rdar://problem/100477469
Reviewed by Jer Noble.
The optimization at the top of MediaElementSession::updateMediaUsageIfChanged
does not take into account media elements that have no currentSrc but do
have a srcObject. Don't exit early for such elements.
Store an additional bit of information on MediaSessionInfo to represent whether
the element has any source (currentSrc or srcObject).
* Source/WebCore/html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hasSource const):
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::MediaElementSession::updateMediaUsageIfChanged):
* Source/WebCore/platform/graphics/MediaUsageInfo.h:
(WebCore::MediaUsageInfo::operator== const):
(WebCore::MediaUsageInfo::encode const):
(WebCore::MediaUsageInfo::decode):
Canonical link: https://commits.webkit.org/254948@main
More information about the webkit-changes
mailing list