IndexedDB: Test empty-string as database/object store/index name

Follow on to crrev.com/189413007 that removes a bogus
DCHECK about empty strings on the Chromium side.

BUG=350133
TBR=dgrogan
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168849 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove HistoryItem::targetFrameID(), make it a HistoryController impl detail

targetFrameID() is generated from a counter that is guaranteed to be unique for
the life of the current renderer process, but is not guaranteed to be unique
across restart. Still use frame ids internally in HistoryController, but don't
serialize them or try to reuse them when navigating back/forward.

No test because it's very difficult to get a renderer process reliably into
this state, especially after removing the accessors that were causing the problem


BUG=341425
TEST=manually on http://my.opera.com/community

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168850 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reland "Move MemoryCache implementation details out of Resource"

Currently, the linked-list next/previous pointers for the LRU lists in MemoryCache actually live on Resource. Move them to a new MemoryCacheEntry object that is part of MemoryCache. There are probably more possibilities for changes of this kind.

This change exposed some issues in tests that excercise the MemoryCache directly. Specifically, they add() multiple Resources with the same url, which clobber each other in the MemoryCache::m_resources HashMap. Add an assert to MemoryCache::add() that we are not overwriting existing entries, and give Resources urls in tests where there are conflicts.

Compared to original attempt: Remove some cases that should only ever be hit if the LRULists are already mangled. Add some ASSERTs, and RELEASE_ASSERT !inCache() in Resource's destructor, since if inCache() is true, we're going to use-after-free in MemoryCache later.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168851 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Shorten length of test for audiobuffersource-playbackrate.

Instead of generating almost 4 sec of audio, generate 1.8 sec instead. This makes the debug builds run this test much faster.

This is done by reducing the number of notes from 72 to 60 and making each note half as long as before. This shouldn't effect the accuracy of the test, except we're now missing the highest octave.

Also, testing on all platforms indicates that we only need just the one expected wav file, so the platform-specific versions have been removed.

BUG=349518
R=kbr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168852 bbb929c8-8fbe-4397-9dbb-9b2b20218538
CSSParserString::equalIgnoringCase should check string length.

The current equalIgnoringCase just checks whether the given CSSParserString is
the given str's prefix or not.

Suppose that we have the following two strings:
   char* str1; // not nul-terminated.
   int str1len; // str1's length.
   char* str2; // nul-terminated.

strncasecmp(str1, str2, str1len) == 0 doesn't mean str1 and str2 are the same string.
(Using strncasecmp instead of WTF::equalIgnoringCase.)

For example,

   str1: "abcdefg" (str1len = 7)
   str2: "abcdefghijkl\0"

so strncmp(str1, str2, str1len) returns 0.

BUG=348891
TEST=CSSParserValuesTest.EqualIgnoringCase8BitsString, CSSParserValuesTest.EqualIgnoringCase16BitsString

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168853 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert of Have Position deal with more references (https://codereview.chromium.org/188033005/)

Reason for revert:
null can be passed to positionAfterNode() so we cannot make the argument a reference.
See crbug.com/350968.

Original issue's description:
> Have Position deal with more references
> 
> Have Position deal with more references instead of pointers. This makes the
> code look safer.
> 
> R=adamk
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168675

TBR=adamk@chromium.org
NOTREECHECKS=true
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168854 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove document().page() null checks in MediaControls

These were needed in WebKit when the render theme was accessed via the
page, but that is no longer the case, these null checks are the only
bits in MediaControls that access document().page() at all.

It's possible that some code deeper down assumes that the page is not
null and will now begin to crash, but a quick scan of Source/core/
didn't reveal anything obvious.

BUG=341813

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

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