Clean up compositing reasons definitions for better maintainability

This is a much-needed updating of the CompositingReasons logic
for trace viewer and debug info. After this cleanup, the only
file someone needs to modify to add/remove compositing reasons
is CompositingReasons.h. All other uses of CompositingReasons
are for actual core logic.

This patch does the following:
1. Moves the CompositingReasons description strings
   into CompositingReasons.h,
2. Removes the redundant and out-dated CompositingReasons inspector
   layer tree agent, and instead adds necessary info to
   CompositingReasons.h,
3. Cleans up the compositing reason constants, and
4. Adds a few compositing reasons to the combo reasons,
   which seemed to be missing.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167859 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Get rid of the compositing chicken-egg assert disable in RenderLayer::contentChanged.

This can be achieved by moving more code into the chicken-egg specific method in RenderLayerCompositor that is only needed for other call sites into that code.

BUG=339892

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167860 bbb929c8-8fbe-4397-9dbb-9b2b20218538
StyleElement::removedFromDocument should invoke removePendingSheet if the sheet is loading.

BUG=345114
TEST=fast/css/remove-loading-style.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167861 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add last resort to fallback chain in FontFallbackList::primaryFontData

Change FontFallbackList::primaryFontData to fall back on the last
resort fallback font if fontDataAt returns NULL. This matches the
behavior of the getFontData method and ensures that a valid FontData
object is returned as expected by the primarySimpleFontData method.

BUG=344989
R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167862 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Display pixel value in Device Emulation

Slider generates both oninput and onchange value.

R=pfeldman, tkent
BUG=346633

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167863 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reduce HTMLMediaElement BehaviorRestrictions to a single state bit

There's only a single restriction left, so make it more obvious.

Although not the main purpose, this reduces sizeof(HTMLMediaElement) by
4 bytes, from 584 to 580 on Mac Debug.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167864 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Defer starting of animations until after compositing update

Starting of animations depends on compositing state so that a decision
as to whether to run the animation on the main or compositor threads
can be made. Previously this happened following a style recalc where
sufficient incremental updating allowed a decision. After this patch
starting of animations may be deferred until after a compositing
update. Ideally this would happen once before the frame completes, but
the lifecycle of a frame is not yet visible to Blink.

Following the starting of animations the animation clock is unfrozen
allowing getComputedStyle and other animation API calls to advance
time when outside a frame. Previously, to maintain synchronization
in these situations the clock automatically froze on access and then
unfroze after a subsequent style recalc. This was partially inaccurate
as calls via the animation API might never trigger a recalc. Deferring the
unfreezing until after the compositing update is less feasible. Instead,
this patch allows the clock to remain unfrozen outside a frame by
throttling the frequency at which the clock is permitted to advance.

BUG=339847

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

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167865 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Send an accessibility notification when any container scrolls.

BUG=230839

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167866 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Get rid of fallback to redraw entire squashing layer on scroll.

This is only needed if universal overflow scrolling is off (and even then,
I can't remember exactly why). Let's get rid of it and not launch squashing
until universal overflow scrolling is done. This code keeps confusing people
about the performance of squashing.

BUG=333012

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167867 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Layout roots are not necessarily cluster roots.

BUG=332253

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167868 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make compositing update 15% faster on Silk toggle_drawer page set

Before this CL, we were spending 28% of the time during compositing update in
RenderLayerClipper::backgroundClipRect. However, the primary caller of that
function wasn't actually interested in the clip rect. That caller just wants to
know whether a clip exists at all.

This CL changes RenderLayerCompositor::clippedByAncestor to just compute
whether the layer is clipped at all (rather than what the clip rect actually
is). After this CL, we only spend 13% of the compositing update profile in
RenderLayerClipper::backgroundClipRect.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167869 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify DefaultAllocator::Quantizer using partitionAllocActualSize()

Drop QuantizedAllocation completely, and replace with a much simpler
implementation that lets PartitionAlloc just round the allocation size
upwards to fit the nearest bucket.

R=cevans@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167870 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add a test for template contents handling in importNode

Add a test for template contents handling in importNode, I missed this as part of:

https://codereview.chromium.org/173303004/

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167871 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Animations API: Move test cases for timing input from AnimationTest to AnimationTimingInputTest

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167872 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix geolocation timestamp to return in milliseconds when emulating in inspector.

BUG=279751

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167873 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement Blob.close().

This adds support for the close() methods to Blobs,

 http://dev.w3.org/2006/webapi/FileAPI/#close-method

providing a way to explicitly release the underlying data of a Blob.

Subsequent uses of a closed Blob is required/assumed to have the
following behavior:

  - the size of a closed Blob should be zero.
  - Consumers of such a Blob should treat it as having
    size 0 (e.g., FormData.append(), XHR.send()), and not throw.
  - FileReader read operations that are underway on a Blob
    being close()d should not be impacted.
  - Subsequent FileReader read operations on a closed Blob
    should fail with InvalidStateError.
  - Slices of a closed Blob should still be usable.
  - Dereferencing a blob URL that has been closed should
    cause a network error, like a revoke.

In other words, closing a shared object is not a straightforward
matter.

R=kinuko@chromium.org,michaeln@chromium.org, jochen@chromium.org
BUG=157794

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167874 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Do not hold references to ExecutionContext from DatabaseBase.

We don't need to hold RefPtr<ExecutionContext> in DatabaseBase because Database
and DatabaseSync, which are derived from DatabaseBase, are derived from
DatabaseBackendBase too, and we can obtain ExecutionContext from DatabaseContext
associated to DatabaseBackendBase.

DatabaseBase::logErrorMessage is moved to DatabaseBackendBase because we can't
access ExecutionContext in DatabaseBase any longer.

BUG=340522
TEST=none; no behavior changes.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167875 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Allow arbitrary values for [SetWrapperReferenceFrom]

Per Adam Klein's comment at:
https://codereview.chromium.org/161083002/#msg4
this CL removes the explicit list of allowed values from
[SetWrapperReferenceFrom], since it's just an arbitrary function name.

Per haraken's comment at:
https://codereview.chromium.org/161083002/#msg5
this is ok, so TBR'ing.

TBR=haraken
BUG=345503

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167876 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Translate CloseEventCodeNotSpecified to 1005

In the new WebSocket implementation in Blink, translate
CloseEventCodeNotSpecified (-1) to CloseEventCodeNoStatusRcvd
(1005). This will make the browser create a Close frame with no payload
after https://codereview.chromium.org/175213002 is landed.

BUG=345683

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

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