WebView.getVisibleTitleHeight() is a public method so should only be
called on the UI thread. The implementation is already threadsafe, so
this patch simply moves it to a helper method.
Bug: 4424859
Change-Id: I6d938fb1b231debfdd54f87032cb2b4acc59c1e5