Remove state-specific appendTo*/begin* methods from VTTToken
VTTToken has a number of methods that's only intended for use in
specific states (and for specific token-types). The naming pattern is
appendTo*. After earlier changes, most of these are simple oneliner
wrappers that simply append to the VTTToken::m_data buffer.
Moving towards an implementation that more closely follow (and resemble)
the spec wording, these methods present a problem (and contribute to
making the code unnecessarily complex).
Replace all appendTo*(...) with appendToData(...), and hoist any ASSERTs
into the calling code and simplify them where possible/reasonable.
For appendTo{Class,Annotation}, doing this it becomes apparent that
VTTToken::m_currentBuffer is redundant with m_buffer, so remove the
former in favor of the latter.
BUG=319391
Review URL: https://codereview.chromium.org/78833002
git-svn-id: svn://svn.chromium.org/blink/trunk@162477 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed