Checking if frame is complete and access duration doesn't need a decode

The goal of this change is to minimize image decoding on the main thread.

This change is to avoid image decoding for these two operations:
1. frameIsCompleteAtIndex
2. frameDurationAtIndex
These two operations are moved to ImageDecoder interface and are now const
to prevent future regression.

We are now able to check if a frame is complete by parsing the entire GIF file
without decoding. This also provides information like frame duration such that
controller the animation doesn't require any decoding.

This change is critical to moving animated image decoding off the main thread.

BUG=169377, 181321
TEST=(1) Unit test in GIFImageDecoderTest to test change in decoder behavior.
     (2) Image animation cannot be tested reliable via layout test and is
         tested manually with wikigifs.org.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149883 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 149834 "Implement DumpRenderTree...WebViewHost::scheduleA..."

> Implement DumpRenderTree...WebViewHost::scheduleAnimation
> 
> In order to move animation servicing to be triggered by only animation
> frame callbacks this patch implements scheduleAnimation so that calls
> to testRunner.display are not necessary to generate frame callbacks.
> 
> Animation is scheduled on the message loop with a 1ms delay. While no
> delay would be ideal, because animation servicing triggers further
> calls to scheduleAnimation it would cause priority inversion with dom
> timers. setTimeout calls used by many CSS Animation and Transition
> tests to sample expectations would occasionally miss their scheduled
> times by hundreds of ms.
> 
> Updated request-animation-frame tests to not call testRunner.display()
> 
> Removed request-animation-frame-too-rapid.html since DumpRenderTree now
> triggers frame callbacks with minimal delay.
> 
> BUG=235678
> 
> Review URL: https://chromiumcodereview.appspot.com/14107014

TBR=dstockwell@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149884 bbb929c8-8fbe-4397-9dbb-9b2b20218538
WebKit APIs to set image cache properties and query image cache status

Adding these public WebKit APIs:
void WebImageCache::setCacheLimitInBytes(size_t);
void WebImageCache::clear();
size_t WebImageCache::memoryUsageInBytes();
unsigned WebImageCache::cacheEntries();

These methods are redirected to ImageDecodingStore which allow setting
cache capacities, clearing the image cache and query cache usage.

Added a new API to ImageDecodingStore:
void ImageDecodingStore::clear();

This API is unit-tested in this change.

BUG=226490, 189390

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149885 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add WebGraphicsContext3DProvider interface.

This class is implemented by the chromium side to hold
a reference on a cc::ContextProvider instance. This way
the Blink side can make use of the provider's Context3D
without worrying about another code path deleting it,
since it holds onto a ref as long as it keeps the
WebGraphicsContext3DProvider alive.

The sharedOffscreenGraphicsContext3D() and
sharedOffscreenGrContext() methods can be removed from
Platform once the new provider method is implemented
and used everywhere.

R=jamesr@chromium.org
BUG=236572

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149887 bbb929c8-8fbe-4397-9dbb-9b2b20218538
SVGStyledElement::getPresentationAttribute does not need to be virtual.

BUG=none
R=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149888 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't attempt to follow a NULL shadowRoot

BUG=238475
R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149889 bbb929c8-8fbe-4397-9dbb-9b2b20218538
adoption-agency-crash-01/03 trigger ASSERTs

These tests exercise some interesting cases whereby <iframe>s get destroyed
synchronously while being loaded. These cases confused an ASSERT in
SubframeLoader.cpp.

This CL restructures the code so that it no longer needs the ASSERT. Instead,
these functions return bools rather than pointers, which means there's no need
to check the returned pointer for consistency. There doesn't appear to be any
reason for these functions to return pointers anymore. Perhaps that
functionality was needed in the past, but I didn't explore the history.

R=japhet@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149890 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 149890 "adoption-agency-crash-01/03 trigger ASSERTs"

I didn't mean to actually land this CL.

> adoption-agency-crash-01/03 trigger ASSERTs
> 
> These tests exercise some interesting cases whereby <iframe>s get destroyed
> synchronously while being loaded. These cases confused an ASSERT in
> SubframeLoader.cpp.
> 
> This CL restructures the code so that it no longer needs the ASSERT. Instead,
> these functions return bools rather than pointers, which means there's no need
> to check the returned pointer for consistency. There doesn't appear to be any
> reason for these functions to return pointers anymore. Perhaps that
> functionality was needed in the past, but I didn't explore the history.
> 
> R=japhet@chromium.org
> 
> Review URL: https://codereview.chromium.org/14800008

TBR=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149891 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Suppress failures for now

I'm working on a CL to fix these ASSERTs, but it needs a bit more love.

TBR=japhet

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149892 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Blink gardening: mark a bunch of tests as fail temporarily.

BUG=238813
TEST=these tests no longer turn bots red
TBR=dstockwell

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149893 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Sort WebRuntimeFeatures.cpp in preparation for autogeneration

I also removed some settings from enableTestOnlyFeatures which
were already covered by enableStableFeatures.

BUG=237740
R=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149894 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Delete earlywarningsystem.py.

We use trybots now.

BUG=none
R=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149895 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove a few webkit-patch commands that no longer make sense.

Namely: land-attachment, land-from-bug, land-from-url, validate-changelog,
prepare-rollout, create-rollout, rollout.
They all work with webkit's bugzilla, which we no longer use. Or ChangeLogs.

BUG=none
R=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149896 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add a deprecation warning for document.clear()

BUG=238784

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149897 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reduce load start codepaths in FrameLoader.

Merge load(const FrameLoadRequest&) and load(DocumentLoader*). Have this call
loadWithNavigationAction() instead of loadWithDocumentLoader().

This makes loadWithNavigationAction() the only caller of
loadWithDocumentLoader(). Merge these.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149898 bbb929c8-8fbe-4397-9dbb-9b2b20218538
This change exposes Skia's implementations of Path::length(), Path::pointAtLength(),
and Path::normalAngleAtLength() which results in a significant performance improvement.

This patch is primarily straightforward though the contour concept differs from Blink:
Skia's concept of subpaths are 'contours' so this patch uses while loops to iterate
over each contour. With this change, Path::pathLengthApplierFunction can be removed.

After this patch PerformanceTests/SVG/SvgCubics.html is 33% faster:
    Before patch: 26.69ms
    After patch: 17.62ms

All text-on-path scenarios should see a similar performance win.

B=227397
R=schenney@chromium.org

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149689

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149899 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use OwnPtr instead of deleteAllValues in SMILTimeContainer (Patch by darin@apple.com)

This patch is originally from wkbug.com/115730.

BUG=238678

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

git-svn-id: svn://svn.chromium.org/blink/trunk@149900 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Deleted now-obsolete WebSettings::setMinimumTimerInterval.

BUG=234840

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

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