Changeset 207368 in webkit


Ignore:
Timestamp:
Oct 14, 2016 6:48:36 PM (8 years ago)
Author:
Chris Dumez
Message:

Setting HTMLMediaElement.muted to the same value should not fire a volume change event
https://bugs.webkit.org/show_bug.cgi?id=163474

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/semantics/embedded-content/media-elements/event_volumechange-expected.txt:

Source/WebCore:

Setting HTMLMediaElement.muted to the same value should not fire a volume
change event:

Chrome and Firefox agree with the specification.

No new tests, rebaselined existing test.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setMuted):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r207330 r207368  
     12016-10-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Setting HTMLMediaElement.muted to the same value should not fire a volume change event
     4        https://bugs.webkit.org/show_bug.cgi?id=163474
     5
     6        Reviewed by Eric Carlson.
     7
     8        Rebaseline W3C test now that more checks are passing.
     9
     10        * web-platform-tests/html/semantics/embedded-content/media-elements/event_volumechange-expected.txt:
     11
    1122016-10-14  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_volumechange-expected.txt

    r189476 r207368  
    22PASS setting audio.volume fires volumechange
    33PASS setting audio.muted fires volumechange
    4 FAIL setting audio.volume/muted to the same value does not fire volumechange assert_unreached: Reached unreachable code
     4PASS setting audio.volume/muted to the same value does not fire volumechange
    55PASS setting audio.volume/muted repeatedly fires volumechange repeatedly
    66PASS setting video.volume fires volumechange
    77PASS setting video.muted fires volumechange
    8 FAIL setting video.volume/muted to the same value does not fire volumechange assert_unreached: Reached unreachable code
     8PASS setting video.volume/muted to the same value does not fire volumechange
    99PASS setting video.volume/muted repeatedly fires volumechange repeatedly
    1010
  • trunk/Source/WebCore/ChangeLog

    r207366 r207368  
     12016-10-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Setting HTMLMediaElement.muted to the same value should not fire a volume change event
     4        https://bugs.webkit.org/show_bug.cgi?id=163474
     5
     6        Reviewed by Eric Carlson.
     7
     8        Setting HTMLMediaElement.muted to the same value should not fire a volume
     9        change event:
     10        - https://html.spec.whatwg.org/#dom-media-muted
     11
     12        Chrome and Firefox agree with the specification.
     13
     14        No new tests, rebaselined existing test.
     15
     16        * html/HTMLMediaElement.cpp:
     17        (WebCore::HTMLMediaElement::setMuted):
     18
    1192016-10-14  Dean Jackson  <dino@apple.com>
    220
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r207338 r207368  
    33033303    LOG(Media, "HTMLMediaElement::setMuted(%p) - %s", this, boolString(muted));
    33043304
    3305     if (m_muted != muted || !m_explicitlyMuted) {
     3305    bool mutedStateChanged = m_muted != muted;
     3306    if (mutedStateChanged || !m_explicitlyMuted) {
    33063307        m_muted = muted;
    33073308        m_explicitlyMuted = true;
     
    33183319            }
    33193320        }
    3320         scheduleEvent(eventNames().volumechangeEvent);
     3321
     3322        if (mutedStateChanged)
     3323            scheduleEvent(eventNames().volumechangeEvent);
    33213324
    33223325        updateShouldPlay();
Note: See TracChangeset for help on using the changeset viewer.