Commit Graph

1312 Commits

Author SHA1 Message Date
Cary Clark
122da932e0 defer accelerator keys to hosting application
Allow the hosting application to do what they want if the
control key is pressed. In particular, let our Browser
map Ctrl-arrow to back and forward.

bug:3270434
Change-Id: I2dfa648edbf5a0e48b674df5023182b4a70985f6
2010-12-28 16:11:35 -05:00
Cary Clark
aa86ac82bc map keyboard for webview
Treat the numeric keypad enter as the regular enter for the
purposes of completing a text entry or activating the currently
selected link.

Add a little keyboard-related debugging.

Don't call select text to extend the selection if the tap
point hasn't moved.

A separate change to the Browser app adds more keyboard
accelerators.

bug:3270434
bug:3191699
Change-Id: I8a38b26196e93e344dc2a4b39a6968fe0c158d47
2010-12-28 11:36:09 -05:00
Kristian Monsen
9437d916f4 Only register one ProxyReceiver
Change-Id: I0a86a0149fd944faca775cca4360774d9cba250d
2010-12-24 11:59:09 +00:00
Kristian Monsen
6b91b45e31 Only store Application context
Context from an Activity are not meant to be store past the
lifetime of the Activity.

Fix for bug 3306898

Change-Id: Ib2f12cbdc3ec8aa0a6adf4770e6be4569fa6402c
2010-12-23 12:47:39 +00:00
Kristian Monsen
41e7e6f933 Retrying sending proxy changes to webkit
Now checking if the ProxyProperties object is null, and if the
string returned by getHost() is null.

Change-Id: I727e26c2a41fe057501c3b610ba6fa221d16da45
2010-12-21 14:32:35 +00:00
Huahui Wu
77788f8153 Revert "Merge "Send proxy changes on the webcore thread to WebKit""
This reverts commit ea8f4e0d66, reversing
changes made to fd4dda8d77.
2010-12-20 14:43:10 -08:00
Kristian Monsen
64a2f6bd06 Send proxy changes on the webcore thread to WebKit
Change-Id: I16995b4595e931715b064702ae570c387cf453f3
2010-12-20 17:46:20 +00:00
Kristian Monsen
c4d251bbe1 Merge "Remove WebView leak" 2010-12-20 06:04:51 -08:00
Kristian Monsen
4190aab1c9 Remove WebView leak
We were leaking the first WebView created since we kept a reference
in a static variable. Using the new way of sending messages in a
static method to avoid this.

Change-Id: Ibb665e32c22c16c17176cd69bf8f7e83fd94894f
2010-12-20 12:26:00 +00:00
Iain Merrick
c96235deb9 Deprecate CacheManager.
This class gives fairly low-level access to the HTTP cache, which
as far as we can tell was only exposed for the benefit of Gears.

BUG=3270236

Change-Id: Ibce10ecf8b524d3f472affa2a37fe4de15efd2ed
2010-12-17 16:43:01 +00:00
Kristian Monsen
1c602b3ee1 Merge "Add methods to send messages to the WebViewCore whithout having a reference" 2010-12-17 08:11:14 -08:00
Leon Scroggins
8a4fd2f8e7 Do not allow text selection if there is no ActionBar.
Bug:3276538
Change-Id: I060f14471e26e4bc1bf9773b847e0dbac9228426
2010-12-17 11:04:14 -05:00
Iain Merrick
b67529b905 Add setContentLength method to CacheResult.
This is needed to construct a cachable CacheResult object.
Currently only WebViewWorker is able to do this, by updating
the fields directly.

Bug: 3270236

Change-Id: I50148697dcee4d329e1436a2ce4c15224cb5ae30
2010-12-17 15:44:00 +00:00
Kristian Monsen
d4819a722b Add methods to send messages to the WebViewCore whithout having a reference
Change-Id: I8543e862e7a93651c3e3fa9bcefc8ea5f857a152
2010-12-16 18:14:46 +00:00
Iain Merrick
6a4d0a6af2 Merge "*Don't* disable CacheManager when using Chromium HTTP stack." 2010-12-16 08:52:14 -08:00
Iain Merrick
811665e905 *Don't* disable CacheManager when using Chromium HTTP stack.
This reverts CL https://android-git.corp.google.com/g/84508

After lengthy discussion we have decided that disabling CacheManager
is too risky for third-party apps, and that enough functionality is
still available for it to be useful.

WebView.loadUrl() will not add pages to the cache, but it is still
possible to add them manually via CacheManager.saveCacheFile().

Change-Id: I6cfd9f93bb8d685450f048375adad9d17fa4eeba
2010-12-16 16:31:44 +00:00
Kristian Monsen
d085e1c34f Merge "Fix for crash in third-party app" 2010-12-16 08:23:45 -08:00
Leon Scroggins
633567468a Do not remove WebTextView when focus size changed.
Bug:3244237
Change-Id: I3302a4c0544a19f0f96bce833010889c4742a3a0
2010-12-16 11:16:03 -05:00
Kristian Monsen
d24ce5949d Fix for crash in third-party app
Dolphin crashed when sContext.getCacheDir got called too early.
This was because the let the user choose to use sdcard or
internal memory, and the choice was not yet made.

Change-Id: I8b3ba260c26233c6459efbb9e5e50fad2260a24d
2010-12-16 15:44:33 +00:00
Huahui Wu
e2975f17cc b/2946595 Remove the touch events filter upon maps.google.com team's request.
Change-Id: I83966bc447f67abdce47a77cb682bc3e834184c3
2010-12-15 15:00:03 -08:00
Cary Clark
861368a307 extract anchor href and image src separately
Long pressing a link may return an anchor, an image, or an
image in an anchor. Sometimes we want one, sometimes the other.

Make both available so the context menu can choose.

Update the documentation in WebView.java

Companion changes are in external/webkit, packages/apps/Browser

bug:3282745
bug:3263340

Change-Id: I9917a2c69d26601a230051f2e95c9464ba6155e9
2010-12-15 15:23:50 -05:00
Huahui Wu
957e9ca26e Merge "b/2864818 Prompt the SSL error dialog to user and proceed or cancel the request. C++ side cl: https://android-git.corp.google.com/g/#change,84529" 2010-12-15 09:42:35 -08:00
Huahui Wu
ad053cebc8 b/2864818 Prompt the SSL error dialog to user and proceed or cancel
the request. C++ side cl: https://android-git.corp.google.com/g/#change,84529

Change-Id: I1f4c69c6ddb92324a1ec3c193018e8d703454f56
2010-12-15 09:38:54 -08:00
Ben Murdoch
92272ab189 Merge "Remove fragment as well as the query from URLs when resolving MIME type" 2010-12-15 09:07:02 -08:00
Leon Scroggins
fcf577665b Make a long press on a textfield work.
Bug:3268584

Even if the WebTextView has not been set up yet.

Change-Id: I8ec2c4ef8146006d6ee84d08e1ddbdb099125047
2010-12-15 09:50:53 -05:00
Ben Murdoch
1870015932 Remove fragment as well as the query from URLs when resolving MIME type
When we try to deduce the MIME type from the file extension of
a URL, strip the fragment off at the same time we are stripping
the query. Otherwise we end up trying to match against some
funny extensions.

Bug:3241908

Change-Id: Ibaa84f0a628f37cd012b6cfbed9a6a666ecae8bb
2010-12-15 11:13:16 +00:00
Leon Scroggins
a60f00ffec Merge "Use black text on white background for dropdowns." 2010-12-13 13:24:42 -08:00
Leon Scroggins
60344deb7c Use black text on white background for dropdowns.
Bug:3249233
Change-Id: I8c400c4ab043409e40a1180d45effd4513d0657c
2010-12-13 16:08:04 -05:00
Adam Powell
e0893a8555 Merge "Smooth out gesture zooming in WebViews." 2010-12-13 10:47:07 -08:00
Kristian Monsen
7400be47b7 Cleanup of private browsing files are now done in webkit
Bug 3243891

Change-Id: I51e63a96bf1c95cd8e675a3d94a4aa210418e216
2010-12-13 17:51:20 +00:00
Patrick Scott
d2f44b7a32 Merge "Suppress scrollbars during layer fling." 2010-12-13 09:30:27 -08:00
Iain Merrick
0f868ca036 Disable CacheManager when using the Chrome HTTP stack.
Currently, cacheDisabled() reports false, but no files are ever
added to the cache. This CL makes the framework more honest and
reports that the cache is disabled.

BUG=3270236

Change-Id: I13c0291ac295d965f71f1e70dbdebc74b95ddce0
2010-12-13 14:28:56 +00:00
Iain Merrick
d1281286f2 Merge "Move useChromiumHttpStack() from CookieManager to JniUtil." 2010-12-13 06:22:49 -08:00
Patrick Scott
5b87e296c5 Suppress scrollbars during layer fling.
Change-Id: Ia6bc1f48e464212d5b9cebef27e4527b0bc93713
2010-12-13 09:20:32 -05:00
Leon Scroggins
c5ab8b331d Merge "Use drawLines to draw the outline of the WebTextView." 2010-12-13 05:56:54 -08:00
Adam Powell
63814df667 Smooth out gesture zooming in WebViews.
Change-Id: I42c1182f82af3ed16cd23efc056d7c9c34e32940
2010-12-11 16:49:05 -08:00
Leon Scroggins
6e9b327d08 Use drawLines to draw the outline of the WebTextView.
Bug:3214760

Optimize drawing the background of the WebTextView.

Change-Id: Iad44839137ffa3b91dd2044885028c283291b491
2010-12-10 17:32:25 -05:00
John Reck
11c1a0be5d Fixes Android HTTP cache permissions
Bug: 3244281

Change-Id: I372475bc2d9bd2f2354ee603f77468df0cb043bf
2010-12-10 10:19:16 -08:00
Iain Merrick
a106993a51 Move useChromiumHttpStack() from CookieManager to JniUtil.
This is a generally useful method, not specific to CookieManager.
I want to use it to modify the behaviour of CacheManager when we're
using the Chrome HTTP stack.

Corresponding C++ changes in I78a92cb2

BUG=3270236

Change-Id: I56b0ddcaa93ef340f4ffc3578486c3c96316f2ec
2010-12-10 15:51:36 +00:00
Ben Murdoch
0fa484ac37 Add a "Web Search" option to the WebView select text ActionBar
This change allows selected text in a web view to be used as a search
query.

Bug: 3132422
Change-Id: I9ed2a5913641b37732586f8d8aa8a80c3486b606
2010-12-09 20:02:44 +00:00
Ben Murdoch
e627f55bf8 Merge "Make audio tag cope with live streams" 2010-12-09 11:54:24 -08:00
Leon Scroggins
6b82c26607 Merge "Dismiss IME when pressing Next or Previous." 2010-12-09 11:04:06 -08:00
Leon Scroggins
261f42d64d Dismiss IME when pressing Next or Previous.
Bug:3267230

Change-Id: If4ea2f589c42f7346685a7ce754298dd8e5a00b5
2010-12-09 13:50:00 -05:00
Ben Murdoch
9059f44fee Make audio tag cope with live streams
Live streams seem to take a little while to initialize, so it's feasible
that we might get a play request before transitioned to the PREPARED
state. In that case track that we should start playing when onPrepare
completes.

Change-Id: I66ed0ef3a0905a1c5d4206fb2e7bbcc05a593fc7
2010-12-09 16:20:26 +00:00
Kristian Monsen
8517305521 Make CookieManager.removeSessionCookies async
Webkit loadurl() will wait on the webcore thread until oustanding
cookie operations complete.

Change-Id: I067408fdb9acd2e2d1f1f21eef910d0b26304332
2010-12-09 11:41:02 +00:00
Teng-Hui Zhu
5513337a4c Webview listen to Scroll event to update the viewport
In the case of unchanged layout, like replying in email/gmail,
scrolling should cause a viewport calculation update.
Otherwise, the content will be skewed.

Also, rename the mListener to mGlobalLayoutListener to avoid
confusion with added listener.

bug : 3143829

Change-Id: I7f5ee2e2cc9524e21cfffeef40b8650b6ee9a387
2010-12-08 09:01:41 -08:00
Cary Clark
5e17a1a18c don't scroll past the document bounds
bug:3260869
Change-Id: I255d2b18d738a422bd9d2948621b65e2f54ca0cd
2010-12-08 09:51:27 -05:00
Steve Block
81f19ffb94 Expose WebView.onPause() and onResume() in the public API
Also fixes up captialization of 'JavaScript' to be consistent.

Bug: 3054638
Change-Id: Ib60da17edb818c97013b399b4442f72c3bb386bd
2010-12-08 11:18:10 +00:00
Steve Block
689a342b0f Add WebView.removeJavascriptInterface()
Bug: 3234178
Change-Id: I7136f8d76b20f90a7e9e1c55b6755ffe6c35b77b
2010-12-07 20:16:13 +00:00
Shimeng (Simon) Wang
88ec644d67 Prevent scaling beyond zoom overview scale.
issue: 3243899
Change-Id: I1d6cbb1b1f75c7aadb3b9cc6e82d912217508dc4
2010-12-07 10:27:34 -08:00