[TextAutosizer] Fix a crash where fingerprints were not reset

If autosizing was disabled after fingerprints were added, we could fail
to update the fingerprint mapper when a RenderBlock was destroyed.
This was a common crash scenario when enabling and disabling mobile
emulation in devtools.

The fix is to simply check if fingerprints exist when destroying
blocks so that they are properly removed from the fingerprint maps.
The performance hit of this additional check shouldn't be too bad as
it ends up being a check of one bit.

This patch does not remove several speculative fixes for the same
bug because it is not clear that all crashes have the same root cause.
A followup patch will remove these speculative fixes.

R=skobes
BUG=369485
BUG=415607

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182517 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[TextAutosizer] Make it clear that maxClusterWidthProvider is logically const

This patch makes maxClusterWidthProvider const which is not obvious from
a quick scan of the code. As broken as const is in C++, I hope this will
help folks understand this area in the future.

R=skobes

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182518 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Layout test to test that video should not be in a paused state while looping

TEST=this!
BUG=415651

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182519 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move painting code from RenderGrid to GridPainter.

BUG=412088

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182521 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implementation of subresource integrity attribute for secure origins.

This is an implementation of subresource integrity only for script tags
and secure origins. This uses the previously added integrity attribute
to calculate a digest for subresources and allow access to the resource
only if the digest matches the specified integrity value.

See http://www.w3.org/TR/SRI/ for the W3C standard proposal.

Intent to implement discussion:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hTDUpMk_TV8

BUG=355467

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182523 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup FakeWebPlugin.[h|cpp].

1. Remove unnecessary forward declaration and #include.
2. Fix a wrong namespace comment for consistency.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182524 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add IDBIndexParameters IDL dictionary

Replacing generic dictionary. No changes in behavior. Tests under
storage/indexeddb cover this change. Also cleans up an unnecessary

What the spec defines as IDBObjectStoreParameters dictionary is left
as a generic dictionary for now, as it requires IDL Union support.

Spec: https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept

BUG=403150
R=bashi@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182526 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Custom handlers should throw SecurityError exception if the URL's origin differs from the document's origin.

Secification: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
"User agents must throw a SecurityError exception if the resulting absolute URL has an origin that differs from the origin specified by the entry settings object."

BUG=399184, 406236

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182527 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Turn off autofill highlight when changing option in an autofilled <select> element

R=isherman@chromium.org, tkent@chromium.org
BUG=412311

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182528 bbb929c8-8fbe-4397-9dbb-9b2b20218538
First pass at ripping out non-deferred SVG filter path.

There will be more to come, especially once the CSS deferred
path has proven itself and stuck and we can remove big
chunks of FilterEffect.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182529 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move paint code from RenderListMarker/RenderListItem to ListMarkerPainter/ListItemPainter.

BUG=412088

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182530 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move paint code from RenderHTMLCanvas to HTMLCanvasPainter.

BUG=412088

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182531 bbb929c8-8fbe-4397-9dbb-9b2b20218538
XHR: check error after changeState, as it may abort() internally

As pointed out by tyoshino@, |XMLHttpRequest::didReceiveResponse| needs to
check for |m_error| again after |changeState()|, which may internally
invoke |readystatechange| event and run arbitrary user js, which may
|abort()| internally.

This caused |didReceiveResponse| to create a |m_responseDocumentParser|
when we already knew that we are in |m_error| state.

BUG=409461

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182532 bbb929c8-8fbe-4397-9dbb-9b2b20218538
XMLHttpRequest: verbose lifecycle about parser callback

After r181684, XMLHttpRequest will wait for DocumentParser to call back
notifyParserStopped, so it needs to be kept alive.
This patch makes it explicit by adding a condition in hasPendingActivity.

Note that the old code was still safe, as we had m_loader non-null while
waiting for notifyParserStopped. However this was not obvious.

BUG=409461

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182533 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use the pinch viewport offset for tap disambiguation.

Account for the pinch vieport offset in the touch rectangle calculation
and pass the offset to the client. The client needs the touch rectangle
relative to both the main frame and to the screen.

This change is part 1 of 2 (part 2 is chromium side change https://codereview.chromium.org/595693002).

BUG=370470

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182534 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Adds annotation to rebaseline a couple of tests

BUG=416655,416775
R=danakj@chromium.org, jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182535 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Invalidation Tracking] fix typo in trace event category

'devtools.timeine' -> 'devtools.timeline'

BUG=410701

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Animation: Pass fill information to compositor

This sends fill information to the compositor to fix an issue where the compositor was behaving incorrectly when a start delay was specified. Removed WEB_ANIMATION_SUPPORTS_FRACTIONAL_ITERATIONS since it is no longer used.

BUG=415241

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182537 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Service Workers: InstallPhaseEvent -> ExtendableEvent

The concept of an event that you can call waitUntil() on to delay the
default behavior until the passed Promise resolves was made a more
generic concept in the spec[1], and renamed so it can be used in other
specs in the future.

[1] https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#extendable-event-interface

BUG=413662
R=dominicc@chromium.org,tkent@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182538 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Invalidation tracking] Add trace events for paint invalidations

This patch adds trace events for RO::invalidatePaintIfNeeded and
RO::invalidatePaintUsingContainer so that we can do end-to-end
tracking of what causes repaints to occur. The devtools side isn't
hooked up yet so this patch simply adds the trace events.

A fixme has been added to unify these events with the
blink.invalidations events.

R=kouhei
BUG=410701

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

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