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

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

Issue 132563005: Initialize VTTCue::m_displaySize to undefinedSize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | no next file » | 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 2766960b9f0fa4d442ca5e489dd8ee91cc7fb3b9..f5a4c8cf7f7fb7e08de4d67aae04ddc74a170b38 100644
--- a/Source/core/html/track/vtt/VTTCue.cpp
+++ b/Source/core/html/track/vtt/VTTCue.cpp
@@ -54,6 +54,7 @@
namespace WebCore {
static const int undefinedPosition = -1;
+static const int undefinedSize = -1;
static const CSSValueID displayWritingModeMap[] = {
CSSValueHorizontalTb, CSSValueVerticalRl, CSSValueVerticalLr
@@ -212,6 +213,7 @@ VTTCue::VTTCue(Document& document, double startTime, double endTime, const Strin
, m_vttNodeTree(0)
, m_cueBackgroundBox(HTMLDivElement::create(document))
, m_displayDirection(CSSValueLtr)
+ , m_displaySize(undefinedSize)
, m_snapToLines(true)
, m_displayTreeShouldChange(true)
, m_notifyRegion(true)
@@ -1045,6 +1047,7 @@ CSSValueID VTTCue::getCSSWritingMode() const
int VTTCue::getCSSSize() const
{
+ ASSERT(m_displaySize != undefinedSize);
return m_displaySize;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698