Index: Source/core/html/track/vtt/VTTCue.cpp |
diff --git a/Source/core/html/track/vtt/VTTCue.cpp b/Source/core/html/track/vtt/VTTCue.cpp |
index dd9f6e84b738c66249ff4bcd4aac7c5cf79515bc..539f40b2dbcacd8b2f9efe45bbb809a22b8da202 100644 |
--- a/Source/core/html/track/vtt/VTTCue.cpp |
+++ b/Source/core/html/track/vtt/VTTCue.cpp |
@@ -124,10 +124,14 @@ static bool isInvalidPercentage(double value, const char* method, ExceptionState |
return false; |
} |
-// ---------------------------- |
+static const AtomicString& textTrackCueBoxShadowPseudoId() |
+{ |
+ DEFINE_STATIC_LOCAL(const AtomicString, trackDisplayBoxShadowPseudoId, ("-webkit-media-text-track-display", AtomicString::ConstructFromLiteral)); |
acolwell GONE FROM CHROMIUM
2013/12/03 20:51:31
nit: Any reason not to just move this into the con
philipj_slow
2013/12/03 21:16:23
I imagined it might be some deliberate style. I've
|
+ return trackDisplayBoxShadowPseudoId; |
+} |
VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) |
- : TextTrackCueBox(document) |
+ : HTMLDivElement(document) |
, m_cue(cue) |
{ |
setPseudo(textTrackCueBoxShadowPseudoId()); |
@@ -201,8 +205,6 @@ RenderObject* VTTCueBox::createRenderer(RenderStyle*) |
return new RenderVTTCue(this); |
} |
-// ---------------------------- |
- |
VTTCue::VTTCue(Document& document, double startTime, double endTime, const String& text) |
: TextTrackCue(startTime, endTime) |
, m_text(text) |
@@ -712,7 +714,7 @@ void VTTCue::updateDisplayTree(double movieTime) |
m_cueBackgroundBox->appendChild(referenceTree, ASSERT_NO_EXCEPTION); |
} |
-PassRefPtr<TextTrackCueBox> VTTCue::getDisplayTree(const IntSize& videoSize) |
+PassRefPtr<VTTCueBox> VTTCue::getDisplayTree(const IntSize& videoSize) |
{ |
RefPtr<VTTCueBox> displayTree = displayTreeInternal(); |
if (!m_displayTreeShouldChange || !track()->isRendered()) |
@@ -762,7 +764,7 @@ void VTTCue::removeDisplayTree() |
// The region needs to be informed about the cue removal. |
VTTRegion* region = track()->regions()->getRegionById(m_regionId); |
if (region) |
- region->willRemoveTextTrackCueBox(m_displayTree.get()); |
+ region->willRemoveVTTCueBox(m_displayTree.get()); |
} |
displayTreeInternal()->remove(ASSERT_NO_EXCEPTION); |
@@ -770,7 +772,7 @@ void VTTCue::removeDisplayTree() |
void VTTCue::updateDisplay(const IntSize& videoSize, HTMLDivElement& container) |
{ |
- RefPtr<TextTrackCueBox> displayBox = getDisplayTree(videoSize); |
+ RefPtr<VTTCueBox> displayBox = getDisplayTree(videoSize); |
VTTRegion* region = 0; |
if (track()->regions()) |
region = track()->regions()->getRegionById(regionId()); |
@@ -792,7 +794,7 @@ void VTTCue::updateDisplay(const IntSize& videoSize, HTMLDivElement& container) |
if (!container.contains(regionNode.get())) |
container.appendChild(regionNode); |
- region->appendTextTrackCueBox(displayBox); |
+ region->appendVTTCueBox(displayBox); |
} |
} |