Convert the boolean param of Image::startAnimation() to an enum

This patch is a merge of wkrev.com/167356 by Simon Fraser (smfr). The
enum parameter is more readable.

BUG=364721

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171912 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Stop checking hasTriggers in RenderLayerCompositor::updateAcceleratedCompositingSettings.

In practice, the only time this would ever return false was when
m_webView->allowsAcceleratedCompositing would return false,
which in turn only happened when compositor creation failed.
It turns out that now that GTK linux is gone, we never call
WebViewImpl::didExitCompositingMode anymore because we always
succeed in creating a compositing OutputSurface (we fallback
to a software compositing OutputSurface instead of returning
null). So, the only codepath that hits this now is unittests
and possibly <webview> and android webview printing because
they use a WebViewClient that returns a null layerTreeView.

Instead of keeping track of whether compositor creating failed,
just disable accelerated compositing. This has the same effect
since we will never try to reenable accelerated compositing.

Now that the compositing triggers no longer depend on WebViewImpl,
we can move the logic into CompositingReasonFinder.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171913 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add myself to some watchlists.

TBR=esprehn@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@171914 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify RenderImage::imageDimensionsChanged()

This function decides if a change to the image requires relayout or if
repainting will suffice. It only needs to worry about layout-related updates to the
element that won't be detected elsewhere. These are: a change to the
image's intrinsic size (e.g. when the resource changes) or a change in
size to accomodate alt text for an image that failed to load - otherwise a
repaint will do just as well.

We don't need to recalculate height and width to figure this out - and the basis
of this patch is that doing so is a false economy. If the intrinsic
size has changed the only conditions that would avoid the need for triggering a
layout are:

  - if the first layout hasn't happened yet;
  - if the CSS dimensions of the image prevent the intrinsic size ever affecting
    the used size of the image, i.e. if it has fixed, percent, or calculated dimensions.

We don't need to worry about:

  - Absolutely positioned images with top/left/right/bottom specified. If the intrinsic
    dimensions of such an image changes, the used dimensions do too.

So currently when intrinsic size has changed we will calculate width/height twice - once
in order to figure out that a layout is required and a second time during layout itself.
Remove this unnecessary extra work by laying out if the intrinsic size has changed and
it affects the size of the image, otherwise just repaint.

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

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