Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: third_party/WebKit/LayoutTests/media/media-controls.js

Issue 2269883002: Refactor textTractDisplayElement utility function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/regions-webvtt/vtt-region-display.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/media-controls.js
diff --git a/third_party/WebKit/LayoutTests/media/media-controls.js b/third_party/WebKit/LayoutTests/media/media-controls.js
index d4c690b3861902a0dfe5b7ea16ed43335a7dda81..0eb0b03562f06a905ce84cfc3403fb6671c59828 100644
--- a/third_party/WebKit/LayoutTests/media/media-controls.js
+++ b/third_party/WebKit/LayoutTests/media/media-controls.js
@@ -88,10 +88,20 @@ function textTrackCueElementByIndex(parentElement, cueIndex) {
return displayElement;
}
+function textTrackRegionElement(parentElement)
+{
+ var containerElement = textTrackContainerElement(parentElement);
+ return mediaControlsElement(containerElement.firstChild, "-webkit-media-text-track-region");
+}
+
+function textTrackRegionContainerElement(parentElement)
+{
+ var containerElement = textTrackContainerElement(parentElement);
+ return mediaControlsElement(containerElement.firstChild, "-webkit-media-text-track-region-container");
+}
+
// TODO(srirama.m): Phase out the uses of this function and
// replace with more specific functions at each call site.
-// For ex: textTrackDisplayElement(video, 'region') => textTrackRegionElement(video) and
-// textTrackDisplayElement(video, 'region-container') => textTrackRegionContainerElement(video).
function textTrackDisplayElement(parentElement, id, cueNumber)
{
var containerElement = textTrackContainerElement(parentElement);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/regions-webvtt/vtt-region-display.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698