Fix WebMediaPlayerClientImpl so it only holds its reference to the MediaSource while opening.

The WebMediaPlayerClientImpl was holding onto its MediaSource reference
much longer than it needed to. Under certain circumstances it can hold
the last reference to the MediaSource, which can lead to crashes when
the MediaSource is destroyed as part of WebMediaPlayerClientImpl
destruction during document teardown.

This change fixes the crashes by only allowing WebMediaPlayerClientImpl
to hold the reference for the mimimal time it needs to. It only needs
to hold the reference while opening the MediaSource. Once the
MediaSource is open, the reference is cleared so it can't cause problems
later.


BUG=330026
TEST=LayoutTests/http/tests/media/media-source/mediasource-gc-after-decode-error-crash.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164455 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IndexedDB: Remove obsolete FIXME about window.onerror integration

The comment was a copy/paste of email proposing something that didn't
make it into the IDB spec. Further investigation shows that onerror
integration isn't at all straightforward and possibly not
Web-compatible.

BUG=302010
TBR=dgrogan@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164456 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix typos in bidi-img-alt-text, s/rtr/rtl/

Fix a couple of types in LayoutTests/fast/text/bidi-img-alt-text.html
where it said dir="rtr" instead of dir="rtl" thus not actually testing
the behavior in the rtl case.

BUG=326921
TBR=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164457 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Track v8 API changes.

R=jochen@chromium.org, dcarney@chromium.org
BUG=324225

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

Patch from Sven Panne <svenpanne@chromium.org>.

git-svn-id: svn://svn.chromium.org/blink/trunk@164458 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark fast/preloader/document-write-noscript.html as flaky

TBR=tonyg@chromium.org
BUG=331566

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164459 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Change font-weight-1 test to use webfonts

Change the font-weight-1 test to use web fonts instead of embedding the
font files into DRT. This fixes the test flakiness, makes it run on all
platforms and avoids the need to includ it into DRT.

BUG=243520,318515
R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164460 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Convert bidi-img-alt-text to pixel test

Trying to use a ref test for font rendering turned out to be an
excessive in futility, fall back on a pixel test.

R=esprehn@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164461 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark http/tests/inspector/styles/selector-line-deprecated.html as flaky

TBR=pfeldman@chromium.org
BUG=331572

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164462 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark fullscreen/parent-flow-inline-with-block-child.html as crashing

TBR=dglazkov@chromium.org
BUG=331576

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164463 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark fast/dom/HTMLMeterElement/meter-element.html for rebaseline

TBR=morrita@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164464 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement parsing of the new ellipse shape syntax.

    This closely follows the patch for the new circle syntax,  
    with some refactoring of functionality shared by both.

    Updated existing parsing tests to cover this.

BUG=322165

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164465 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove FrameLoader::activeDocumentLoader()

It's a lookup for when you're too lazy to figure out whether you want the
provisional document loader or the committed document loader. Most use cases
very clearly want one loader or the other, but could end up with an irrelevant
provisional loader instead of a committed loader if a new navigation is in
progress.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164466 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fully utilize js-test in fast/images/webgl-teximage2d.html to combat flakiness

The test was mixing testPassed()/testFailed() calls with testRunner.waitUntilDone()
and testRunner.notifyDone(), which seemed to result in occasional output
reordering. This patch gets rid of the testRunner calls and instead uses
jsTestIsAsync and finishJSTest().

R=esprehn@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164467 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move traverseLiveNodeListForwardToOffset() to LiveNodeList class

Move traverseLiveNodeListForwardToOffset() to LiveNodeList class and rename to
traverseForwardToOffset() for consistency with
HTMLCollection::traverseForwardToOffset(). Also merge
traverseChildNodeListForwardToOffset() into
LiveNodeList::traverseForwardToOffset() as ChildNodeList is a LiveNodeList and
there is no reason to treat it differently from the other LiveNodeList
subclasses.

Finally, rename isNodeList(CollectionType) to
isLiveNodeListType(CollectionType) as it only applies to LiveNodeLists and not
other types of NodeLists (e.g. StaticNodeList). This check is always used before
casting to a LiveNodeList.

R=abarth, esprehn, eseidel

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164468 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move Document::completeURL() and m_baseURL up to TreeScope

No functional change in this patch; this is in preparation for allowing
authors to set ShadowRoot.baseURI.

While adding a KURL member to TreeScope, I've removed the COMPILE_ASSERT
for the size of TreeScope, as it doesn't seem particularly useful or
consistent with other dom code (we don't check the size of Node or Element).

Also renamed the two-arg version of Document::completeURL() to
completeURLWithOverride() to make it clear that callers should be using the
one-arg TreeScope implementation.

R=esprehn@chromium.org
BUG=311682

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164469 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark tons of tests as ImageOnlyFailure for Mavericks

TBR=dpranke@chromium.org
BUG=331583

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164470 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactor the length functions to remove passing around the extra bool parameter for rounding behavior that is only used in a few places.

BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164471 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gardening: Mark http/tests/security/cross-origin-worker-indexeddb-allowed.html as flaky crashing

TBR=mkwst@chromium.org
BUG=331586

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164472 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 164447 "Handle all allocations internally to partitionAll..."

> Handle all allocations internally to partitionAllocGeneric().
> 
> We now no longer fall back to fastMalloc() for larger allocation sizes. The
> benefits include:
> 
> - The hacky SuperPageBitmap optimization can be completely removed.
> - We remove a couple of hot / tricky to predict branches in the free path.
> - The realloc() logic becomes a lot simpler.
> - For very large allocations, we fully guard page them.
> - Some minor simplifications to the management of extent lists.
> 
> - And we now make progress on removing the Blink copy of tcmalloc for Mac.
> - Also, we can make progress on graceful failure of large ArrayBuffers.
> 
> BUG=327095
> R=tsepez@chromium.org
> 
> Review URL: https://codereview.chromium.org/105503009

TBR=cevans@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164473 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove unnecessary HTMLMediaSource reference in WebMediaPlayerClientImpl and cleanup load code.

WebMediaPlayerClientImpl was maintaining an unnecessary reference to the
HTMLMediaSource object that the HTMLMediaElement using for the current
load. This change simply removes the reference and moves some load logic
out of WebMediaPlayerClientImpl and into HTMLMediaElement. This brings
is one step closer to removing WebMediaPlayerClientImpl.

Eventhough a reference to the HTMLMediaSource is being removed, this
change should not shorten the object's lifetime because the
HTMLMediaElement and WebMediaPlayerClientImpl should never be holding
the last references to the object.

TESTS= All existing tests still pass.

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

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