Add page visibility observer support for Device Orientation.

Stop firing 'deviceorientation' events when page becomes
invisible to save battery life on mobile devices.

The implementation is analogous to how Device Motion was
done. Some of the code was lifted into the common
superclass DeviceSensorEventController.

NOTE:
https://codereview.chromium.org/52943003/ should land before
this patch.

BUG=313340

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161168 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[SVG] SkPicture caching for masks & clips

This CL introduces display lists (a thin wrapper for an SkPicture +
recording bounds), and implements SVG mask & clip caching using this
new mechanism.

The immediate performance gains are modest: a complex mask (several
SVG Tiger instances) in continous repaint mode shows about 5-7% paint
time reduction (~15ms -> ~14ms). But now that we have a persistent Skia
handle (SkPicture) in Blink, we can implement more aggressive
optimizations in Skia (caching the rasterized SkPicture results).

Also, since we are no longer allocating a fixed resolution bitmap, we
can cache one display list per resource (clip/mask), instead of one
ImageBuffer per-resource-per-client (as we used to do before disabling
record time rasterization for masks and clips).

After we migrate all SVG resources away from caching ImageBuffers
(patterns & filters still remaining), we should also do a cleanup
pass on RenderSVGResourceContainer, as some of its method names no
longer make much sense (removeAllClientsFromCache,
removeClientFromCache, etc).

R=pdr@chromium.org,schenney@chromium.org,senorblanco@chromium.org
BUG=313885

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161169 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix tab crashes on inspecting view-source:... pages

The problem was that SPAN element was created by calling HTMLElement::create instead of HTMLSpanElement::create which resulted in webCoreInitializeScriptWrappableForInterface(WebCore::HTMLElement*) being called instead of webCoreInitializeScriptWrappableForInterface(WebCore::HTMLSpanElement*) to initilize typeInfo field in the object.

BUG=312567

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161170 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Use docking mode button to control Screencast visibility and docking state

BUG=311249

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161171 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove virtual where not needed in TextTrackCue

Remove TextTrackCue::cueType() since it always returned CueType::WebVTT
and was never overriden. CueType::Generic was for TextTrackCueGeneric
which was removed in r158977.

Remove TextTrackCue::videoSizeDidChange(...) since it did nothing and
was never overridden. This looks like unfinished logic for moving cues
when the controls are shown and hidden, and could be revived in
<http://crbug.com/314066>.

BUG=313287

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161172 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove obsolete logging functionality from RenderLayerCompositor

We are using other methods of insight into the tree, such as the
frame viewer, debuggers, and other methods of logging. This logging
code is not only un-used, but it is a maintenance burden and
adds unnecessary cognitive load to reading this code. It is cleaner
to simply remove it now!

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

git-svn-id: svn://svn.chromium.org/blink/trunk@161173 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Expose <dialog> in the accessibility tree by default.

This way accessibility technology can be aware of the
dialog. Previously, the 'dialog' role was ignored by default.

The test for this patch is on Chrome side:
https://codereview.chromium.org/55763002/

BUG=264959

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

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