TextTrackCue should check for non-NULL cue list pointer

The member function TextTrackCue::cueIndex returns the index
for a cue item in a cue list (the result of which is used by
for sorting purposes). That function is implemented by first
calling the track object to get its cues, and then calling
the cue list object to get the index of the cue item.

However, per HTML rules, a track object returns a non-NULL
cue list object only if cues haven't been disabled. The
problem is that in the case for an inband text track, the
cues are disabled by default, and so the track object
returns NULL as the value of the cue list pointer. As
currently implemented, the text track cue object assumes
that the track's cue list is always non-NULL, but this
crashes the browser when the pointer value is dereferenced
to get the cue index.

The fix is for the text track cue object to check whether
the cue list is non-NULL, and only then to get the index of
the cue item in the list. Otherwise, if the cue list is
NULL, then the standard nonce value ("invalid index") is
returned as the index value (as there is no meaningful index
value for the cue item of a non-existent cue list). There
are no adverse consequences, however, because the index
value is only used for sorting, and "invalid index" can
indeed be used to determine sort order.

BUG=230708

Review URL: https://chromiumcodereview.appspot.com/17002002

git-svn-id: svn://svn.chromium.org/blink/trunk@153206 bbb929c8-8fbe-4397-9dbb-9b2b20218538
The flaky is caused by timeout event handler runs before load event which refers the element removed by timeout handler.

BUG=243701
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/17382017

git-svn-id: svn://svn.chromium.org/blink/trunk@153207 bbb929c8-8fbe-4397-9dbb-9b2b20218538
CSSParser shouldn't bloatCharacters()

The CSS parser was already very close to avoiding bloatCharacters(). I just
needed to tweak the handling of empty strings.

R=eseidel
BUG=254708

Review URL: https://chromiumcodereview.appspot.com/18159002

git-svn-id: svn://svn.chromium.org/blink/trunk@153208 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DatasetDOMStringMap shouldn't bloatCharacters()

I've switched this file to use String::operator[] rather than indexing directly
into the upconverted UChar buffer.

R=eseidel
BUG=254708

Review URL: https://chromiumcodereview.appspot.com/18161002

git-svn-id: svn://svn.chromium.org/blink/trunk@153209 bbb929c8-8fbe-4397-9dbb-9b2b20218538
events: Generate EventNames.in at runtime from the IDL files.

This change gets rid of EventNames.in from the tree. Instead, the file is
generated at build time from the list of processed IDL files. This allows
modules to add new event types (e.g. by adding the IDL files to
extra_blink_module_idl_files gypi variable).

BUG=none
R=haraken@chromium.org

Review URL: https://codereview.chromium.org/17941002

git-svn-id: svn://svn.chromium.org/blink/trunk@153210 bbb929c8-8fbe-4397-9dbb-9b2b20218538