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

Unified Diff: Source/core/html/track/vtt/VTTScanner.h

Issue 143983002: Rework end-of-value field handling in VTTRegion::parseSettingValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 | « Source/core/html/track/vtt/VTTRegion.cpp ('k') | 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/VTTScanner.h
diff --git a/Source/core/html/track/vtt/VTTScanner.h b/Source/core/html/track/vtt/VTTScanner.h
index 56078b53fe848ebbaeeac7532711e64707b59b53..aa097e780ec360de1ca32ee224ad2b1ef2fcf2a3 100644
--- a/Source/core/html/track/vtt/VTTScanner.h
+++ b/Source/core/html/track/vtt/VTTScanner.h
@@ -228,39 +228,6 @@ inline void VTTScanner::advance(unsigned amount)
m_data.characters16 += amount;
}
-// Wrapper of VTTScanner that allows easy interaction with a parsing model
-// where a <String, index> tuple is used.
-class VTTLegacyScanner : public VTTScanner {
- WTF_MAKE_NONCOPYABLE(VTTLegacyScanner);
-public:
- VTTLegacyScanner(const String& line, unsigned* outPosition)
- : VTTScanner(line)
- , m_outPosition(outPosition)
- {
- ASSERT(outPosition && *outPosition <= line.length());
- // Adjust state according to |*outPosition|.
- advance(*outPosition);
- // Save the start position to allow adjusting |*outPosition|.
- if (m_is8Bit)
- m_start.characters8 = m_data.characters8;
- else
- m_start.characters16 = m_data.characters16;
- }
- ~VTTLegacyScanner()
- {
- // "Export" the updated position.
- unsigned advancedChars = m_is8Bit ? m_data.characters8 - m_start.characters8 : m_data.characters16 - m_start.characters16;
- *m_outPosition += advancedChars;
- }
-
-private:
- unsigned* m_outPosition;
- union {
- const LChar* characters8;
- const UChar* characters16;
- } m_start;
-};
-
}
#endif
« no previous file with comments | « Source/core/html/track/vtt/VTTRegion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698