summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Switch to client-based GeolocationSteve Block2012-05-221-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this switch is that it is required to enable PREEMPT_GEOLOCATION_PERMISSION. See b/4500947. The switch involves changing lots of Android's WebKit plumbing to use a new GeolocationClientAndroid in WebKit (called from WebCore::GeolocationController), rather than the existing GeolocationServiceAndroid in WebCore/platform (called from WebCore::Geolocation). This is complicated by the need to support mocking for LayoutTests. The pattern used is very similar to that used for DeviceOrientation and DeviceMotion. This patch ... - Enables CLIENT_BASED_GEOLOCATION - Leaves PREEMPT_GEOLOCATION_PERMISSION disabled for now - Removes GeolocationServiceAndroid - Adds a new GeolocationClientAndroid - Just a proxy to real client - Adds a new GeolocationManager - Manages switching between the real and mock clients - Provides the appropriate client to GeolocationClientAndroid - Plumbs to the real client calls for permissions and for suspending/resuming - Adds a new GeolocationClientImpl - The real client - Based heavily on GeolocationServiceAndroid - Delegates to GeolocationServiceBridge, as GeolocationServiceAndroid did - Calls back directly to GeolocationController - Owns the existing GeolocationPermissions - Updates WebViewCore to call the GeolocationManager for permissions and for suspending/resuming - Removes superfluous ChromeClient methods for permissions Note that support for mocking will be added in a later change. See bug for details. Bug: 6511338 Change-Id: I4cdbf55846e76b37c161834b83135b4dc48dbcdc
* Fix ssl client certs to use the private key ctxSelim Gurun2012-05-041-38/+56
| | | | | Bug: 6249185 Change-Id: Id9d57dc9adcbb37d1a39d33c6abd8e896ced1785
* New touch input supportJohn Reck2012-04-111-1/+0
| | | | | | Bug: 6317798 Change-Id: Idea47af14e282b42c902c8158f08f6742ba576da
* Drop support for Android HTTP stackSteve Block2012-02-221-133/+0
| | | | | | | | | | | | | All future releases will use the Chromium HTTP stack and maintaining two HTTP stacks adds maintenance overhead. The Chromium HTTP stack requires V8, but we now use V8 in all build targets (b/5495373), so we can safely drop the Android HTTP stack. See corresponding framework change https://android-git.corp.google.com/g/166325. Bug: 5495616 Change-Id: I41117b6750fbc1c84cbd4a5951b0d1a457354f93
* Remove unused cache methodsSteve Block2012-02-221-14/+0
| | | | | | | | | | | | | WebFrame::SetCacheDisabled() has been unused since https://mondrian.corp.google.com/changelist/33679-p9, so the WebCore cache is always enabled. WebFrame::CacheDisabled() has been unused since https://mondrian.corp.google.com/changelist/32803-p9 (see change to WebView). See framework change https://android-git.corp.google.com/g/167297. Change-Id: I4040aa24a1b269d506623ffbc5c0cf3d8353be0c
* frameworks/base refactoring.Mathias Agopian2012-02-171-1/+1
| | | | | | step 2: move libutils headers to their new home in androidfw. Change-Id: I5e97cfccf6828bc37207b92fbfe301b1ca31df4c
* Remove JSC-specific code and V8 guards from Android-specific codeSteve Block2012-02-161-61/+2
| | | | | | | Also removes such code from downstream edits to non-Android-specific code. Bug: 5495373 Change-Id: I478824af2e6ff0eff9a43a9534c2a5ee0e99e9f8
* Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGESteve Block2012-01-101-66/+66
| | | | | | | See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: Icaed25ccf4d689b533101e966e8303810b61b0d4
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-1/+1
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I4de9cd9a3bc462c4aead1fbcd4ac0f426556bc59
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-5/+5
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: Ia6cf33690679476e7d39c63fa59505491217fdde
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-2/+2
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I35a9fa5e53a83a9c9a920333a3752dd151fbd3b8
* Merge "Audit misuse of PassRefPtr"Russell Brenner2011-11-171-5/+5
|\
| * Audit misuse of PassRefPtrRussell Brenner2011-11-161-5/+5
| | | | | | | | | | | | | | | | Reviewed Android code for misuse of PassRefPtr in place of RefPtr. Also reviewed for PassOwnPtr and found no apparent misuse. Bug: 5631569 Change-Id: Ib22b340875b1d875091af47cef6510d9c63e351b
* | Removing ANDROID_INSTRUMENTATION codeKristian Monsen2011-11-171-166/+0
|/ | | | | | | | | | | | | | This has not been used for years, and due to WebKit merges the results are not accurate anymore. The resulting code is cleaner, less likely to create merge conflicts, and does not give the impression that this can be turned on and it will still work. Needs CL: https://android-git.corp.google.com/g/#/c/148912/ Change-Id: I617ad00c103ab72038371a3203452d2ccec0e50c
* Fix assertion message.George Mount2011-11-101-1/+2
| | | | | | | | Bug 5598631 The assertion message was misleading. This corrects it. Change-Id: Ic609804ebac09e6d92fa11dc078aad62126b8690
* Offset scroll area by the scroll origin on AndroidGeorge Mount2011-11-091-0/+21
| | | | | | | | | | | | Bug 5268793 The scrolled area for WebView is 0,0 - maxX,maxY while ScrollView can have any origin. On RTL pages, the origin is negative when it can scroll. This scrolls the page to the right when it detects an RTL page. Framework CL: I2537b84a Change-Id: I6a91b97f90f5ba4c323c56dda9d125108d9502c4
* Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGESteve Block2011-10-251-20/+20
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I821098330652380686aca9e83222936bd5678970
* Merge "Fix uses of GetByteArrayElements() in WebCoreFrameBridge" into ics-mr0Steve Block2011-10-131-18/+12
|\
| * Fix uses of GetByteArrayElements() in WebCoreFrameBridgeSteve Block2011-10-121-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we call GetByteArrayElements() to get a pointer to the data, then modify it, then fail to call ReleaseByteArrayElements. This means that if GetByteArrayElements() happens to take a copy of the data, we'll never sync the modified data back to the JNI object. This change updates the code to use SetByteArrayRegion() which handles releasing any copies that are made by JNI. Also use ScopedLocalRef where possible. Bug: 5442710 Change-Id: Ic8691eb18cac746ee2a2086017ffb9b5558755bd
* | Correctly guard WebFrame methods needed only with the Chromium HTTP stackSteve Block2011-10-121-6/+1
|/ | | | | | This fixes the break in builds which use the Android HTTP stack. Change-Id: I0feb885754c34e96216c8e0c28390808f424534e
* Modify BrowserFrame.requestClientCert() to take the host and port as a StringSteve Block2011-10-121-8/+5
| | | | | | | | | | | | | | | | Currently we get the host and port from Chromium as a std::string, convert to a jbyte array to pass over JNI, then convert to String. It's simpler to convert directly to jstring and to pass that over JNI. This also fixes the fact that WebFrame::requestClientCert() fails to call ReleaseByteArrayElements(). Requires https://android-git.corp.google.com/g/141238 in frameworks/base. Bug: 5442710 Change-Id: If81fdef338ecdf2debeece0ebb9926bd261ae219
* Post a full WebView inval when we navigate to a new page.Ben Murdoch2011-09-211-5/+0
| | | | | | | | | | Rather than just posting an inval when we start to load a new page, we should do so on any new intra-page navigation, so that we cover cases that don't originate from Java. For example, when navigating the page cache. Bug: 5266447 Change-Id: I035ddcd9ef7d06a69a8adfe89cba75be7c502edb
* Make sure WebViewClient.onPageStarted() doesn't preceed ↵Steve Block2011-08-311-5/+7
| | | | | | | | | | | | | | | WebViewClient.shouldOverrideUrlLoading() In the case of a server-side redirect, we were triggering a callback to WebViewClient.onPageStarted() before we'd called WebViewClient.shouldOverrideUrlLoading(). This change delays calling WebViewClient.onPageStarted() until after WebViewClient.shouldOverrideUrlLoading() has returned and has indicated that the WebView should continue with the load. Bug: 5191031 Change-Id: I43d12c4df46e5d6e2defad10e80efbf0d5c30aed
* Fix PictureSet invlidation rectangle bugBen Murdoch2011-08-261-0/+5
| | | | | | | | | | | | | Set the height of the invalidation rectangle correctly. The last parameter to SkRect::set should be the bottom of the rectangle, not the desited height. Also, clear the content when we navigate between pages to avoid showing any stale content. Bug: 5213749 Change-Id: Ic75b9e9d8632750a15a03ebfbd4291fad03fca6a
* Merge "Remove shouldOverrideUrlLoading restrictions"John Reck2011-08-171-6/+0
|\
| * Remove shouldOverrideUrlLoading restrictionsJohn Reck2011-08-171-6/+0
| | | | | | | | | | | | Bug: 5171504 Change-Id: I5c2dfc8a0fbf07cb5df11bddfafd9f7251380402
* | Lazily decode assets for form controls.Ben Murdoch2011-08-161-3/+2
|/ | | | | | | | | | | | Rather than decoding the graphics when we create a WebView, wait until we actually need them. This saves about 50ms on native WebView creation time. Requires frameworks/base change: I5a2e87d03d73fa74ebb00c33567783225ed97d3a Bug: 5084146 Change-Id: Ia6c17634f535ed75b2a0757ac4d53f1a0befb78a
* Merge "Add missing calls to JavaInstance::end() in JavaNPObjectInvoke() and ↵Steve Block2011-08-101-4/+1
|\ | | | | | | JavaNPObjectGetProperty()"
| * Add missing calls to JavaInstance::end() in JavaNPObjectInvoke() and ↵Steve Block2011-08-081-4/+1
| | | | | | | | | | | | | | JavaNPObjectGetProperty() Bug: 5006441 Change-Id: I2da7a6f626560416cf5cac0cde3193a9074fab0f
* | Plumb a bool through to Java to supress auth dialog.Ben Murdoch2011-08-051-3/+3
|/ | | | | | | | | | | | | | In the case of a prefetch or favicon load, we want to silently fail auth loads but allow the use of cached credentials. To acheive this, pass an extra flag through to Java to decide whether to show the prompt or not. Requires: frameworks/base change: Ida5708aad7cbe5633106e9ae2997c9231aaf95b8 packages/apps/Browser change: Id901855830bbe17ede8a18293cff2bbc0aad4ba8 Bug: 5094761 Change-Id: If8c6f22e8307e1e13b8f7ad29f79305ce24b3255
* Safely convert punycode IDN to Unicode for display.Shimeng (Simon) Wang2011-07-211-3/+23
| | | | | | | | Use chromium's net::IDNToUnicode to accomplish this, which adopts safe measures for converting. issue: 4384726 Change-Id: If265a849ff0e9d6782705fc1639391bab9e6bcab
* Merge "Possible fix for bug 3335863: 3-second delay before Incognito state ↵Kristian Monsen2011-07-081-0/+4
|\ | | | | | | is cleared"
| * Possible fix for bug 3335863: 3-second delay before Incognito state is clearedKristian Monsen2011-07-011-0/+4
| | | | | | | | | | | | | | Force removing pending PageCache deletes when deleting a WebView. Change-Id: Ibd62f7b841e311a907c01a626834559b3bd9f263
* | When restoring the global reference in the WeakJavaInstance destructor, ↵Steve Block2011-07-081-13/+11
| | | | | | | | | | | | | | | | | | | | always do so from our weak global reference This avoid using a stale local reference in the case that calls to begin() and end() are unbalanced. Bug: 5006434 Change-Id: I3d1bb4ecfe11e9b54fb2a48b6ab9663ea753be54
* | Avoid leaking JNI local references in UrlInterceptResponseSteve Block2011-07-061-1/+3
|/ | | | | Bug: 4509854 Change-Id: I70bd6b5f1ce32263b1f048a7bb5e732338e7297d
* Merge Chromium at r11.0.696.0: Just AutoFill => Autofill renamingKristian Monsen2011-06-291-2/+2
| | | | Change-Id: Iefb91f0b784c26b503125017ae3582a28e7d530d
* 2nd try: Bubbles up the url that has the invalid certificate.Huahui Wu2011-06-281-3/+6
| | | | | | | | Same as this CL https://android-git.corp.google.com/g/#change,117817 except one minor change to make the build happy: Change-Id: Ie863737eee00c42de5d7a289b60aff8c2cfaa8e2
* Revert "Bubbles up the url that has the invalid certificate."Huahui Wu2011-06-281-6/+3
| | | | This reverts commit f072ccf633e8c2c2812289f0e65f18320f2147c8.
* Bubbles up the url that has the invalid certificate.Huahui Wu2011-06-271-3/+6
| | | | | | | | | | b/2689122 SSL error shows the wrong page when triggered by an image/javascript in the page This CL bubbles the url, which has the invalid cert, up to framework to display it. Related CLs are: Framework: https://android-git.corp.google.com/g/#change,117828 Browser: https://android-git.corp.google.com/g/#change,117835 Change-Id: If01ea2320aa50450a6d3d409123bed5a9f101d61
* Merge WebKit at r84325: Fix uses of JavaInstance.Ben Murdoch2011-06-101-6/+14
| | | | | | | | | The JavaInstance class is now an interface, so use the provided JavaInstanceJobject implementation instead. See http://trac.webkit.org/changeset/82950 Change-Id: I782e3887e4f059733fbc054ca1d9d97d94e817ef
* Implement net::URLRequest::Delegate::OnCertificateRequestedBrian Carlstrom2011-06-091-0/+109
| | | | | | | | | | | | | | | | | | | Following the example of OnSSLCertificateError, implement OnCertificateRequested ERROR CASE CLIENT CERT CASE net::URLRequest::Delegate::OnSSLCertificateError net::URLRequest::Delegate::OnCertificateRequested WebRequest::OnSSLCertificateError WebRequest::OnCertificateRequested WebUrlLoaderClient::reportSslCertError WebUrlLoaderClient::requestClientCert WebFrame::reportSslCertError WebFrame::requestClientCert android.webkit.BrowserFrame.reportSslCertError android.webkit.BrowserFrame.requestClientCert <... See frameworks/base ...> <... See frameworks/base ...> android.webkit.BrowserFrame.nativeSslCertErrorProceed android.webkit.BrowserFrame.nativeSslClientCert WebCoreFrameBridge::SslCertErrorProceed WebCoreFrameBridge::SslClientCert WebUrlLoaderClient::proceedSslCertError WebUrlLoaderClient::sslClientCert WebRequest::proceedSslCertError WebRequest::sslClientCert net::URLRequest::ContinueDespiteLastError net::URLRequest::ContinueWithCertificate Change-Id: I6513678a3c553bf329640119ff96df9a39a41e49
* Merge WebKit at r82507: IcondDatabaseBase::iconForPageURL() renamedSteve Block2011-06-081-1/+3
| | | | | | See http://trac.webkit.org/changeset/81484 Change-Id: I72f818d5d0075c63b658c2d8457d2182a7968c05
* Always check weak global references before using themSteve Block2011-06-021-70/+156
| | | | | | | | | | | | | | | | | | We hold weak references to Java objects from native code in several places to avoid circular reference problems. These objects may become weakly reachable at any time, after which the GC could null our weak reference, so we have to null-check at every use. Note that weak references are nulled before the referent is finalized, so we can't rely on doing work in the finalizer to wait for the currently executing message to complete and to remove other messages from the queue. This effectively reverts https://android-git.corp.google.com/g/#change,30955 Bug: 4336862 Change-Id: I431fcac11220cb406c26e31aacb9bda7ea22776e
* Merge WebKit at r80534: Fix IconDatabase uses.Ben Murdoch2011-06-021-1/+1
| | | | | | | | | WebCore::iconDatabase() now returns a reference rather than a pointer. Update our calls to reflect this. See http://trac.webkit.org/changeset/80299 Change-Id: Iebf2f199fd8913e227572753cee2cf3a2e380985
* Merge WebKit at r78450: Fix conflicts due to new ENABLE_WEB_ARCHIVE guardSteve Block2011-05-251-8/+5
| | | | | | | | | | | | | This replaces, and therefore conflicts with, Android's existing ENABLE_ARCHIVE guard. This change resolves the conflicts by taking the upstream guard in WebCore, updates WebKit to use the new guard, and enables this guard on Android. See http://trac.webkit.org/changeset/78439 See also http://trac.webkit.org/changeset/78342 for FrameLoader.cpp Change-Id: I28ebaf3d69ea4c352ab4cfbf91c33a8ba25f89b5
* Fix build when WEBARCHIVE is disabledSteve Block2011-05-181-1/+1
| | | | Change-Id: Ibbc124a51f2c58188eb8132a57adc5d87373f25c
* Merge WebKit at r75993: Fix uses of cache() functionBen Murdoch2011-05-161-6/+6
| | | | | | | WebCore::cache() is renamed to WebCore::memoryCache() See http://trac.webkit.org/changeset/75857 Change-Id: Id102b534c784191461a4d077058e5c25d5741d57
* Merge WebKit at r75993: Move WebKit/android files to SourceBen Murdoch2011-05-161-0/+2125
Change-Id: Ifa871f8320bdb3a09fe189fffecc23f702c394b9