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

Unified Diff: Source/core/html/track/vtt/VTTCue.cpp

Issue 102073002: Remove TextTrackCueBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: inline pseudo id Created 7 years 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 | « Source/core/html/track/vtt/VTTCue.h ('k') | Source/core/html/track/vtt/VTTRegion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5889584df74a3ceff3dba01520d0d023335b29cc 100644
--- a/Source/core/html/track/vtt/VTTCue.cpp
+++ b/Source/core/html/track/vtt/VTTCue.cpp
@@ -124,13 +124,11 @@ static bool isInvalidPercentage(double value, const char* method, ExceptionState
return false;
}
-// ----------------------------
-
VTTCueBox::VTTCueBox(Document& document, VTTCue* cue)
- : TextTrackCueBox(document)
+ : HTMLDivElement(document)
, m_cue(cue)
{
- setPseudo(textTrackCueBoxShadowPseudoId());
+ setPseudo(AtomicString("-webkit-media-text-track-display", AtomicString::ConstructFromLiteral));
}
void VTTCueBox::applyCSSProperties(const IntSize&)
@@ -201,8 +199,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 +708,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 +758,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 +766,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 +788,7 @@ void VTTCue::updateDisplay(const IntSize& videoSize, HTMLDivElement& container)
if (!container.contains(regionNode.get()))
container.appendChild(regionNode);
- region->appendTextTrackCueBox(displayBox);
+ region->appendVTTCueBox(displayBox);
}
}
« no previous file with comments | « Source/core/html/track/vtt/VTTCue.h ('k') | Source/core/html/track/vtt/VTTRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698