REGRESSION(r146380): media/track/track-user-preferences.html
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 20:10:12 +0000 (20:10 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 20:10:12 +0000 (20:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113083

Reviewed by Jer Noble.

Source/WebCore:

Ignore track change notifications triggered by automatic track selection so the
configuration is not changed.

No new tests, this fixes an existing test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Clear m_processingPreferenceChange after all
    track configuration is finished.
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Do nothing if m_processingPreferenceChange
    is true.

LayoutTests:

* platform/mac/TestExpectations: Remove test from expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146801 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp

index efacbf3..8ba06e9 100644 (file)
@@ -1,3 +1,12 @@
+2013-03-25  Eric Carlson  <eric.carlson@apple.com>
+
+        REGRESSION(r146380): media/track/track-user-preferences.html
+        https://bugs.webkit.org/show_bug.cgi?id=113083
+
+        Reviewed by Jer Noble.
+
+        * platform/mac/TestExpectations: Remove test from expectations.
+
 2013-03-25  Ryosuke Niwa  <rniwa@webkit.org>
 
         Windows rebaseline after r146779.
index f0e3d38..b292db5 100644 (file)
@@ -1473,8 +1473,6 @@ webkit.org/b/91611 media/media-higher-prio-audio-stream.html [ Skip ]
 # Snapshotted plugins not enabled on WK1
 plugins/snapshotting [ Skip ]
 
-webkit.org/b/113083 media/track/track-user-preferences.html [ Failure ]
-
 webkit.org/b/113094 editing/pasteboard/can-read-in-copy-and-cut-events.html [ Failure ]
 webkit.org/b/113094 editing/pasteboard/can-read-in-dragstart-event.html [ Failure ]
 
index c2bdfc5..ccd2c7b 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-25  Eric Carlson  <eric.carlson@apple.com>
+
+        REGRESSION(r146380): media/track/track-user-preferences.html
+        https://bugs.webkit.org/show_bug.cgi?id=113083
+
+        Reviewed by Jer Noble.
+
+        Ignore track change notifications triggered by automatic track selection so the 
+        configuration is not changed.
+
+        No new tests, this fixes an existing test.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::configureTextTrackGroup): Clear m_processingPreferenceChange after all
+            track configuration is finished.
+        (WebCore::HTMLMediaElement::configureTextTrackDisplay): Do nothing if m_processingPreferenceChange
+            is true.
+
 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK] [gyp] Build the final piece of WebCore
index 81b4dba..c044dc3 100644 (file)
@@ -3135,7 +3135,6 @@ void HTMLMediaElement::configureTextTrackGroup(const TrackGroup& group)
         trackToEnable = fallbackTrack;
 
     if (currentlyEnabledTracks.size()) {
-        m_processingPreferenceChange = false;
         for (size_t i = 0; i < currentlyEnabledTracks.size(); ++i) {
             RefPtr<TextTrack> textTrack = currentlyEnabledTracks[i];
             if (textTrack != trackToEnable)
@@ -3145,6 +3144,8 @@ void HTMLMediaElement::configureTextTrackGroup(const TrackGroup& group)
 
     if (trackToEnable)
         trackToEnable->setMode(TextTrack::showingKeyword());
+
+    m_processingPreferenceChange = false;
 }
 
 void HTMLMediaElement::setSelectedTextTrack(TextTrack* trackToSelect)
@@ -4463,6 +4464,9 @@ void HTMLMediaElement::configureTextTrackDisplay()
 {
     ASSERT(m_textTracks);
 
+    if (m_processingPreferenceChange)
+        return;
+
     bool haveVisibleTextTrack = false;
     for (unsigned i = 0; i < m_textTracks->length(); ++i) {
         if (m_textTracks->item(i)->mode() == TextTrack::showingKeyword()) {