Implement layout test support for Android WebKit

This implements WebView interface that's necessary to get the test runner
working.

Bug 1007785
Bug 1333245

Change-Id: I1343a6575efecb24eec13140e8f44db7c3236dde
Reviewed-on: http://git-master/r/114949
Reviewed-on: http://git-master/r/165033
(cherry picked from commit 612321ffe3fbb3d696e1ec05ed418518f329bb74)
Reviewed-on: http://git-master/r/217380
Reviewed-by: Maria Bornski <mbornski@nvidia.com>
Tested-by: Maria Bornski <mbornski@nvidia.com>
(cherry picked from commit 6c63fa455d74d51f0fae8f51563b7d57282a9ac0)
Reviewed-on: http://git-master/r/259032
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Implement layoutTestController.layerTreeAsText()

Implements private API call to be used with DumpRenderTree testing tool.
Adds WebView.getLayerTreeAsText() hidden API entry point. This method
should be called from WebKit thread, eg. as result of a JS function
invocation.

This needs corresponding commit in external/webkit.

Bug 899405
Bug 1007785
Bug 1333245

Change-Id: Icadff2b45d2ed032d2a536886c21257df60ec132
Reviewed-on: http://git-master/r/116070
Reviewed-on: http://git-master/r/165034
(cherry picked from commit ac6a23fb17664ae4abbd2b9a2db12a3d1cea7609)
Reviewed-on: http://git-master/r/217381
Reviewed-by: Maria Bornski <mbornski@nvidia.com>
Tested-by: Maria Bornski <mbornski@nvidia.com>
(cherry picked from commit ecfa3a382126ee25431ebcb10a1e74ec646b5791)
Reviewed-on: http://git-master/r/259033
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
webkit: Implement hardware accelerated pixel tests for layout tests

This needs corresponding commit in external/webkit.

Implement necessary WebView plumbing for querying whether all textures
have been painted.

Bug 910324
Bug 1007785
Bug 1333245

Change-Id: I53cee97f7f6729001cb8d9fe28f535fe31f1289e
Reviewed-on: http://git-master/r/116477
Reviewed-on: http://git-master/r/165036
(cherry picked from commit b0ebdf0768688dba12a48c09afabd9981483ed86)
Reviewed-on: http://git-master/r/217382
Reviewed-by: Maria Bornski <mbornski@nvidia.com>
Tested-by: Maria Bornski <mbornski@nvidia.com>
(cherry picked from commit 89138e8b0b5d900a3d76c57006c38d126ea8fb8e)
Reviewed-on: http://git-master/r/259034
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
WebKit: expose a proxy override API for testing

Expose a public but hidden API call WebView.setOverrideProxy to set
HTTP proxy that the WebView instances use. This is used for
page load testing.

Bug 924880
Bug 1015666
Bug 1333245

Change-Id: I06c7ba5a7605b1b4c77a70626b1f0e60b6702975
Reviewed-on: http://git-master/r/115638
(cherry picked from commit 1b1c21c7fa5d8b446962ccdf17d68a467c63f2dd)
Reviewed-on: http://git-master/r/259915
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
GVS: Gerrit_Virtual_Submit
webkit: Expose mock geolocation API for use in DRT

Bug 1333245

Change-Id: Ifd14c5947a83b9d1060cdfb6b9ebe18c3e1dae0e
Reviewed-on: http://git-master/r/165044
(cherry picked from commit 7c1576cddc05143a173ca10a7e4f7ff4482d649a)
Reviewed-on: http://git-master/r/217384
(cherry picked from commit 0891036142d83952d4c5ab70046059345c3386d2)
Reviewed-on: http://git-master/r/259036
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
webkit: Add WebSetting flag to control WebGL enabled state

Add hidden API calls to change whether WebGL is enabled or not.
The flag defaults to false.

Added API calls:
 void android.webkit.WebSetting.setWebGLEnabled(boolean)
 boolean android.webkit.WebSetting.getWebGLEnabled()

This commit is meaningful only with corresponding commit in
external/webkit.

Bug 956450
Bug 1333245

Merge WebGL->JB.
Bug 1012299

Change-Id: Ic8a52ebd964f04fa4cd1d68bb6d8e8aaa33afc36
Reviewed-on: http://git-master/r/115119
Reviewed-on: http://git-master/r/165038
(cherry picked from commit 76f0ef3438176196c2b2beb0f73256bb83896f7d)
Reviewed-on: http://git-master/r/217385
(cherry picked from commit adef07231cab3e0e8eaf7065ea85bd581a09947d)
Reviewed-on: http://git-master/r/259037
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Read pixels at the end of a frame in layout tests

Previously, glReadPixels was called in onDraw after the WebView drawing
functor has been added to the HardwareRenderer's display list. Even
though a framebuffer swap happens in HardwareRenderer between the
previous WebView::drawGL call and this glReadPixels call, buffer
preservation guaranteed that this recorded the framebuffer resulting from
the previous successful drawGL call.

Since buffer preservation is now off, this incorrect implementation does
not work anymore. The framebuffer contents at the time of onDraw are not
from the latest frame drawn in drawGL, but in principle contain
uninitialized memory - in practice an older frame.

The correct place to call glReadPixels is at the end of the frame in
drawGL. This patch adds a JNI testing interface for requesting a
screenshot to be taken the next time drawGL is called and copying it to a
Bitmap object. This is now used for pixel tests.

This needs a corresponding commit in external/webkit.

Bug 1212148
Bug 1333245

Change-Id: Ie2c70a9ab8fd8f1e70a64a2c33dffb11ee5c9d2d
Reviewed-on: http://git-master/r/190327
(cherry picked from commit f2d9bc6e4e707f1ccc4a5ff51c8641627941689e)
Reviewed-on: http://git-master/r/217386
(cherry picked from commit 08759fdc69ad98deb0d787e604e6a43651cc28d6)
Reviewed-on: http://git-master/r/259038
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Define native functions for partner build support

Define native functions which have dependency with webkit JNI
registration while booting. The minimum requirement for partner
branch is to make sure device boots.
This changes does not guarentee that browser works as expected.

Bug 1345898

Change-Id: Idc596e8da8aee526e4be825e15e4639f0840eb4a
Reviewed-on: http://git-master/r/260846
Reviewed-by: Srikumar Bonda <sbonda@nvidia.com>
Tested-by: Srikumar Bonda <sbonda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Zu <pzu@nvidia.com>
frameworks: expose api to set miracast mode

Currently miracast mode is set when p2p
state machine enters active state. This is
wrong since p2p state active doesnt mean miracast
is on. Add new hidden requestMiracastMode api
for the miracast application to call only
when miracast is active.

bug 1292341
bug 1292327

Change-Id: I97ac9dae611cd5d4c4022b364ebfcaf25f958ce9
Reviewed-on: http://git-master/r/243279
(cherry picked from commit 07e1e4d11be6e8425c9263eef93e939b3f5c9b88)
Reviewed-on: http://git-master/r/263023
GVS: Gerrit_Virtual_Submit
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Tested-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Peter Zu <pzu@nvidia.com>
Frameworks: OSS Shield support for frameworks

 * Add support for controllers in ActionBar and scrolls
 * Fix crash in system process when events back in during ANR
 * Fix bug with NativeActivity not supporting system apps

Bug 1362150

Change-Id: Ic6f1e4a7867ff96d5c888fe6c8317873e6068c5e
Reviewed-on: http://git-master/r/281916
Reviewed-by: Kevin Bruckert <kbruckert@nvidia.com>
Tested-by: Kevin Bruckert <kbruckert@nvidia.com>
Reviewed-by: Peter Zu <pzu@nvidia.com>