Bug 144153 - [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
Summary: [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-24 10:47 PDT by Jer Noble
Modified: 2015-04-24 12:17 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2015-04-24 10:48 PDT, Jer Noble
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2015-04-24 10:47:27 PDT
[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
Comment 1 Jer Noble 2015-04-24 10:48:42 PDT
Created attachment 251558 [details]
Patch
Comment 2 Jer Noble 2015-04-24 10:50:05 PDT
rdar://problem/20677715
Comment 3 Alexey Proskuryakov 2015-04-24 10:57:12 PDT
Comment on attachment 251558 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251558&action=review

> Source/WebKit2/UIProcess/WebPageProxy.cpp:5674
> +    if ((oldState & MediaProducer::IsPlayingAudio) != (m_mediaState & MediaProducer::IsPlayingAudio))

At the beginning of this function, we have an early return when state == m_mediaState. I think that this should be an early return too, for consistency.
Comment 4 Jer Noble 2015-04-24 12:17:11 PDT
Committed r183276: <http://trac.webkit.org/changeset/183276>