Title: [103428] trunk/Source/WebCore
Revision
103428
Author
eric.carl...@apple.com
Date
2011-12-21 12:09:54 -0800 (Wed, 21 Dec 2011)

Log Message

HTMLMediaElement::configureTextTrackDisplay is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=74945

Reviewed by Darin Adler.

Nothing to test, just removing redundant code. Correct behavior tested by 
media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call
    updateTextTrackDisplay and it will do the right thing.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (103427 => 103428)


--- trunk/Source/WebCore/ChangeLog	2011-12-21 20:09:18 UTC (rev 103427)
+++ trunk/Source/WebCore/ChangeLog	2011-12-21 20:09:54 UTC (rev 103428)
@@ -1,3 +1,17 @@
+2011-12-21  Eric Carlson  <eric.carl...@apple.com>
+
+        HTMLMediaElement::configureTextTrackDisplay is unnecessary
+        https://bugs.webkit.org/show_bug.cgi?id=74945
+
+        Reviewed by Darin Adler.
+
+        Nothing to test, just removing redundant code. Correct behavior tested by 
+        media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call
+            updateTextTrackDisplay and it will do the right thing.
+
 2011-12-21  Anders Carlsson  <ander...@apple.com>
 
         ScrollingCoordinator functions should take FrameView objects

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (103427 => 103428)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-12-21 20:09:18 UTC (rev 103427)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-12-21 20:09:54 UTC (rev 103428)
@@ -3503,15 +3503,11 @@
         return;
     m_haveVisibleTextTrack = haveVisibleTextTrack;
 
-    if (!m_haveVisibleTextTrack) {
-        if (hasMediaControls())
-            mediaControls()->hideTextTrackDisplay();
+    if (!m_haveVisibleTextTrack && !hasMediaControls())
         return;
-    }
-
     if (!hasMediaControls() && !createMediaControls())
         return;
-    mediaControls()->showTextTrackDisplay();
+    mediaControls()->updateTextTrackDisplay();
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to