Layout children if the width available to them has changed

Currently we let a style change to border or padding trigger a layout to
children, even if the parent's width hasn't changed. This is because the
change in border/padding alters the amount of space available to the children.

Likewise if a box has percent padding and uses border-box sizing then the
space available to children can reduce/increase even when the box itself
doesn't change size (e.g. because it has a max-width). When that happens we
still need to relayout its children so they fit to the changed available width.

If we cached content width or even padding we could watch for changes to this
available width for children but unfortunately we do neither so both of the
above cases have to be identified specifically at layout time.

BUG=391820

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178864 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Delay unregistering handlers when a document is detached

When a document is detached, we need to unregister all event targets
within that document. Currently that is done too early, making it
possible for new handlers to get added into the registry before the
document is fully detached. This results in stale handlers getting left
in the registry, causing a crash an arbitrary amount of time later once
the registry is modified again.

This patch fixes the problem by clearing the registry immediately before
the document is actually detached, making it impossible for any new
handlers to be introduced.

BUG=393154

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178865 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fixing display list 2d canvases to handle non-animated canvases

This change prevents non-animated canvases from falling back to
main thread rasterization mode. The stategy is to recycle the
SkPicture from the previous frame when there have been no draws
since the previous frame.

BUG=392612
TEST=blink platform unit test RecordingImageBufferSurfaceTest

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178866 bbb929c8-8fbe-4397-9dbb-9b2b20218538
In TestResultsServer, add build_number field to stored files.

R=ojan@chromium.org,dpranke@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178867 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix RenderLayer::positionFromPaintInvalidationContainer to map the rect to squashing backing correctly.

Previously it was using RenderObject::positionFromPaintInvalidationContainer to map from the paint
invalidation container to the transformed ancestor. This is incorrect, instead it should be using
RenderObject::localToContainerPoint, similar to how RenderLayer::mapRectToPaintBackingCoordinates works.
In practice, it almsot always, or perhaps even always, gets the same result, but the prior state violated
the intent of RenderObject::positionFromPaintInvalidationContainer.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178868 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add basic support for posting idle tasks to the Blink scheduler.

This CL adds support for posting non-critical idle tasks to the blink scheduler. Such tasks will only
be scheduled when Blink is otherwise idle, and will be given a deadline in-which to complete by.
Currently these tasks are run immediatly with a deadline of zero ms. Future CLs will expand upon
this.

BUG=391005,397026

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

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