Fix the issue with adding/removing event listeners for Device Motion/Orientation.

Make sure to only stop updating Device Motion/Orientation when
there are no event listeners. Currently Device Motion/Orientation
stops updating upon first event listener removal which is
problematic in case multiple event listeners are registered.

BUG=364491
TEST=Layout test and also http://jsbin.com/motion.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172165 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Split the fast/hidpi/image-srcset-png.html test up to avoid scrollbars.

This test has 4 test cases but only 2 are visible and end up being
tested. This makes the bottom 2 cases not useful, and also introduces
scrollbars to this test which we don't need or want, as they cause
pixel differences when composited.

Split the test up into each of the 4 test cases individually.

R=enne@chromium.org
BUG=364946

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172166 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove enum types which are duplicated and cause error on webkit style checker.

DistanceModel and PanningModel emuns are duplicated with distance and panner.
It doesn't need to be declared in pannerNode.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172167 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Properly repaint grid item when z-index changes

Previously z-index changes of static positioned objects are ignored.
However, z-index is applicable for some static positioned objects,
such as grid items. Ignoring them makes the object not properly painted
on z-index change.

As StyleAdjuster has ensured that z-index is non-auto only if
applicable, RenderStyle::visualInvalidationDiff() should not check
again (with inconsistent conditions).

BUG=234200
TEST=fast/css-grid/layout/grid-item-z-index-change-repaint.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172168 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Center images when loading image urls in the main frame.

Do the same as Firefox and Presto when displaying raw image urls in the
main frame: center them in the view.

If this works out OK we should apply it to images loaded in iframes too.

BUG=27987

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

git-svn-id: svn://svn.chromium.org/blink/trunk@172169 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add blink-side plumbing for ServiceWorkerGlobalScope.clients

Follow-on to kinuko's crrev.com/240253002
* IDL/stubs for ServiceWorkerClients
* Promise plumbing for getServiced()
* Mapping ID results to Client[]
* IDL/stubs for Client

BUG=363965
R=dglazkov@chromium.org, kinuko@chromium.org

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

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