Merge 281897 "Fix Android webview channel ID initialization."

> Fix Android webview channel ID initialization.
> 
> Android webview is missing initialization of ServerBoundCertService. Add
> logic to initialize it.
> Internal bug: b/1405093
> BUG=392235
> 
> Review URL: https://codereview.chromium.org/373203002

TBR=sgurun@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283106 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282220 "aw: Only enable webgl on hardware webview"

> aw: Only enable webgl on hardware webview
> 
> Also clean up 2d canvas code to respect command line switches.
> 
> BUG=392663
> 
> Review URL: https://codereview.chromium.org/375193002

TBR=boliu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283113 0039d316-1c4b-4281-b951-d872f2087c98
Merge 280734 "Fix GLImageSync::GetSize() to return actual textur..."

> Fix GLImageSync::GetSize() to return actual texture size
> 
> BUG=
> 
> Review URL: https://codereview.chromium.org/344483006

TBR=sievers@chromium.org
BUG=354841

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283117 0039d316-1c4b-4281-b951-d872f2087c98
Merge 281296 "Malware interstitial "details" text should be whit..."

> Malware interstitial "details" text should be white, not gray
> 
> BUG=391113
> 
> Review URL: https://codereview.chromium.org/369683003

TBR=felt@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283123 0039d316-1c4b-4281-b951-d872f2087c98
Merge 280496 "Plugin blocked appears with a sliding yellow thing..."

> Plugin blocked appears with a sliding yellow thing only when the content is explicitly set to Allow
> 
> BUG=388300
> 
> Review URL: https://codereview.chromium.org/338353011

TBR=radhikabhar@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283124 0039d316-1c4b-4281-b951-d872f2087c98
Merge 281974 "Hide the default checkbox on Safe Browsing interst..."

> Hide the default checkbox on Safe Browsing interstitials
> 
> For some reason, the default checkbox appears underneath the styled checkbox on Mac. This sets the visibility to hidden so that it won't peek out anymore.
> 
> BUG=386867
> R=dbeam@chromium.org
> 
> Review URL: https://codereview.chromium.org/378093003

TBR=felt@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283125 0039d316-1c4b-4281-b951-d872f2087c98
Merge 280440 "<webview>: Fix issue with "display: none"."

> <webview>: Fix issue with "display: none".
> 
> If <webview>'s style is set to "display: none", it would remove the
> browser plugin or not create it if was "display: none" from the beginning.
> 
> When <object> is "display: none", bindings and plugin itself is not
> available and attachment will fail after allocating instance ID.
> We need to call "-internal-attach" properly. This CL fixes this by:
> a) Deferring attachment if plugin bindings is not available. This can be
>    identified by simply checking if a binding method on the plugin is a
>    typeof 'function'.
> b) Calling deferred attachment upon BrowserPlugin initialization.
>    This is done by setting an attribute on the <object> ("bindingsavailable"),
>    This notifies the mutation observer in the shim which simply does the
>    attachment.
> 
> This CL also simplifies attachWindowAndSetupEvents() function in the
> shim, and renames it to simply "attachWindow" because we do not
> set up events in this function anymore.
> 
> BUG=387484
> Test=In a chrome chrome app, with <webview>.
> 1) Load a <webview src="..." style="display: none"></webview>,
> then set the display to 'block'.
> This should load the <webview> properly.
> 2) Load a <webview src="..."></webview>,
> Watch it load ... properly.
> Now set its display to 'none':
> document.querySelector('webview').style.display = 'none';
> Now set its display back to not none:
> document.querySelector('webview').style.display = '';
> This should load the webview properly.
> 
> Review URL: https://codereview.chromium.org/339183014

TBR=lazyboy@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283128 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282208 "Push inverse device scale factor in DRLI->DRLI pushes"

> Push inverse device scale factor in DRLI->DRLI pushes
> 
> DelegatedRendererLayerImpl computes an inverse device scale factor when
> receiving frame data so it can map from the delegating renderer's physical
> space to DIP space and then remap the quads from its renderer's DIP space
> to physical again. When using impl side painting, the frame is received
> by the DRLI on the pending tree. We need to push this factor to the active
> tree when pushing the passes so we can produce the correct quads from the
> active tree.
> 
> BUG=382967
> 
> Review URL: https://codereview.chromium.org/385433002

TBR=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283133 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282543 "Makes sure InputMethodEngine::Enable() can be call..."

> Makes sure InputMethodEngine::Enable() can be called after chrome starts.
> 
> BUG=391674
> TEST=Verified on pixel device.
> 
> Review URL: https://codereview.chromium.org/375363002

TBR=shuchen@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283149 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282370 "[Android]: Don't omit the frame pointer on Arm64."

> [Android]: Don't omit the frame pointer on Arm64.
> 
> If we omit the frame pointer on Arm64 there is no way for
> breakpad to correctly symbolize stack traces which contain
> stack frames for which we don't have CFI information (e.g.,
> system libraries like libc.so).  This is because the Arm64
> ABI does not specify where a frame pointer should be in a
> stack frame, so, without CFI information, there is no way 
> to calculate the start of the caller's frame if the caller
> omits the frame pointer.
> 
> More details are on the bug.
> 
> BUG=391706
> 
> Review URL: https://codereview.chromium.org/381923002

TBR=rmcilroy@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283171 0039d316-1c4b-4281-b951-d872f2087c98
Merge 280337 "DevTools: Added checks in RenderViewHostTarget to ..."

> DevTools: Added checks in RenderViewHostTarget to ignore broken GuestViews
> 
> BUG=388919
> 
> Review URL: https://codereview.chromium.org/346273009

TBR=vkuzkokov@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283173 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282030 "Turn off chromium linker on the content shell."

> Turn off chromium linker on the content shell.
> 
> Revert the content shell portion of:
>   https://codereview.chromium.org/329223002/
> This will enable landing of:
>   https://codereview.chromium.org/371943003/
> 
> There is an unexplained error when the chromium linker is turned on for
> the content shell.  It manifests (in logcat) as:
> 
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: FATAL EXCEPTION: ChildProcessMain
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: Process: org.chromium.content_shell_apk:sandboxed_process0, PID: 23281
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: java.lang.RuntimeException: Parcel android.os.Parcel@420d90b8: Unmarshalling unknown type code 6881388 at offset 244
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at android.os.Parcel.readValue(Parcel.java:2080)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at android.os.Bundle.unparcel(Bundle.java:249)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at android.os.Bundle.keySet(Bundle.java:345)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.base.library_loader.Linker.createLibInfoMapFromBundle(Linker.java:1090)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.base.library_loader.Linker.useSharedRelrosLocked(Linker.java:737)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.base.library_loader.Linker.finishLibraryLoad(Linker.java:443)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:179)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.base.library_loader.LibraryLoader.loadNow(LibraryLoader.java:125)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at org.chromium.content.app.ChildProcessService$2.run(ChildProcessService.java:149)
> 0a3b6:  07-08 13:40:43.925 23281 23295 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:841)
> 
> This does not occur with the chrome shell.  The change in
> 
>   https://codereview.chromium.org/371943003/
> 
> corrects chromium linker operation and resolves crbug/388356, but to land that
> requires that we turn off the chromium linker on the content shell first.
> 
> BUG=388356
> 
> Review URL: https://codereview.chromium.org/379603002

TBR=simonb@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283180 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282298 "Set parcel data position to 0 when cloning the rel..."

> Set parcel data position to 0 when cloning the relro bundle.
> 
> Rename local variable from 'p' to 'parcel.  Call parcel.setDataPosition(0)
> between write and read.  Fix a log message for punctuation.
> 
> Fixes (from logcat):
>   E/Bundle  ( 5115): readBundle: bad magic number
>   E/Bundle  ( 5115): readBundle: trace = java.lang.RuntimeException
>   E/Bundle  ( 5115):      at android.os.Bundle.readFromParcelInner(Bundle.java:1677)
>   E/Bundle  ( 5115):      at android.os.Bundle.readFromParcel(Bundle.java:1670)
>   E/Bundle  ( 5115):      at org.chromium.base.library_loader.Linker.useSharedRelros(Linker.java:494)
>   E/Bundle  ( 5115):      at org.chromium.content.app.ChildProcessService$1.setupConnection(ChildProcessService.java:100)
>   E/Bundle  ( 5115):      at org.chromium.content.common.IChildProcessService$Stub.onTransact(IChildProcessService.java:57)
>   E/Bundle  ( 5115):      at android.os.Binder.execTransact(Binder.java:388)
>   E/Bundle  ( 5115):      at dalvik.system.NativeStart.run(Native Method)
> 
> BUG=388356
> 
> Review URL: https://codereview.chromium.org/371943003

TBR=simonb@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283181 0039d316-1c4b-4281-b951-d872f2087c98
Merge 281729 "Enable FIXED_POINT and -O3 for Opus when building ..."

> Enable FIXED_POINT and -O3 for Opus when building for ARM
> 
> The original CL:
> https://codereview.chromium.org/315673002/
> 
> The revert of the CL above:
> https://codereview.chromium.org/349293006/
> 
> The reason for the original revert:
> Media tests started failing consistently on a tsan bot
> (http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28tsan%29%281%29?numbuilds=200) with revision 277414 (the commit of original CL).
> Cl was reverted in revision 279198.
> 
> This CL solved the problem differently, by not using the release_optimize flag, and instead replace the cflag -Os with -O3.
> 
> Opus speed gain with -03 flag on ARM:
> ARM32b - 6-8% for encoding, 2% for decoding
> ARM64b - 20% for encoding, 17% for decoding
> 
> Increased binary size: 
> 
> BUG=chromium:354539
> 
> Review URL: https://codereview.chromium.org/354903003

TBR=tlegrand@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283182 0039d316-1c4b-4281-b951-d872f2087c98
Merge 279198 "Revert of Enable FIXED_POINT and -O3 for Opus when..."

> Revert of Enable FIXED_POINT and -O3 for Opus when building for ARM. (https://codereview.chromium.org/315673002/)
> 
> Reason for revert:
> Media tests started failing consistently after this: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28tsan%29%281%29?numbuilds=200
> 
> It doesn't look super related, but the <() / >() change in common.gypi looks a bit suspicious, so revert this speculatively and see if it helps.
> 
> Original issue's description:
> > - Enable FIXED_POINT for Opus when building for arm64. This yields:
> >   ~21% speed up over floating point.
> >   2.6% increase in executable size.
> > - Also switched to late expansion of release_optimize in common.gypi (debug_optimize was already using it). This makes it possible to set optimization level via release_optimize in lower level targets.
> > 
> > - Enable -O3 for Opus when building form arm32/arm64. This yields:
> >   arm32: Speed increase up to 21% (encode) and 5% (decode).
> >   arm32: 2.8% increase in executable size.
> >   arm32: Output is bit exact with the output when -Os is used.
> >   arm64: Speed increase up to 18% (encode) and 25% (decode).
> >   arm64: 7.4% increase in executable size.
> >   arm64: Output is exact within one LSB (max difference is 2) with the arm32 output.
> > 
> > Measured using webrtc/audio_codec_speed_tests.
> > 
> > BUG=chromium:354539
> > 
> > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277414
> 
> TBR=tlegrand1, Sergey Ulanov, Solis
> NOTRY=true
> NOTREECHECKS=true
> 
> Review URL: https://codereview.chromium.org/349293006

TBR=thakis@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283185 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282028 "Force enterprise enrollment flow upon detection..."

> Force enterprise enrollment flow upon detection of inconsistent state.
>
> At the time LoginDisplayHostImpl decides whether enrollment flow is to be
> started, policy hasn't been read yet, so LoginDisplayHostImpl is not in a
> position to decide whether recovery is required. To work around this, upon
> policy load on machines requiring recovery, a flag is stored in prefs which
> is accessed by LoginDisplayHostImpl early during (next) boot.
>
> Enrollment recovery depends on the availability of the machine id and is
> silently skipped when the latter is missing. There'll be a separate CL to
> have session manager provide the machine id on devices that require recovery.
>
> BUG=389481
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282028

BUG=389481
TBR=tnagel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283187 0039d316-1c4b-4281-b951-d872f2087c98
Merge 281549 "Destroying a window on long press doesn't crash."

> Destroying a window on long press doesn't crash.
> 
> The most obvious symptom of this issue is triggered by
> https://code.google.com/p/chromium/codesearch#chromium/src/ash/drag_drop/drag_drop_controller.cc&l=227.
> 
> When you long press a bookmark, for example, a nested
> message loop is created, while the gesture detector hasn't
> finished processing the long press gesture. The window is
> deleted within this nested message loop, which ends up
> deleting the gesture detector.
> 
> This change ensures that the gesture detector doesn't
> touch any local variables after dispatching events
> triggered by timeouts.
> 
> BUG=391063
> TEST=GestureRecognizerTest.GestureEventLongPressDeletingWindow
> TBR=sadrul@chromium.org
> 
> Review URL: https://codereview.chromium.org/370013002

TBR=tdresser@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283192 0039d316-1c4b-4281-b951-d872f2087c98
Merge 283083 "aw: Always render whole view with auxiliary bitmap"

> aw: Always render whole view with auxiliary bitmap
> 
> For auxiliary bitmap draw path, always draw the entire view
> size because the clip rect bounds is not in the right space
> and just returns wrong value sometimes.
> 
> This is the last use of clip rect bounds, so remove it
> entirely.
> 
> BUG=393666
> 
> Review URL: https://codereview.chromium.org/383233004

TBR=boliu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283199 0039d316-1c4b-4281-b951-d872f2087c98
Merge 282484 "Enrollment recovery: Fix check for presence of..."

> Ensure that enrollment recovery really only is triggered when the
> machine id can be accessed.
>
> BUG=389481
>
> Review URL: https://codereview.chromium.org/386643003

BUG=389481
TBR=tnagel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283204 0039d316-1c4b-4281-b951-d872f2087c98
Merge 280620 "Add back string version of DOMUtils.getNodeField()"

> Add back string version of DOMUtils.getNodeField()
> 
> It's used in downstream code.
> 
> TBR=igsolla@chromium.org
> 
> Review URL: https://codereview.chromium.org/362553002

TBR=wangxianzhu@chromium.org
BUG=385121

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

git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@283205 0039d316-1c4b-4281-b951-d872f2087c98