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

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

Issue 809553006: VTTCue: Get rid of undefinedSize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 9ec278a11e52bfbdc4d04b4fc9d5da9e2599ff75..530c5f2dfb569fb8a4933437f8c0b793725a7e7f 100644
--- a/Source/core/html/track/vtt/VTTCue.cpp
+++ b/Source/core/html/track/vtt/VTTCue.cpp
@@ -56,8 +56,6 @@
namespace blink {
-static const float undefinedSize = -1;
-
static const CSSValueID displayWritingModeMap[] = {
CSSValueHorizontalTb, CSSValueVerticalRl, CSSValueVerticalLr
};
@@ -231,7 +229,7 @@ VTTCue::VTTCue(Document& document, double startTime, double endTime, const Strin
, m_vttNodeTree(nullptr)
, m_cueBackgroundBox(HTMLDivElement::create(document))
, m_displayDirection(CSSValueLtr)
- , m_displaySize(undefinedSize)
+ , m_displaySize(std::numeric_limits<float>::quiet_NaN())
, m_snapToLines(true)
, m_displayTreeShouldChange(true)
, m_notifyRegion(true)
@@ -1105,7 +1103,7 @@ CSSValueID VTTCue::getCSSWritingMode() const
float VTTCue::getCSSSize() const
{
- ASSERT(m_displaySize != undefinedSize);
+ ASSERT(std::isfinite(m_displaySize));
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